From d1abc5d4fc00bb1b226066684556ba16ace71744 Mon Sep 17 00:00:00 2001 From: Xuan Date: Fri, 6 Mar 2015 13:32:05 -0800 Subject: [PATCH] YARN-3227. Timeline renew delegation token fails when RM user's TGT is expired. Contributed by Zhijie Shen --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../apache/hadoop/yarn/client/api/impl/TimelineClientImpl.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index accde785c8e..d073169d384 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -713,6 +713,9 @@ Release 2.7.0 - UNRELEASED YARN-3242. Asynchrony in ZK-close can lead to ZKRMStateStore watcher receiving events for old client. (Zhihai Xu via kasha) + YARN-3227. Timeline renew delegation token fails when RM user's TGT is expired + (Zhijie Shen via xgong) + Release 2.6.0 - 2014-11-18 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineClientImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineClientImpl.java index af684929e1d..c05d65bbe82 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineClientImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineClientImpl.java @@ -439,6 +439,7 @@ public class TimelineClientImpl extends TimelineClient { UserGroupInformation callerUGI = isProxyAccess ? UserGroupInformation.getCurrentUser().getRealUser() : UserGroupInformation.getCurrentUser(); + callerUGI.checkTGTAndReloginFromKeytab(); try { return callerUGI.doAs(action); } catch (UndeclaredThrowableException e) { @@ -488,6 +489,7 @@ public class TimelineClientImpl extends TimelineClient { : UserGroupInformation.getCurrentUser(); final String doAsUser = isProxyAccess ? UserGroupInformation.getCurrentUser().getShortUserName() : null; + callerUGI.checkTGTAndReloginFromKeytab(); try { return callerUGI.doAs(new PrivilegedExceptionAction() { @Override