YARN-3227. Timeline renew delegation token fails when RM user's TGT is

expired. Contributed by Zhijie Shen

(cherry picked from commit d1abc5d4fc)
This commit is contained in:
Xuan 2015-03-06 13:32:05 -08:00
parent 994dadb9ba
commit 56c2050ab7
2 changed files with 5 additions and 0 deletions

View File

@ -671,6 +671,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

View File

@ -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<HttpURLConnection>() {
@Override