From 10107243be66bae2212a2cd8575f9f5ade13fe9e Mon Sep 17 00:00:00 2001 From: Gera Shegalov Date: Fri, 19 Jun 2015 02:22:59 -0700 Subject: [PATCH] MAPREDUCE-6395. Improve the commit failure messages in MRAppMaster recovery. (Brahma Reddy Battula via gera) --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../hadoop/mapreduce/v2/app/MRAppMaster.java | 14 ++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 1037091af5a..7e57804be1f 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -349,6 +349,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 diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java index 752b30ccf3c..0d3519b1c67 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java @@ -334,14 +334,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; } } @@ -582,7 +588,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; } }