accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [02/50] [abbrv] accumulo git commit: ACCUMULO-3167 Make sure MAC process members get cleaned up correctly after stop()
Date Tue, 02 Dec 2014 20:36:50 GMT
ACCUMULO-3167 Make sure MAC process members get cleaned up correctly after stop()


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

Branch: refs/heads/metrics2
Commit: 7289bce7e86ac19d2661adc350acf1797ace19f5
Parents: f5e5d2d
Author: Josh Elser <elserj@apache.org>
Authored: Tue Nov 18 23:20:50 2014 -0500
Committer: Josh Elser <elserj@apache.org>
Committed: Mon Nov 24 18:07:52 2014 -0500

----------------------------------------------------------------------
 .../impl/MiniAccumuloClusterControl.java        | 31 ++++++++++++--------
 1 file changed, 19 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7289bce7/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
index a685fd9..cd1a923 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
@@ -143,8 +143,9 @@ public class MiniAccumuloClusterControl implements ClusterControl {
             log.warn("Master did not fully stop after 30 seconds", e);
           } catch (InterruptedException e) {
             Thread.currentThread().interrupt();
+          } finally {
+            masterProcess = null;
           }
-          masterProcess = null;
         }
         break;
       case GARBAGE_COLLECTOR:
@@ -157,8 +158,9 @@ public class MiniAccumuloClusterControl implements ClusterControl {
             log.warn("Garbage collector did not fully stop after 30 seconds", e);
           } catch (InterruptedException e) {
             Thread.currentThread().interrupt();
+          } finally {
+            gcProcess = null;
           }
-          gcProcess = null;
         }
         break;
       case ZOOKEEPER:
@@ -171,26 +173,31 @@ public class MiniAccumuloClusterControl implements ClusterControl {
             log.warn("ZooKeeper did not fully stop after 30 seconds", e);
           } catch (InterruptedException e) {
             Thread.currentThread().interrupt();
+          } finally {
+            zooKeeperProcess = null;
           }
         }
         break;
       case TABLET_SERVER:
         if (tabletServerProcesses != null) {
           synchronized (tabletServerProcesses) {
-            for (Process tserver : tabletServerProcesses) {
-              try {
-                cluster.stopProcessWithTimeout(tserver, 30, TimeUnit.SECONDS);
-              } catch (ExecutionException e) {
-                log.warn("TabletServer did not fully stop after 30 seconds", e);
-              } catch (TimeoutException e) {
-                log.warn("TabletServer did not fully stop after 30 seconds", e);
-              } catch (InterruptedException e) {
-                Thread.currentThread().interrupt();
+            try {
+              for (Process tserver : tabletServerProcesses) {
+                try {
+                  cluster.stopProcessWithTimeout(tserver, 30, TimeUnit.SECONDS);
+                } catch (ExecutionException e) {
+                  log.warn("TabletServer did not fully stop after 30 seconds", e);
+                } catch (TimeoutException e) {
+                  log.warn("TabletServer did not fully stop after 30 seconds", e);
+                } catch (InterruptedException e) {
+                  Thread.currentThread().interrupt();
+                }
               }
+            } finally {
+              tabletServerProcesses.clear();
             }
           }
 
-          tabletServerProcesses.clear();
         }
         break;
       default:


Mime
View raw message