Repository: hadoop Updated Branches: refs/heads/trunk f5a72424c -> 17ba74be2
YARN-7630. Fix AMRMToken rollover handling in AMRMProxy. Contributed by Botong Huang. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/17ba74be Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/17ba74be Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/17ba74be Branch: refs/heads/trunk Commit: 17ba74be29193ac15474f73baaaf4e647a95078b Parents: f5a7242 Author: Subru Krishnan <[email protected]> Authored: Thu Dec 14 14:03:55 2017 -0800 Committer: Subru Krishnan <[email protected]> Committed: Thu Dec 14 14:03:55 2017 -0800 ---------------------------------------------------------------------- .../org/apache/hadoop/yarn/server/utils/AMRMClientUtils.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/17ba74be/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/utils/AMRMClientUtils.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/utils/AMRMClientUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/utils/AMRMClientUtils.java index 3cecdca..37e2b5e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/utils/AMRMClientUtils.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/utils/AMRMClientUtils.java @@ -163,8 +163,12 @@ public final class AMRMClientUtils { LOG.info("Creating RMProxy to RM {} for protocol {} for user {}", rmClusterId, protocol.getSimpleName(), user); if (token != null) { - token.setService(ClientRMProxy.getAMRMTokenService(configuration)); + // preserve the token service sent by the RM when adding the token + // to ensure we replace the previous token setup by the RM. + // Afterwards we can update the service address for the RPC layer. + // Same as YarnServerSecurityUtils.updateAMRMToken() user.addToken(token); + token.setService(ClientRMProxy.getAMRMTokenService(configuration)); setAuthModeInConf(configuration); } final T proxyConnection = user.doAs(new PrivilegedExceptionAction<T>() { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
