Skip to content

Commit 1bc21a1

Browse files
author
Alejandro Abdelnur
committed
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
1 parent 91432fe commit 1bc21a1

File tree

2 files changed

+15
-1
lines changed
  • hadoop-yarn-project

2 files changed

+15
-1
lines changed

hadoop-yarn-project/CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ Release 2.0.3-alpha - Unreleased
125125

126126
YARN-267. Fix fair scheduler web UI. (Sandy Ryza via tomwhite)
127127

128+
YARN-264. y.s.rm.DelegationTokenRenewer attempts to renew token even
129+
after removing an app. (kkambatl via tucu)
130+
128131
Release 2.0.2-alpha - 2012-09-07
129132

130133
INCOMPATIBLE CHANGES

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,18 @@ public synchronized void addApplication(
301301
*/
302302
private class RenewalTimerTask extends TimerTask {
303303
private DelegationTokenToRenew dttr;
304+
private boolean cancelled = false;
304305

305306
RenewalTimerTask(DelegationTokenToRenew t) {
306307
dttr = t;
307308
}
308309

309310
@Override
310-
public void run() {
311+
public synchronized void run() {
312+
if (cancelled) {
313+
return;
314+
}
315+
311316
Token<?> token = dttr.token;
312317
try {
313318
// need to use doAs so that http can find the kerberos tgt
@@ -331,6 +336,12 @@ public Long run() throws Exception {
331336
removeFailedDelegationToken(dttr);
332337
}
333338
}
339+
340+
@Override
341+
public synchronized boolean cancel() {
342+
cancelled = true;
343+
return super.cancel();
344+
}
334345
}
335346

336347
/**

0 commit comments

Comments
 (0)