From 72a08508c943c8d81e6940506a35cf44c4516587 Mon Sep 17 00:00:00 2001 From: Vinod Kumar Vavilapalli Date: Sat, 27 Jul 2013 18:51:01 +0000 Subject: [PATCH] YARN-960. Fixed ResourceManager to propagate client-submitted credentials irrespective of security. Contributed by Daryn Sharp. svn merge --ignore-ancestry -c 1507700 ../../trunk/ git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1507701 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../resourcemanager/amlauncher/AMLauncher.java | 15 +++++---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 2044ea7061f..2a09800b684 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -739,6 +739,9 @@ Release 2.1.0-beta - 2013-07-02 YARN-688. Fixed NodeManager to properly cleanup containers when it is shut down. (Jian He via vinodkv) + YARN-960. Fixed ResourceManager to propagate client-submitted credentials + irrespective of security. (Daryn Sharp via vinodkv) + BREAKDOWN OF HADOOP-8562/YARN-191 SUBTASKS AND RELATED JIRAS YARN-158. Yarn creating package-info.java must not depend on sh. diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/amlauncher/AMLauncher.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/amlauncher/AMLauncher.java index 7dc19b5829d..6b8eacded67 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/amlauncher/AMLauncher.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/amlauncher/AMLauncher.java @@ -216,16 +216,11 @@ public class AMLauncher implements Runnable { applicationId).getMaxAppAttempts())); Credentials credentials = new Credentials(); - - if (UserGroupInformation.isSecurityEnabled()) { - // TODO: Security enabled/disabled info should come from RM. - - DataInputByteBuffer dibb = new DataInputByteBuffer(); - if (container.getTokens() != null) { - // TODO: Don't do this kind of checks everywhere. - dibb.reset(container.getTokens()); - credentials.readTokenStorageStream(dibb); - } + DataInputByteBuffer dibb = new DataInputByteBuffer(); + if (container.getTokens() != null) { + // TODO: Don't do this kind of checks everywhere. + dibb.reset(container.getTokens()); + credentials.readTokenStorageStream(dibb); } // Add AMRMToken