use of org.apache.hadoop.hbase.exceptions.RegionOpeningException in project hbase by apache.
the class HRegionServer method getRegionByEncodedName.
protected Region getRegionByEncodedName(byte[] regionName, String encodedRegionName) throws NotServingRegionException {
Region region = this.onlineRegions.get(encodedRegionName);
if (region == null) {
MovedRegionInfo moveInfo = getMovedRegion(encodedRegionName);
if (moveInfo != null) {
throw new RegionMovedException(moveInfo.getServerName(), moveInfo.getSeqNum());
}
Boolean isOpening = this.regionsInTransitionInRS.get(Bytes.toBytes(encodedRegionName));
String regionNameStr = regionName == null ? encodedRegionName : Bytes.toStringBinary(regionName);
if (isOpening != null && isOpening.booleanValue()) {
throw new RegionOpeningException("Region " + regionNameStr + " is opening on " + this.serverName);
}
throw new NotServingRegionException("Region " + regionNameStr + " is not online on " + this.serverName);
}
return region;
}
use of org.apache.hadoop.hbase.exceptions.RegionOpeningException in project hbase by apache.
the class TestMetaCache method metaCachePreservingExceptions.
public static List<Throwable> metaCachePreservingExceptions() {
return new ArrayList<Throwable>() {
{
add(new RegionOpeningException(" "));
add(new RegionTooBusyException());
add(new ThrottlingException(" "));
add(new MultiActionResultTooLarge(" "));
add(new RetryImmediatelyException(" "));
add(new CallQueueTooBigException());
}
};
}
Aggregations