From bbabbe5ccb9b7d5248fd31eac7a45d40cfbb20dc Mon Sep 17 00:00:00 2001 From: Thomas Graves Date: Thu, 17 Apr 2014 15:25:27 +0000 Subject: [PATCH] Merge 1588281 to branch-2. YARN-1931. Private API change in YARN-1824 in 2.4 broke compatibility with previous releases (Sandy Ryza via tgraves) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1588283 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../org/apache/hadoop/yarn/util/Apps.java | 25 ++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 68e4dd64729..cdb051bf195 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -114,6 +114,9 @@ Release 2.4.1 - UNRELEASED YARN-1934. Fixed a potential NPE in ZKRMStateStore caused by handling Disconnected event from ZK. (Karthik Kambatla via jianhe) + YARN-1931. Private API change in YARN-1824 in 2.4 broke compatibility + with previous releases (Sandy Ryza via tgraves) + Release 2.4.0 - 2014-04-07 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/Apps.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/Apps.java index bf5ba7ba4cc..cf3940fd9c7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/Apps.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/Apps.java @@ -38,7 +38,7 @@ import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.exceptions.YarnRuntimeException; /** - * Yarn application related utilities + * Yarn internal application-related utilities */ @Private public class Apps { @@ -97,6 +97,17 @@ public class Apps { } } } + + /** + * This older version of this method is kept around for compatibility + * because downstream frameworks like Spark and Tez have been using it. + * Downstream frameworks are expected to move off of it. + */ + @Deprecated + public static void setEnvFromInputString(Map env, + String envString) { + setEnvFromInputString(env, envString, File.pathSeparator); + } @Public @Unstable @@ -112,6 +123,18 @@ public class Apps { environment.put(StringInterner.weakIntern(variable), StringInterner.weakIntern(val)); } + + /** + * This older version of this method is kept around for compatibility + * because downstream frameworks like Spark and Tez have been using it. + * Downstream frameworks are expected to move off of it. + */ + @Deprecated + public static void addToEnvironment( + Map environment, + String variable, String value) { + addToEnvironment(environment, variable, value, File.pathSeparator); + } public static String crossPlatformify(String var) { return ApplicationConstants.PARAMETER_EXPANSION_LEFT + var