hbase-commits mailing list archives

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


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/171ac139
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/171ac139
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/171ac139

Branch: refs/heads/branch-2.0
Commit: 171ac139d3f3e007a47b26cab987197ac01c304a
Parents: 2aea27f
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:18:56 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/171ac139/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 1ed9d5d..a050d2d 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;
@@ -4167,15 +4168,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