diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java index c56132c2bb2..dd11abff847 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java @@ -163,6 +163,9 @@ public class HTable implements Table { if (connection == null || connection.isClosed()) { throw new IllegalArgumentException("Connection is null or closed."); } + if (tableName == null) { + throw new IllegalArgumentException("Given table name is null"); + } this.tableName = tableName; this.cleanupConnectionOnClose = false; this.connection = connection; 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 b97743f5160..96434f977c7 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,6 +78,9 @@ 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;