YARN-2874. Dead lock in DelegationTokenRenewer which blocks RM to execute any further apps. (Naganarasimha G R via kasha)
(cherry picked from commit 799353e2c7db5af6e40e3521439b5c8a3c5c6a51) (cherry picked from commit 25be97808b99148412c0efd4d87fc750db4d6607) (cherry picked from commit d82bf536d44c6e7ba06a01105545b3979b731d80)
This commit is contained in:
parent
3600f30c35
commit
7d686eccc3
@ -36,6 +36,9 @@ Release 2.6.1 - 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
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
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.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 @@ private void handleAppSubmitEvent(DelegationTokenRenewerAppSubmitEvent evt)
|
||||
*/
|
||||
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 synchronized void run() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized boolean cancel() {
|
||||
cancelled = true;
|
||||
public boolean cancel() {
|
||||
cancelled.set(true);
|
||||
return super.cancel();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user