Skip to content

Commit

Permalink
HBASE-28745 : Default Zookeeper ConnectionRegistry APIs timeout shoul…
Browse files Browse the repository at this point in the history
…d be less (#6105)

Signed-off-by: Viraj Jasani <vjasani@apache.org>
  • Loading branch information
Divneet18 authored Jul 20, 2024
1 parent 171ecf2 commit 54f6e91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ZKConnectionRegistry implements ConnectionRegistry {
private final Configuration conf;
private final int zkRegistryAsyncTimeout;
public static final String ZK_REGISTRY_ASYNC_GET_TIMEOUT = "zookeeper.registry.async.get.timeout";
public static final int DEFAULT_ZK_REGISTRY_ASYNC_GET_TIMEOUT = 60000; // 1 min
public static final int DEFAULT_ZK_REGISTRY_ASYNC_GET_TIMEOUT = 10000; // 10 sec
// User not used, but for rpc based registry we need it

ZKConnectionRegistry(Configuration conf, User ignored) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ public void testNotCloseZkWhenPending() throws Exception {

@Test
public void testReadWithTimeout() throws Exception {
assertArrayEquals(DATA, RO_ZK.get(PATH, 60000).get());
assertEquals(CHILDREN, RO_ZK.exists(PATH, 60000).get().getNumChildren());
List<String> children = RO_ZK.list(PATH, 60000).get();
assertArrayEquals(DATA, RO_ZK.get(PATH, 10000).get());
assertEquals(CHILDREN, RO_ZK.exists(PATH, 10000).get().getNumChildren());
List<String> children = RO_ZK.list(PATH, 10000).get();
assertEquals(CHILDREN, children.size());
Collections.sort(children);
for (int i = 0; i < CHILDREN; i++) {
Expand Down

0 comments on commit 54f6e91

Please sign in to comment.