You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/12/02 21:37:16 UTC
[28/50] [abbrv] accumulo git commit: ACCUMULO-3167 Make sure that
ClusterControl.adminStopAll throws an error on failure
ACCUMULO-3167 Make sure that ClusterControl.adminStopAll throws an error on failure
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1fb285d7
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1fb285d7
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1fb285d7
Branch: refs/heads/metrics2
Commit: 1fb285d7777280228289b1c7ce4bf07579dc1cf3
Parents: ee1694c
Author: Josh Elser <el...@apache.org>
Authored: Mon Nov 24 16:38:54 2014 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Mon Nov 24 18:10:07 2014 -0500
----------------------------------------------------------------------
.../main/java/org/apache/accumulo/cluster/ClusterControl.java | 2 +-
.../accumulo/cluster/standalone/StandaloneClusterControl.java | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/1fb285d7/minicluster/src/main/java/org/apache/accumulo/cluster/ClusterControl.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/cluster/ClusterControl.java b/minicluster/src/main/java/org/apache/accumulo/cluster/ClusterControl.java
index be4a8fd..e5ab27f 100644
--- a/minicluster/src/main/java/org/apache/accumulo/cluster/ClusterControl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/cluster/ClusterControl.java
@@ -37,7 +37,7 @@ public interface ClusterControl {
Entry<Integer,String> execWithStdout(Class<?> clz, String[] args) throws IOException;
/**
- * Issue an orderly shutdown of the cluster
+ * Issue an orderly shutdown of the cluster, throws an exception if it fails to return successfully (return value of 0).
*/
void adminStopAll() throws IOException;
http://git-wip-us.apache.org/repos/asf/accumulo/blob/1fb285d7/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java b/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
index 378cb6b..ab78823 100644
--- a/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
@@ -130,7 +130,10 @@ public class StandaloneClusterControl implements ClusterControl {
File confDir = getConfDir();
String master = getHosts(new File(confDir, "masters")).get(0);
String[] cmd = new String[] { accumuloPath, Admin.class.getName(), "stopAll" };
- exec(master, cmd);
+ Entry<Integer,String> pair = exec(master, cmd);
+ if (0 != pair.getKey().intValue()) {
+ throw new IOException("stopAll did not finish successfully, retcode=" + pair.getKey() + ", stdout=" + pair.getValue());
+ }
}
@Override