hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [1/2] hbase git commit: HBASE-21303 [shell] clear_deadservers with no args fails
Date Fri, 12 Oct 2018 19:42:12 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2.1 714127b4a -> 19cb105a7


HBASE-21303 [shell] clear_deadservers with no args fails


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

Branch: refs/heads/branch-2.1
Commit: fecaf4737ca97202506a6b1e2e841911ee463a4b
Parents: 714127b
Author: Michael Stack <stack@apache.org>
Authored: Fri Oct 12 10:34:59 2018 -0700
Committer: Michael Stack <stack@apache.org>
Committed: Fri Oct 12 11:19:24 2018 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/client/HBaseAdmin.java     | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/fecaf473/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
index a160204..b68bc18 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
@@ -25,6 +25,7 @@ import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -4233,15 +4234,13 @@ public class HBaseAdmin implements Admin {
   }
 
   @Override
-  public List<ServerName> clearDeadServers(final List<ServerName> servers) throws
IOException {
-    if (servers == null || servers.size() == 0) {
-      throw new IllegalArgumentException("servers cannot be null or empty");
-    }
+  public List<ServerName> clearDeadServers(List<ServerName> servers) throws IOException
{
     return executeCallable(new MasterCallable<List<ServerName>>(getConnection(),
             getRpcControllerFactory()) {
       @Override
       protected List<ServerName> rpcCall() throws Exception {
-        ClearDeadServersRequest req = RequestConverter.buildClearDeadServersRequest(servers);
+        ClearDeadServersRequest req = RequestConverter.
+          buildClearDeadServersRequest(servers == null? Collections.EMPTY_LIST: servers);
         return ProtobufUtil.toServerNameList(
                 master.clearDeadServers(getRpcController(), req).getServerNameList());
       }


Mime
View raw message