Skip to content

Commit 54f6e91

Browse files
authored
HBASE-28745 : Default Zookeeper ConnectionRegistry APIs timeout should be less (#6105)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
1 parent 171ecf2 commit 54f6e91

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

hbase-client/src/main/java/org/apache/hadoop/hbase/client/ZKConnectionRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class ZKConnectionRegistry implements ConnectionRegistry {
7272
private final Configuration conf;
7373
private final int zkRegistryAsyncTimeout;
7474
public static final String ZK_REGISTRY_ASYNC_GET_TIMEOUT = "zookeeper.registry.async.get.timeout";
75-
public static final int DEFAULT_ZK_REGISTRY_ASYNC_GET_TIMEOUT = 60000; // 1 min
75+
public static final int DEFAULT_ZK_REGISTRY_ASYNC_GET_TIMEOUT = 10000; // 10 sec
7676
// User not used, but for rpc based registry we need it
7777

7878
ZKConnectionRegistry(Configuration conf, User ignored) {

hbase-zookeeper/src/test/java/org/apache/hadoop/hbase/zookeeper/TestReadOnlyZKClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ public void testNotCloseZkWhenPending() throws Exception {
217217

218218
@Test
219219
public void testReadWithTimeout() throws Exception {
220-
assertArrayEquals(DATA, RO_ZK.get(PATH, 60000).get());
221-
assertEquals(CHILDREN, RO_ZK.exists(PATH, 60000).get().getNumChildren());
222-
List<String> children = RO_ZK.list(PATH, 60000).get();
220+
assertArrayEquals(DATA, RO_ZK.get(PATH, 10000).get());
221+
assertEquals(CHILDREN, RO_ZK.exists(PATH, 10000).get().getNumChildren());
222+
List<String> children = RO_ZK.list(PATH, 10000).get();
223223
assertEquals(CHILDREN, children.size());
224224
Collections.sort(children);
225225
for (int i = 0; i < CHILDREN; i++) {

0 commit comments

Comments
 (0)