From e3769ea1d2d088b169a78a1a1127848b2b2b8cbd Mon Sep 17 00:00:00 2001 From: Vinod Kumar Vavilapalli Date: Sun, 16 Jun 2013 20:33:30 +0000 Subject: [PATCH] YARN-829. Renamed RMTokenSelector to be RMDelegationTokenSelector. Contributed by Zhijie Shen. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1493577 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/hadoop/mapred/YARNRunner.java | 4 ++-- hadoop-yarn-project/CHANGES.txt | 5 ++++- .../hadoop/yarn/security/client/ClientRMSecurityInfo.java | 2 +- .../{RMTokenSelector.java => RMDelegationTokenSelector.java} | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) rename hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/{RMTokenSelector.java => RMDelegationTokenSelector.java} (95%) diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java index 9814ec9c983..aefa7552010 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java @@ -82,7 +82,7 @@ import org.apache.hadoop.yarn.exceptions.YarnException; import org.apache.hadoop.yarn.exceptions.YarnRuntimeException; import org.apache.hadoop.yarn.factories.RecordFactory; import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider; -import org.apache.hadoop.yarn.security.client.RMTokenSelector; +import org.apache.hadoop.yarn.security.client.RMDelegationTokenSelector; import org.apache.hadoop.yarn.util.ConverterUtils; import org.apache.hadoop.yarn.util.ProtoUtils; @@ -187,7 +187,7 @@ public class YARNRunner implements ClientProtocol { * note that get delegation token was called. Again this is hack for oozie * to make sure we add history server delegation tokens to the credentials */ - RMTokenSelector tokenSelector = new RMTokenSelector(); + RMDelegationTokenSelector tokenSelector = new RMDelegationTokenSelector(); Text service = SecurityUtil.buildTokenService(resMgrDelegate .getConnectAddress()); if (tokenSelector.selectToken(service, ts.getAllTokens()) != null) { diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index a52ec9c4eb7..3b10f1ae809 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -147,11 +147,14 @@ Release 2.1.0-beta - UNRELEASED He via vinodkv) YARN-821. Renamed setFinishApplicationStatus to setFinalApplicationStatus in - FinishApplicationMasterRequest for consistency. (Jian He via vinodk) + FinishApplicationMasterRequest for consistency. (Jian He via vinodkv) YARN-787. Removed minimum resource from RegisterApplicationMasterResponse. (tucu via acmurthy) + YARN-829. Renamed RMTokenSelector to be RMDelegationTokenSelector. (Zhijie + Shen via vinodkv) + NEW FEATURES YARN-482. FS: Extend SchedulingMode to intermediate queues. diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/ClientRMSecurityInfo.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/ClientRMSecurityInfo.java index 0e1e6781a51..2dcefd9c00b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/ClientRMSecurityInfo.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/ClientRMSecurityInfo.java @@ -72,7 +72,7 @@ public class ClientRMSecurityInfo extends SecurityInfo { @Override public Class> value() { - return RMTokenSelector.class; + return RMDelegationTokenSelector.class; } }; } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/RMTokenSelector.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/RMDelegationTokenSelector.java similarity index 95% rename from hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/RMTokenSelector.java rename to hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/RMDelegationTokenSelector.java index 2b59337984e..5cb54dc52ed 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/RMTokenSelector.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/RMDelegationTokenSelector.java @@ -27,11 +27,11 @@ import org.apache.hadoop.security.token.Token; import org.apache.hadoop.security.token.TokenIdentifier; import org.apache.hadoop.security.token.TokenSelector; -public class RMTokenSelector implements +public class RMDelegationTokenSelector implements TokenSelector { private static final Log LOG = LogFactory - .getLog(RMTokenSelector.class); + .getLog(RMDelegationTokenSelector.class); @SuppressWarnings("unchecked") public Token selectToken(Text service,