HADOOP-11492. Bump up curator version to 2.7.1. (Arun Suresh and Karthik Kambatla via kasha)
This commit is contained in:
parent
e04e8fa810
commit
55235d28c3
|
@ -533,6 +533,9 @@ Release 2.7.0 - UNRELEASED
|
||||||
HADOOP-11544. Remove unused configuration keys for tracing. (Masatake
|
HADOOP-11544. Remove unused configuration keys for tracing. (Masatake
|
||||||
Iwasaki via aajisaka)
|
Iwasaki via aajisaka)
|
||||||
|
|
||||||
|
HADOOP-11492. Bump up curator version to 2.7.1. (Arun Suresh and
|
||||||
|
Karthik Kambatla via kasha)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HADOOP-11323. WritableComparator#compare keeps reference to byte array.
|
HADOOP-11323. WritableComparator#compare keeps reference to byte array.
|
||||||
|
|
|
@ -45,6 +45,7 @@ import org.apache.curator.framework.recipes.cache.PathChildrenCache.StartMode;
|
||||||
import org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent;
|
import org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent;
|
||||||
import org.apache.curator.framework.recipes.cache.PathChildrenCacheListener;
|
import org.apache.curator.framework.recipes.cache.PathChildrenCacheListener;
|
||||||
import org.apache.curator.framework.recipes.shared.SharedCount;
|
import org.apache.curator.framework.recipes.shared.SharedCount;
|
||||||
|
import org.apache.curator.framework.recipes.shared.VersionedValue;
|
||||||
import org.apache.curator.retry.RetryNTimes;
|
import org.apache.curator.retry.RetryNTimes;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience;
|
import org.apache.hadoop.classification.InterfaceAudience;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
|
@ -58,7 +59,6 @@ import org.apache.zookeeper.ZooDefs.Perms;
|
||||||
import org.apache.zookeeper.client.ZooKeeperSaslClient;
|
import org.apache.zookeeper.client.ZooKeeperSaslClient;
|
||||||
import org.apache.zookeeper.data.ACL;
|
import org.apache.zookeeper.data.ACL;
|
||||||
import org.apache.zookeeper.data.Id;
|
import org.apache.zookeeper.data.Id;
|
||||||
import org.apache.zookeeper.data.Stat;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -109,10 +109,10 @@ public abstract class ZKDelegationTokenSecretManager<TokenIdent extends Abstract
|
||||||
"ZKDelegationTokenSecretManagerClient";
|
"ZKDelegationTokenSecretManagerClient";
|
||||||
|
|
||||||
private static final String ZK_DTSM_NAMESPACE = "ZKDTSMRoot";
|
private static final String ZK_DTSM_NAMESPACE = "ZKDTSMRoot";
|
||||||
private static final String ZK_DTSM_SEQNUM_ROOT = "ZKDTSMSeqNumRoot";
|
private static final String ZK_DTSM_SEQNUM_ROOT = "/ZKDTSMSeqNumRoot";
|
||||||
private static final String ZK_DTSM_KEYID_ROOT = "ZKDTSMKeyIdRoot";
|
private static final String ZK_DTSM_KEYID_ROOT = "/ZKDTSMKeyIdRoot";
|
||||||
private static final String ZK_DTSM_TOKENS_ROOT = "ZKDTSMTokensRoot";
|
private static final String ZK_DTSM_TOKENS_ROOT = "/ZKDTSMTokensRoot";
|
||||||
private static final String ZK_DTSM_MASTER_KEY_ROOT = "ZKDTSMMasterKeyRoot";
|
private static final String ZK_DTSM_MASTER_KEY_ROOT = "/ZKDTSMMasterKeyRoot";
|
||||||
|
|
||||||
private static final String DELEGATION_KEY_PREFIX = "DK_";
|
private static final String DELEGATION_KEY_PREFIX = "DK_";
|
||||||
private static final String DELEGATION_TOKEN_PREFIX = "DT_";
|
private static final String DELEGATION_TOKEN_PREFIX = "DT_";
|
||||||
|
@ -505,11 +505,20 @@ public abstract class ZKDelegationTokenSecretManager<TokenIdent extends Abstract
|
||||||
return delTokSeqCounter.getCount();
|
return delTokSeqCounter.getCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void incrSharedCount(SharedCount sharedCount) throws Exception {
|
||||||
|
while (true) {
|
||||||
|
// Loop until we successfully increment the counter
|
||||||
|
VersionedValue<Integer> versionedValue = sharedCount.getVersionedValue();
|
||||||
|
if (sharedCount.trySetCount(versionedValue, versionedValue.getValue() + 1)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int incrementDelegationTokenSeqNum() {
|
protected int incrementDelegationTokenSeqNum() {
|
||||||
try {
|
try {
|
||||||
while (!delTokSeqCounter.trySetCount(delTokSeqCounter.getCount() + 1)) {
|
incrSharedCount(delTokSeqCounter);
|
||||||
}
|
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
// The ExpirationThread is just finishing.. so dont do anything..
|
// The ExpirationThread is just finishing.. so dont do anything..
|
||||||
LOG.debug("Thread interrupted while performing token counter increment", e);
|
LOG.debug("Thread interrupted while performing token counter increment", e);
|
||||||
|
@ -537,8 +546,7 @@ public abstract class ZKDelegationTokenSecretManager<TokenIdent extends Abstract
|
||||||
@Override
|
@Override
|
||||||
protected int incrementCurrentKeyId() {
|
protected int incrementCurrentKeyId() {
|
||||||
try {
|
try {
|
||||||
while (!keyIdSeqCounter.trySetCount(keyIdSeqCounter.getCount() + 1)) {
|
incrSharedCount(keyIdSeqCounter);
|
||||||
}
|
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
// The ExpirationThread is just finishing.. so dont do anything..
|
// The ExpirationThread is just finishing.. so dont do anything..
|
||||||
LOG.debug("Thread interrupted while performing keyId increment", e);
|
LOG.debug("Thread interrupted while performing keyId increment", e);
|
||||||
|
|
|
@ -71,6 +71,7 @@
|
||||||
<protoc.path>${env.HADOOP_PROTOC_PATH}</protoc.path>
|
<protoc.path>${env.HADOOP_PROTOC_PATH}</protoc.path>
|
||||||
|
|
||||||
<zookeeper.version>3.4.6</zookeeper.version>
|
<zookeeper.version>3.4.6</zookeeper.version>
|
||||||
|
<curator.version>2.7.1</curator.version>
|
||||||
<findbugs.version>3.0.0</findbugs.version>
|
<findbugs.version>3.0.0</findbugs.version>
|
||||||
|
|
||||||
<tomcat.version>6.0.41</tomcat.version>
|
<tomcat.version>6.0.41</tomcat.version>
|
||||||
|
@ -916,22 +917,22 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.curator</groupId>
|
<groupId>org.apache.curator</groupId>
|
||||||
<artifactId>curator-recipes</artifactId>
|
<artifactId>curator-recipes</artifactId>
|
||||||
<version>2.6.0</version>
|
<version>${curator.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.curator</groupId>
|
<groupId>org.apache.curator</groupId>
|
||||||
<artifactId>curator-client</artifactId>
|
<artifactId>curator-client</artifactId>
|
||||||
<version>2.6.0</version>
|
<version>${curator.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.curator</groupId>
|
<groupId>org.apache.curator</groupId>
|
||||||
<artifactId>curator-framework</artifactId>
|
<artifactId>curator-framework</artifactId>
|
||||||
<version>2.6.0</version>
|
<version>${curator.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.curator</groupId>
|
<groupId>org.apache.curator</groupId>
|
||||||
<artifactId>curator-test</artifactId>
|
<artifactId>curator-test</artifactId>
|
||||||
<version>2.6.0</version>
|
<version>${curator.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bouncycastle</groupId>
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
|
Loading…
Reference in New Issue