From 2f627164418c70a85f239ac09b0a7d9bfba21ad2 Mon Sep 17 00:00:00 2001 From: Zhijie Shen Date: Wed, 29 Oct 2014 12:05:14 -0700 Subject: [PATCH] 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. (cherry picked from commit 72496311def320987c31822776e8fbb73dfcc726) --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../applications/distributedshell/ApplicationMaster.java | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index ce71cab7913..2cc7a67309a 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -726,6 +726,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 diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java index e6ded009b0a..7906e6fd001 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java +++ b/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(