HDFS-3623. BKJM: zkLatchWaitTimeout hard coded to 6000. Make use of ZKSessionTimeout instead. Contributed by Uma Maheswara Rao G.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1409905 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
03bf9d6f20
commit
8a2de21315
|
@ -595,6 +595,9 @@ Release 2.0.3-alpha - Unreleased
|
||||||
HDFS-4104. dfs -test -d prints inappropriate error on nonexistent directory
|
HDFS-4104. dfs -test -d prints inappropriate error on nonexistent directory
|
||||||
(Andy Isaacson via daryn)
|
(Andy Isaacson via daryn)
|
||||||
|
|
||||||
|
HDFS-3623. BKJM: zkLatchWaitTimeout hard coded to 6000. Make use of ZKSessionTimeout instead.
|
||||||
|
(umamahesh)
|
||||||
|
|
||||||
Release 2.0.2-alpha - 2012-09-07
|
Release 2.0.2-alpha - 2012-09-07
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -180,9 +180,16 @@ public class BookKeeperJournalManager implements JournalManager {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
zkConnectLatch = new CountDownLatch(1);
|
zkConnectLatch = new CountDownLatch(1);
|
||||||
zkc = new ZooKeeper(zkConnect, conf.getInt(BKJM_ZK_SESSION_TIMEOUT,
|
int bkjmZKSessionTimeout = conf.getInt(BKJM_ZK_SESSION_TIMEOUT,
|
||||||
BKJM_ZK_SESSION_TIMEOUT_DEFAULT), new ZkConnectionWatcher());
|
BKJM_ZK_SESSION_TIMEOUT_DEFAULT);
|
||||||
if (!zkConnectLatch.await(6000, TimeUnit.MILLISECONDS)) {
|
zkc = new ZooKeeper(zkConnect, bkjmZKSessionTimeout,
|
||||||
|
new ZkConnectionWatcher());
|
||||||
|
// Configured zk session timeout + some extra grace period (here
|
||||||
|
// BKJM_ZK_SESSION_TIMEOUT_DEFAULT used as grace period)
|
||||||
|
int zkConnectionLatchTimeout = bkjmZKSessionTimeout
|
||||||
|
+ BKJM_ZK_SESSION_TIMEOUT_DEFAULT;
|
||||||
|
if (!zkConnectLatch
|
||||||
|
.await(zkConnectionLatchTimeout, TimeUnit.MILLISECONDS)) {
|
||||||
throw new IOException("Error connecting to zookeeper");
|
throw new IOException("Error connecting to zookeeper");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue