From a8c120222047280234c3411ce1c1c9b17f08c851 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. --- 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 50b806fc9a..2369d503da 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/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 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 e6ded009b0..7906e6fd00 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 boolean init(String[] args) throws ParseException, IOException { 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 boolean init(String[] args) throws ParseException, IOException { } } + if (envs.containsKey(DSConstants.DISTRIBUTEDSHELLTIMELINEDOMAIN)) { + domainId = envs.get(DSConstants.DISTRIBUTEDSHELLTIMELINEDOMAIN); + } + containerMemory = Integer.parseInt(cliParser.getOptionValue( "container_memory", "10")); containerVirtualCores = Integer.parseInt(cliParser.getOptionValue(