HADOOP-6939. Inconsistent lock ordering in AbstractDelegationTokenSecretManager. Contributed by Todd Lipcon.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1042047 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas White 2010-12-03 22:59:23 +00:00
parent dbd07f9e8c
commit ee705fa5ee
2 changed files with 9 additions and 4 deletions

View File

@ -34,6 +34,9 @@ Trunk (unreleased changes)
HADOOP-7045. TestDU fails on systems with local file systems with
extended attributes. (eli)
HADOOP-6939. Inconsistent lock ordering in
AbstractDelegationTokenSecretManager. (Todd Lipcon via tomwhite)
Release 0.22.0 - Unreleased
INCOMPATIBLE CHANGES

View File

@ -95,12 +95,14 @@ public AbstractDelegationTokenSecretManager(long delegationKeyUpdateInterval,
}
/** should be called before this object is used */
public synchronized void startThreads() throws IOException {
public void startThreads() throws IOException {
updateCurrentKey();
synchronized (this) {
running = true;
tokenRemoverThread = new Daemon(new ExpiredTokenRemover());
tokenRemoverThread.start();
}
}
/**
* Add a previously used master key to cache (when NN restarts),