hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1421582 - in /hadoop/common/branches/branch-1: CHANGES.txt src/mapred/org/apache/hadoop/mapreduce/security/token/DelegationTokenRenewal.java
Date Thu, 13 Dec 2012 22:32:25 GMT
Author: tucu
Date: Thu Dec 13 22:32:22 2012
New Revision: 1421582

URL: http://svn.apache.org/viewvc?rev=1421582&view=rev
Log:
MAPREDUCE-4860. DelegationTokenRenewal attempts to renew token even after a job is removed.
(kkambatl via tucu)

Modified:
    hadoop/common/branches/branch-1/CHANGES.txt
    hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapreduce/security/token/DelegationTokenRenewal.java

Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1421582&r1=1421581&r2=1421582&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Thu Dec 13 22:32:22 2012
@@ -330,6 +330,9 @@ Release 1.2.0 - unreleased
     HADOOP-8164. Handle paths using back slash as path separator for windows
     only. (Daryn Sharp, backported by Jing Zhao via suresh)
 
+    MAPREDUCE-4860. DelegationTokenRenewal attempts to renew token even after
+    a job is removed. (kkambatl via tucu)
+
 Release 1.1.2 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapreduce/security/token/DelegationTokenRenewal.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapreduce/security/token/DelegationTokenRenewal.java?rev=1421582&r1=1421581&r2=1421582&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapreduce/security/token/DelegationTokenRenewal.java
(original)
+++ hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapreduce/security/token/DelegationTokenRenewal.java
Thu Dec 13 22:32:22 2012
@@ -200,11 +200,16 @@ public class DelegationTokenRenewal {
    */
   private static 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
@@ -227,6 +232,12 @@ public class DelegationTokenRenewal {
         removeFailedDelegationToken(dttr);
       }
     }
+
+    @Override
+    public synchronized boolean cancel() {
+      cancelled = true;
+      return super.cancel();
+    }
   }
   
   /**



Mime
View raw message