diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index abc24a7492c..ec9ba31a4e2 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -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 diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java index 23eb72ed9b7..e5abbb7ede9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java @@ -301,13 +301,18 @@ public class DelegationTokenRenewer extends AbstractService { */ 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 class DelegationTokenRenewer extends AbstractService { removeFailedDelegationToken(dttr); } } + + @Override + public synchronized boolean cancel() { + cancelled = true; + return super.cancel(); + } } /**