ACCUMULO-3167 Don't fail trying to stop a process that doesn't exist anymore
Calling adminStopAll() and then stop() would fail because the stop would fail to find the pid of the process type it wanted to stop instead of just assuming it was dead. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/6169d887 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/6169d887 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/6169d887 Branch: refs/heads/metrics2 Commit: 6169d8879c9c708320030c4f20858003be52fe0d Parents: 1fb285d Author: Josh Elser <els...@apache.org> Authored: Mon Nov 24 17:06:47 2014 -0500 Committer: Josh Elser <els...@apache.org> Committed: Mon Nov 24 18:10:08 2014 -0500 ---------------------------------------------------------------------- .../accumulo/cluster/standalone/StandaloneClusterControl.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/6169d887/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 ab78823..50b8f60 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 @@ -236,6 +236,11 @@ public class StandaloneClusterControl implements ClusterControl { public void signal(ServerType server, String hostname, String signal) throws IOException { String pid = getPid(server, accumuloHome, hostname); + if (pid.trim().isEmpty()) { + log.debug("Found no processes for {} on {}", server, hostname); + return; + } + boolean isSignalNumber = false; try { Integer.parseInt(signal);