ACCUMULO-2512 Wait for each MAC process to exit before returning from MAC.stop()
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0753a754 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0753a754 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0753a754 Branch: refs/heads/master Commit: 0753a754b0a1751ab7f2bb4ddd922aa9dd492252 Parents: bbd6aeb Author: Josh Elser <els...@apache.org> Authored: Thu Mar 20 16:35:04 2014 -0400 Committer: Josh Elser <els...@apache.org> Committed: Thu Mar 20 16:35:04 2014 -0400 ---------------------------------------------------------------------- .../accumulo/minicluster/MiniAccumuloCluster.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/0753a754/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java ---------------------------------------------------------------------- diff --git a/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java b/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java index cbed375..848e14f 100644 --- a/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java +++ b/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java @@ -362,22 +362,31 @@ public class MiniAccumuloCluster { */ public void stop() throws IOException, InterruptedException { - if (zooKeeperProcess != null) + if (zooKeeperProcess != null) { zooKeeperProcess.destroy(); - if (loggerProcess != null) + zooKeeperProcess.waitFor(); + } + if (loggerProcess != null) { loggerProcess.destroy(); - if (masterProcess != null) + loggerProcess.waitFor(); + } + if (masterProcess != null) { masterProcess.destroy(); + masterProcess.waitFor(); + } if (tabletServerProcesses != null) { for (Process tserver : tabletServerProcesses) { tserver.destroy(); + tserver.waitFor(); } } for (LogWriter lw : logWriters) lw.flush(); - if (gcProcess != null) + if (gcProcess != null) { gcProcess.destroy(); + gcProcess.waitFor(); + } } }