adjust the return values of RabitTracker.waitFor(), remove typesafe.Config

This commit is contained in:
CodingCat
2016-03-06 08:39:50 -05:00
parent 457ff82e33
commit f768edfede
3 changed files with 34 additions and 42 deletions

View File

@@ -134,15 +134,18 @@ public class RabitTracker {
}
}
public void waitFor() {
public int waitFor() {
try {
trackerProcess.get().waitFor();
logger.info("Tracker Process ends with exit code " + trackerProcess.get().exitValue());
int returnVal = trackerProcess.get().exitValue();
logger.info("Tracker Process ends with exit code " + returnVal);
stop();
return returnVal;
} catch (InterruptedException e) {
// we should not get here as RabitTracker is accessed in the main thread
e.printStackTrace();
logger.error("the RabitTracker thread is terminated unexpectedly");
return 1;
}
}
}