You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ww...@apache.org on 2019/03/11 08:56:41 UTC

[hadoop] branch branch-3.1 updated: MAPREDUCE-7191. JobHistoryServer should log exception when loading/parsing history file failed. Contributed by Jiandan Yang.

This is an automated email from the ASF dual-hosted git repository.

wwei pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new fdd56b5  MAPREDUCE-7191. JobHistoryServer should log exception when loading/parsing history file failed. Contributed by Jiandan Yang.
fdd56b5 is described below

commit fdd56b5b0520cbde166b88c1707247ef150a8f22
Author: Weiwei Yang <ww...@apache.org>
AuthorDate: Mon Mar 11 15:02:54 2019 +0800

    MAPREDUCE-7191. JobHistoryServer should log exception when loading/parsing history file failed. Contributed by Jiandan Yang.
    
    (cherry picked from commit f0605146b34ddbd19fc9e52d4761f9a347d5173e)
---
 .../org/apache/hadoop/mapreduce/v2/hs/CompletedJob.java   | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/CompletedJob.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/CompletedJob.java
index a4e75f7..e9a6a64 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/CompletedJob.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/CompletedJob.java
@@ -380,17 +380,20 @@ public class CompletedJob implements org.apache.hadoop.mapreduce.v2.app.job.Job
         parser = createJobHistoryParser(historyFileAbsolute);
         this.jobInfo = parser.parse();
       } catch (IOException e) {
-        throw new YarnRuntimeException("Could not load history file "
-            + historyFileAbsolute, e);
+        String errorMsg = "Could not load history file " + historyFileAbsolute;
+        LOG.warn(errorMsg, e);
+        throw new YarnRuntimeException(errorMsg, e);
       }
       IOException parseException = parser.getParseException(); 
       if (parseException != null) {
-        throw new YarnRuntimeException(
-            "Could not parse history file " + historyFileAbsolute, 
-            parseException);
+        String errorMsg = "Could not parse history file " + historyFileAbsolute;
+        LOG.warn(errorMsg, parseException);
+        throw new YarnRuntimeException(errorMsg, parseException);
       }
     } else {
-      throw new IOException("History file not found");
+      String errorMsg = "History file not found";
+      LOG.warn(errorMsg);
+      throw new IOException(errorMsg);
     }
     if (loadTasks) {
       loadAllTasks();


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org