accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject [2/2] git commit: ACCUMULO-1980 No longer tries to use master to stop tserver if no masters
Date Wed, 18 Dec 2013 20:49:31 GMT
ACCUMULO-1980 No longer tries to use master to stop tserver if no masters


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: f228caff46816939b95f101942082a9da0277dce
Parents: 3743312
Author: John Vines <vines@apache.org>
Authored: Wed Dec 18 15:48:52 2013 -0500
Committer: John Vines <vines@apache.org>
Committed: Wed Dec 18 15:48:52 2013 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/accumulo/server/util/Admin.java     | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/f228caff/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
index 698259b..1e1bc79 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
@@ -299,6 +299,10 @@ public class Admin {
 
   private static void stopTabletServer(final Instance instance, final Credentials creds,
List<String> servers, final boolean force) throws AccumuloException,
       AccumuloSecurityException {
+    if (instance.getMasterLocations().size() == 0) {
+      log.info("No masters running. Not attempting safe unload of tserver.");
+      return;
+    }
     for (String server : servers) {
       HostAndPort address = AddressUtil.parseAddress(server, ServerConfiguration.getDefaultConfiguration().getPort(Property.TSERV_CLIENTPORT));
       final String finalServer = address.toString();


Mime
View raw message