Author: tucu Date: Thu Dec 13 22:16:29 2012 New Revision: 1421575 URL: http://svn.apache.org/viewvc?rev=1421575&view=rev Log: YARN-264. y.s.rm.DelegationTokenRenewer attempts to renew token even after removing an app. (kkambatl via tucu)
Modified: hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java Modified: hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt?rev=1421575&r1=1421574&r2=1421575&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt (original) +++ hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt Thu Dec 13 22:16:29 2012 @@ -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 Modified: hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java?rev=1421575&r1=1421574&r2=1421575&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java (original) +++ hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java Thu Dec 13 22:16:29 2012 @@ -301,13 +301,18 @@ public class DelegationTokenRenewer exte */ 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 exte removeFailedDelegationToken(dttr); } } + + @Override + public synchronized boolean cancel() { + cancelled = true; + return super.cancel(); + } } /**