YARN-2874. Dead lock in DelegationTokenRenewer which blocks RM to execute any further apps. (Naganarasimha G R via kasha)
This commit is contained in:
parent
a1e822595c
commit
799353e2c7
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue