hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject hbase git commit: HBASE-17212 Should add null checker on table name in HTable and RegionServerCallable constructor (addendum)
Date Thu, 01 Dec 2016 05:34:33 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 edcac04ac -> b3627ef51


HBASE-17212 Should add null checker on table name in HTable and RegionServerCallable constructor
(addendum)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/b3627ef5
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/b3627ef5
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/b3627ef5

Branch: refs/heads/branch-1
Commit: b3627ef51e984f355ff5ade1e4b45bc33ce5b1fd
Parents: edcac04
Author: Yu Li <liyu@apache.org>
Authored: Thu Dec 1 13:28:24 2016 +0800
Committer: Yu Li <liyu@apache.org>
Committed: Thu Dec 1 13:32:33 2016 +0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/client/RegionServerCallable.java    | 5 +----
 .../apache/hadoop/hbase/client/TestRpcControllerFactory.java    | 2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/b3627ef5/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java
----------------------------------------------------------------------
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 09f58a4..b446c3f 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
@@ -60,9 +60,6 @@ public abstract class RegionServerCallable<T> implements RetryingCallable<T>
{
    */
   public RegionServerCallable(Connection connection, TableName tableName, byte [] row) {
     this.connection = connection;
-    if (tableName == null) {
-      throw new IllegalArgumentException("Given tableName is null");
-    }
     this.tableName = tableName;
     this.row = row;
   }
@@ -76,7 +73,7 @@ public abstract class RegionServerCallable<T> implements RetryingCallable<T>
{
   @Override
   public void prepare(final boolean reload) throws IOException {
     // check table state if this is a retry
-    if (reload &&
+    if (reload && tableName != null &&
         !tableName.equals(TableName.META_TABLE_NAME) &&
         getConnection().isTableDisabled(tableName)) {
       throw new TableNotEnabledException(tableName.getNameAsString() + " is disabled.");

http://git-wip-us.apache.org/repos/asf/hbase/blob/b3627ef5/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRpcControllerFactory.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRpcControllerFactory.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRpcControllerFactory.java
index 389f068..eb989d2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRpcControllerFactory.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRpcControllerFactory.java
@@ -90,7 +90,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();
       }
 


Mime
View raw message