Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2B057109D4 for ; Wed, 26 Nov 2014 04:23:21 +0000 (UTC) Received: (qmail 42282 invoked by uid 500); 26 Nov 2014 04:23:21 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 42184 invoked by uid 500); 26 Nov 2014 04:23:21 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 40243 invoked by uid 99); 26 Nov 2014 04:23:18 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Nov 2014 04:23:18 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 650EF32A4A5; Wed, 26 Nov 2014 04:23:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: elserj@apache.org To: commits@accumulo.apache.org Date: Wed, 26 Nov 2014 04:23:48 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [32/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/master Commit: 1fb285d7777280228289b1c7ce4bf07579dc1cf3 Parents: ee1694c Author: Josh Elser Authored: Mon Nov 24 16:38:54 2014 -0500 Committer: Josh Elser 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 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 pair = exec(master, cmd); + if (0 != pair.getKey().intValue()) { + throw new IOException("stopAll did not finish successfully, retcode=" + pair.getKey() + ", stdout=" + pair.getValue()); + } } @Override