From db7b5e12d09c04814adc853630c9e3181e11c5a2 Mon Sep 17 00:00:00 2001 From: Vinod Kumar Vavilapalli Date: Sun, 31 Mar 2013 19:18:42 +0000 Subject: [PATCH] YARN-475. Remove a unused constant in the public API - ApplicationConstants.AM_APP_ATTEMPT_ID_ENV. Contributed by Hitesh Shah. svn merge --ignore-ancestry -c 1463033 ../../trunk/ git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1463034 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../org/apache/hadoop/yarn/api/ApplicationConstants.java | 6 ------ .../unmanagedamlauncher/UnmanagedAMLauncher.java | 9 +++++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 4d1a9acbb01..26b626d062f 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -48,6 +48,9 @@ Release 2.0.5-beta - UNRELEASED YARN-450. Define value for * in the scheduling protocol (Zhijie Shen via bikas) + YARN-475. Remove a unused constant in the public API - + ApplicationConstants.AM_APP_ATTEMPT_ID_ENV. (Hitesh Shah via vinodkv) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationConstants.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationConstants.java index 116c692209e..617d4ff2d5a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationConstants.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationConstants.java @@ -41,12 +41,6 @@ public interface ApplicationConstants { * only */ public static final String AM_CONTAINER_ID_ENV = "AM_CONTAINER_ID"; - - /** - * The environment variable for APPLICATION_ATTEMPT_ID. Set in AppMaster - * environment only - */ - public static final String AM_APP_ATTEMPT_ID_ENV = "AM_APP_ATTEMPT_ID"; /** * The environment variable for the NM_HOST. Set in the AppMaster environment diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-unmanaged-am-launcher/src/main/java/org/apache/hadoop/yarn/applications/unmanagedamlauncher/UnmanagedAMLauncher.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-unmanaged-am-launcher/src/main/java/org/apache/hadoop/yarn/applications/unmanagedamlauncher/UnmanagedAMLauncher.java index 62ac67fc170..605dc3b23dc 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-unmanaged-am-launcher/src/main/java/org/apache/hadoop/yarn/applications/unmanagedamlauncher/UnmanagedAMLauncher.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-unmanaged-am-launcher/src/main/java/org/apache/hadoop/yarn/applications/unmanagedamlauncher/UnmanagedAMLauncher.java @@ -57,10 +57,11 @@ import org.apache.hadoop.yarn.util.Records; * unmanagedAM is an AM that is not launched and managed by the RM. The client * creates a new application on the RM and negotiates a new attempt id. Then it * waits for the RM app state to reach be YarnApplicationState.ACCEPTED after - * which it spawns the AM in another process and passes it the attempt id via - * env variable ApplicationConstants.AM_APP_ATTEMPT_ID_ENV. The AM can be in any - * language. The AM can register with the RM using the attempt id and proceed as - * normal. The client redirects app stdout and stderr to its own stdout and + * which it spawns the AM in another process and passes it the container id via + * env variable ApplicationConstants.AM_CONTAINER_ID_ENV. The AM can be in any + * language. The AM can register with the RM using the attempt id obtained + * from the container id and proceed as normal. + * The client redirects app stdout and stderr to its own stdout and * stderr and waits for the AM process to exit. Then it waits for the RM to * report app completion. */