Skip to content
Permalink
Browse files
JIRA-1159
closes #48
  • Loading branch information
Maja Kabiljo committed Sep 19, 2017
1 parent d4db3a6 commit b8f966acb480b84e8076a539b346a1ba6b29af69
Showing 1 changed file with 12 additions and 3 deletions.
@@ -152,13 +152,22 @@ protected boolean canFinishInTime(GiraphConfiguration conf, Job job,
* Kill job with message describing why it's being killed
*
* @param message Message describing why job is being killed
* @return True iff job was killed successfully, false if job was already
* done or kill failed
*/
protected void killJobWithMessage(String message) {
LOG.error(message);
protected boolean killJobWithMessage(String message) {
try {
job.killJob();
if (job.isComplete()) {
LOG.info("Job " + job.getJobID() + " is already done");
return false;
} else {
LOG.error(message);
job.killJob();
return true;
}
} catch (IOException e) {
LOG.error("Failed to kill the job", e);
return false;
}
}

0 comments on commit b8f966a

Please sign in to comment.