Search in sources :

Example 1 with RegionOfflineException

use of org.apache.hadoop.hbase.client.RegionOfflineException in project hbase by apache.

the class RegionStateNode method checkOnline.

public void checkOnline() throws DoNotRetryRegionException {
    RegionInfo ri = getRegionInfo();
    State s = state;
    if (s != State.OPEN) {
        throw new DoNotRetryRegionException(ri.getEncodedName() + " is not OPEN; state=" + s);
    }
    if (ri.isSplitParent()) {
        throw new DoNotRetryRegionException(ri.getEncodedName() + " is not online (splitParent=true)");
    }
    if (ri.isSplit()) {
        throw new DoNotRetryRegionException(ri.getEncodedName() + " has split=true");
    }
    if (ri.isOffline()) {
        // RegionOfflineException is not instance of DNRIOE so wrap it.
        throw new DoNotRetryRegionException(new RegionOfflineException(ri.getEncodedName()));
    }
}
Also used : RegionState(org.apache.hadoop.hbase.master.RegionState) State(org.apache.hadoop.hbase.master.RegionState.State) RegionInfo(org.apache.hadoop.hbase.client.RegionInfo) DoNotRetryRegionException(org.apache.hadoop.hbase.client.DoNotRetryRegionException) RegionOfflineException(org.apache.hadoop.hbase.client.RegionOfflineException)

Aggregations

DoNotRetryRegionException (org.apache.hadoop.hbase.client.DoNotRetryRegionException)1 RegionInfo (org.apache.hadoop.hbase.client.RegionInfo)1 RegionOfflineException (org.apache.hadoop.hbase.client.RegionOfflineException)1 RegionState (org.apache.hadoop.hbase.master.RegionState)1 State (org.apache.hadoop.hbase.master.RegionState.State)1