Przeglądaj źródła

YARN-2769. Fixed the problem that timeline domain is not set in distributed shell AM when using shell_command on Windows. Contributed by Varun Vasudev.

Zhijie Shen 10 lat temu
rodzic
commit
a8c1202220

+ 3 - 0
hadoop-yarn-project/CHANGES.txt

@@ -795,6 +795,9 @@ Release 2.6.0 - UNRELEASED
     YARN-2747. Fixed the test failure of TestAggregatedLogFormat when native I/O is
     enabled. (Xuan Gong via zjshen)
 
+    YARN-2769. Fixed the problem that timeline domain is not set in distributed shell
+    AM when using shell_command on Windows. (Varun Vasudev via zjshen)
+
 Release 2.5.1 - 2014-09-05
 
   INCOMPATIBLE CHANGES

+ 4 - 3
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java

@@ -470,9 +470,6 @@ public class ApplicationMaster {
         shellScriptPathLen = Long.valueOf(envs
             .get(DSConstants.DISTRIBUTEDSHELLSCRIPTLEN));
       }
-      if (envs.containsKey(DSConstants.DISTRIBUTEDSHELLTIMELINEDOMAIN)) {
-        domainId = envs.get(DSConstants.DISTRIBUTEDSHELLTIMELINEDOMAIN);
-      }
       if (!scriptPath.isEmpty()
           && (shellScriptPathTimestamp <= 0 || shellScriptPathLen <= 0)) {
         LOG.error("Illegal values in env for shell script path" + ", path="
@@ -483,6 +480,10 @@ public class ApplicationMaster {
       }
     }
 
+    if (envs.containsKey(DSConstants.DISTRIBUTEDSHELLTIMELINEDOMAIN)) {
+      domainId = envs.get(DSConstants.DISTRIBUTEDSHELLTIMELINEDOMAIN);
+    }
+
     containerMemory = Integer.parseInt(cliParser.getOptionValue(
         "container_memory", "10"));
     containerVirtualCores = Integer.parseInt(cliParser.getOptionValue(