diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java index 96434f977c7..a8e17c6d943 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java @@ -78,9 +78,6 @@ public abstract class RegionServerCallable implements RetryingCallable RpcController rpcController) { super(); this.connection = connection; - if (tableName == null) { - throw new IllegalArgumentException("Given tableName is null"); - } this.tableName = tableName; this.row = row; this.rpcController = rpcController; @@ -208,8 +205,8 @@ public abstract class RegionServerCallable implements RetryingCallable public void prepare(final boolean reload) throws IOException { // check table state if this is a retry - if (reload && !tableName.equals(TableName.META_TABLE_NAME) && - getConnection().isTableDisabled(tableName)) { + if (reload && tableName != null && !tableName.equals(TableName.META_TABLE_NAME) + && getConnection().isTableDisabled(tableName)) { throw new TableNotEnabledException(tableName.getNameAsString() + " is disabled."); } try (RegionLocator regionLocator = connection.getRegionLocator(tableName)) { diff --git a/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/client/TestRpcControllerFactory.java b/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/client/TestRpcControllerFactory.java index aac020db099..3fdd8cb8059 100644 --- a/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/client/TestRpcControllerFactory.java +++ b/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/client/TestRpcControllerFactory.java @@ -92,7 +92,7 @@ public class TestRpcControllerFactory { super.setPriority(tn); // ignore counts for system tables - it could change and we really only want to check on what // the client should change - if (!tn.isSystemTable()) { + if (tn != null && !tn.isSystemTable()) { TABLE_PRIORITY.incrementAndGet(); }