YARN-264. y.s.rm.DelegationTokenRenewer attempts to renew token even after removing an app. (kkambatl via tucu)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1421575 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f6f7152995
commit
be8ef2ec33
@ -125,6 +125,9 @@ Release 2.0.3-alpha - Unreleased
|
||||
|
||||
YARN-267. Fix fair scheduler web UI. (Sandy Ryza via tomwhite)
|
||||
|
||||
YARN-264. y.s.rm.DelegationTokenRenewer attempts to renew token even
|
||||
after removing an app. (kkambatl via tucu)
|
||||
|
||||
Release 2.0.2-alpha - 2012-09-07
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -301,13 +301,18 @@ public synchronized void addApplication(
|
||||
*/
|
||||
private class RenewalTimerTask extends TimerTask {
|
||||
private DelegationTokenToRenew dttr;
|
||||
private boolean cancelled = false;
|
||||
|
||||
RenewalTimerTask(DelegationTokenToRenew t) {
|
||||
dttr = t;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
public synchronized void run() {
|
||||
if (cancelled) {
|
||||
return;
|
||||
}
|
||||
|
||||
Token<?> token = dttr.token;
|
||||
try {
|
||||
// need to use doAs so that http can find the kerberos tgt
|
||||
@ -331,6 +336,12 @@ public Long run() throws Exception {
|
||||
removeFailedDelegationToken(dttr);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized boolean cancel() {
|
||||
cancelled = true;
|
||||
return super.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user