hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtcarre...@apache.org
Subject hadoop git commit: YARN-6999. Add log about how to solve Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster. (Linlin Zhou via gtcarrera9)
Date Sat, 26 Aug 2017 05:49:43 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 c22b5108d -> b7f319c53


YARN-6999. Add log about how to solve Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster.
(Linlin Zhou via gtcarrera9)

(cherry picked from commit 3bee7046c52bff681a5aecc956ba9be6c3543397)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/b7f319c5
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b7f319c5
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b7f319c5

Branch: refs/heads/branch-2
Commit: b7f319c53c51e72c8df8cc92df5ec7fe1ab303b1
Parents: c22b510
Author: Li Lu <gtcarrera9@apache.org>
Authored: Fri Aug 25 22:43:25 2017 -0700
Committer: Li Lu <gtcarrera9@apache.org>
Committed: Fri Aug 25 22:45:20 2017 -0700

----------------------------------------------------------------------
 .../launcher/ContainerLaunch.java               | 27 +++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b7f319c5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java
index 987bc30..c2d8222 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java
@@ -540,9 +540,11 @@ public class ContainerLaunch implements Callable<Integer> {
         errorFileIS = fileSystem.open(errorFile);
         errorFileIS.readFully(startPosition, tailBuffer);
 
+        String tailBufferMsg = new String(tailBuffer, StandardCharsets.UTF_8);
         diagnosticInfo.append("Last ").append(tailSizeInBytes)
             .append(" bytes of ").append(errorFile.getName()).append(" :\n")
-            .append(new String(tailBuffer, StandardCharsets.UTF_8));
+            .append(tailBufferMsg).append("\n")
+            .append(analysesErrorMsgOfContainerExitWithFailure(tailBufferMsg));
       }
     } catch (IOException e) {
       LOG.error("Failed to get tail of the container's error log file", e);
@@ -556,6 +558,29 @@ public class ContainerLaunch implements Callable<Integer> {
             diagnosticInfo.toString()));
   }
 
+  private String analysesErrorMsgOfContainerExitWithFailure(String errorMsg) {
+    StringBuilder analysis = new StringBuilder();
+    if (errorMsg.indexOf("Error: Could not find or load main class"
+        + " org.apache.hadoop.mapreduce") != -1) {
+      analysis.append("Please check whether your etc/hadoop/mapred-site.xml "
+          + "contains the below configuration:\n");
+      analysis.append("<property>\n")
+          .append("  <name>yarn.app.mapreduce.am.env</name>\n")
+          .append("  <value>HADOOP_MAPRED_HOME=${full path of your hadoop "
+              + "distribution directory}</value>\n")
+          .append("</property>\n<property>\n")
+          .append("  <name>mapreduce.map.env</name>\n")
+          .append("  <value>HADOOP_MAPRED_HOME=${full path of your hadoop "
+              + "distribution directory}</value>\n")
+          .append("</property>\n<property>\n")
+          .append("  <name>mapreduce.reduce.e nv</name>\n")
+          .append("  <value>HADOOP_MAPRED_HOME=${full path of your hadoop "
+              + "distribution directory}</value>\n")
+          .append("</property>\n");
+    }
+    return analysis.toString();
+  }
+
   protected String getPidFileSubpath(String appIdStr, String containerIdStr) {
     return getContainerPrivateDir(appIdStr, containerIdStr) + Path.SEPARATOR
         + String.format(ContainerLaunch.PID_FILE_NAME_FMT, containerIdStr);


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


Mime
View raw message