accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [34/50] [abbrv] accumulo git commit: ACCUMULO-3167 Don't fail trying to stop a process that doesn't exist anymore
Date Wed, 26 Nov 2014 04:23:50 GMT
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/1.6
Commit: 6169d8879c9c708320030c4f20858003be52fe0d
Parents: 1fb285d
Author: Josh Elser <elserj@apache.org>
Authored: Mon Nov 24 17:06:47 2014 -0500
Committer: Josh Elser <elserj@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);


Mime
View raw message