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 <[email protected]>
  • Loading branch information
Divneet18 authored and virajjasani committed Jul 20, 2024
1 parent 677eef6 commit 6bed93e
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 6bed93e

Please sign in to comment.