MAPREDUCE-6395. Improve the commit failure messages in MRAppMaster recovery. (Brahma Reddy Battula via gera)

(cherry picked from commit 10107243be)
This commit is contained in:
Gera Shegalov 2015-06-19 02:22:59 -07:00
parent 86b75ac544
commit 01991876ed
2 changed files with 13 additions and 4 deletions

View File

@ -85,6 +85,9 @@ Release 2.8.0 - UNRELEASED
MAPREDUCE-6392. Document mapred class path options.
(Brahma Reddy Battula via cnauroth)
MAPREDUCE-6395. Improve the commit failure messages in MRAppMaster recovery.
(Brahma Reddy Battula via gera)
OPTIMIZATIONS
BUG FIXES

View File

@ -331,14 +331,20 @@ protected void serviceInit(final Configuration conf) throws Exception {
" because a commit was started.");
copyHistory = true;
if (commitSuccess) {
shutDownMessage = "We crashed after successfully committing. Recovering.";
shutDownMessage =
"Job commit succeeded in a prior MRAppMaster attempt " +
"before it crashed. Recovering.";
forcedState = JobStateInternal.SUCCEEDED;
} else if (commitFailure) {
shutDownMessage = "We crashed after a commit failure.";
shutDownMessage =
"Job commit failed in a prior MRAppMaster attempt " +
"before it crashed. Not retrying.";
forcedState = JobStateInternal.FAILED;
} else {
//The commit is still pending, commit error
shutDownMessage = "We crashed durring a commit";
shutDownMessage =
"Job commit from a prior MRAppMaster attempt is " +
"potentially in progress. Preventing multiple commit executions";
forcedState = JobStateInternal.ERROR;
}
}
@ -564,7 +570,7 @@ public void shutDownJob() {
//if isLastAMRetry comes as true, should never set it to false
if ( !isLastAMRetry){
if (((JobImpl)job).getInternalState() != JobStateInternal.REBOOT) {
LOG.info("We are finishing cleanly so this is the last retry");
LOG.info("Job finished cleanly, recording last MRAppMaster retry");
isLastAMRetry = true;
}
}