shut down previous clusters again
diff --git a/genomix/genomix-data/src/main/java/edu/uci/ics/genomix/minicluster/GenomixClusterManager.java b/genomix/genomix-data/src/main/java/edu/uci/ics/genomix/minicluster/GenomixClusterManager.java
index 7127d98..68d10e0 100644
--- a/genomix/genomix-data/src/main/java/edu/uci/ics/genomix/minicluster/GenomixClusterManager.java
+++ b/genomix/genomix-data/src/main/java/edu/uci/ics/genomix/minicluster/GenomixClusterManager.java
@@ -219,7 +219,7 @@
}
private static void shutdownCC() throws IOException, InterruptedException {
- LOG.info("Shutting down CC");
+ LOG.info("Shutting down any previous CC");
String stopCCCmd = System.getProperty("app.home", ".") + File.separator + "bin" + File.separator + "stopcc.sh";
Process p = Runtime.getRuntime().exec(stopCCCmd);
p.waitFor(); // wait for cmd execution
@@ -254,7 +254,8 @@
private void removeClusterShutdownHook(final ClusterType clusterType) {
if (!shutdownHooks.containsKey(clusterType))
- throw new IllegalArgumentException("There is no shutdown hook for " + clusterType + "!");
+// throw new IllegalArgumentException("There is no shutdown hook for " + clusterType + "!");
+ return; // ignore-- we are cleaning up after a previous run
try {
Runtime.getRuntime().removeShutdownHook(shutdownHooks.get(clusterType));
} catch (IllegalStateException e) {
diff --git a/genomix/genomix-driver/src/main/java/edu/uci/ics/genomix/driver/GenomixDriver.java b/genomix/genomix-driver/src/main/java/edu/uci/ics/genomix/driver/GenomixDriver.java
index cf0a9da..e03916d 100644
--- a/genomix/genomix-driver/src/main/java/edu/uci/ics/genomix/driver/GenomixDriver.java
+++ b/genomix/genomix-driver/src/main/java/edu/uci/ics/genomix/driver/GenomixDriver.java
@@ -133,6 +133,7 @@
stepNum = 0;
runLocal = Boolean.parseBoolean(conf.get(GenomixJobConf.RUN_LOCAL));
manager = new GenomixClusterManager(runLocal, conf);
+ manager.stopCluster(ClusterType.HYRACKS); // shut down any existing NCs and CCs
String localInput = conf.get(GenomixJobConf.LOCAL_INPUT_DIR);
if (localInput != null) {