diff --git hbase-client/src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java hbase-client/src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java index bbffd97..43cde8a 100644 --- hbase-client/src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java +++ hbase-client/src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java @@ -28,6 +28,7 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HRegionLocation; import org.apache.hadoop.hbase.exceptions.DoNotRetryIOException; +import org.apache.hadoop.hbase.exceptions.NotServingRegionException; import org.apache.hadoop.hbase.ipc.HBaseClientRPC; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; @@ -181,6 +182,10 @@ public abstract class ServerCallable implements Callable { // map to that slow/dead server; otherwise, let cache miss and ask // .META. again to find the new location getConnection().clearCaches(location.getServerName()); + } else if (t instanceof NotServingRegionException && numRetries == 1) { + // Reload this specific region into META cache since we don't call + // connect(true) and hence do not refresh the META cache. + getConnection().relocateRegion(tableName, row); } RetriesExhaustedException.ThrowableWithExtraContext qt =