diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 421e5ea613a..d44f46d9dd5 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -175,6 +175,9 @@ Release 2.7.0 - UNRELEASED YARN-2894. Fixed a bug regarding application view acl when RM fails over. (Rohith Sharmaks via jianhe) + YARN-2874. Dead lock in "DelegationTokenRenewer" which blocks RM to execute + any further apps. (Naganarasimha G R via kasha) + Release 2.6.0 - 2014-11-18 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 2dc331e50bf..cca6e8df0da 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 @@ -20,7 +20,6 @@ package org.apache.hadoop.yarn.server.resourcemanager.security; import java.io.IOException; import java.nio.ByteBuffer; -import java.security.PrivilegedAction; import java.security.PrivilegedExceptionAction; import java.util.ArrayList; import java.util.Collection; @@ -39,6 +38,7 @@ import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; @@ -445,15 +445,15 @@ public class DelegationTokenRenewer extends AbstractService { */ private class RenewalTimerTask extends TimerTask { private DelegationTokenToRenew dttr; - private boolean cancelled = false; + private AtomicBoolean cancelled = new AtomicBoolean(false); RenewalTimerTask(DelegationTokenToRenew t) { dttr = t; } @Override - public synchronized void run() { - if (cancelled) { + public void run() { + if (cancelled.get()) { return; } @@ -475,8 +475,8 @@ public class DelegationTokenRenewer extends AbstractService { } @Override - public synchronized boolean cancel() { - cancelled = true; + public boolean cancel() { + cancelled.set(true); return super.cancel(); } }