log tracker exit value in logger

capture InterruptedException
This commit is contained in:
CodingCat 2016-03-06 17:02:07 -05:00
parent 718a9d8c96
commit c211a80633

View File

@ -47,8 +47,15 @@ public class RabitTracker {
while ((line = reader.readLine()) != null) {
trackerProcessLogger.info(line);
}
trackerProcess.get().waitFor();
trackerProcessLogger.info("Tracker Process ends with exit code " +
trackerProcess.get().exitValue());
} catch (IOException ex) {
trackerProcessLogger.error(ex.toString());
} catch (InterruptedException ie) {
// we should not get here as RabitTracker is accessed in the main thread
ie.printStackTrace();
logger.error("the RabitTracker thread is terminated unexpectedly");
}
}
}