From 5f3aaa222007af80c86d0ab048fecfbb7dc6ede8 Mon Sep 17 00:00:00 2001 From: congbo Date: Tue, 7 May 2024 10:30:40 +0800 Subject: [PATCH] fix some comment --- .../main/java/org/apache/bookkeeper/client/api/BookKeeper.java | 1 + .../java/org/apache/bookkeeper/meta/zk/ZKMetadataDriverBase.java | 1 + .../client/api/DriverMetadataServiceAvailableTest.java | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/BookKeeper.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/BookKeeper.java index 279cabb0327..7b041d9a70c 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/BookKeeper.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/BookKeeper.java @@ -87,6 +87,7 @@ static BookKeeperBuilder newBuilder(final ClientConfiguration clientConfiguratio * @return the metadata service is available. */ CompletableFuture isDriverMetadataServiceAvailable(); + /** * Close the client and release every resource. * diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/zk/ZKMetadataDriverBase.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/zk/ZKMetadataDriverBase.java index 1d43c84a7b3..4a3a83453f5 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/zk/ZKMetadataDriverBase.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/zk/ZKMetadataDriverBase.java @@ -68,6 +68,7 @@ public class ZKMetadataDriverBase implements AutoCloseable { protected static final String SCHEME = "zk"; protected volatile boolean metadataServiceAvailable; + private static final int ZK_CLIENT_WAIT_FOR_SHUTDOWN_TIMEOUT_MS = 5000; public static String getZKServersFromServiceUri(URI uri) { diff --git a/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/api/DriverMetadataServiceAvailableTest.java b/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/api/DriverMetadataServiceAvailableTest.java index 228fab3a6a3..39378360fc3 100644 --- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/api/DriverMetadataServiceAvailableTest.java +++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/api/DriverMetadataServiceAvailableTest.java @@ -40,7 +40,6 @@ public DriverMetadataServiceAvailableTest() { @Test public void testDriverMetadataServiceAvailable() throws Exception { - ClientConfiguration conf = new ClientConfiguration(); conf.setMetadataServiceUri(zkUtil.getMetadataServiceUri()); conf.setZkTimeout(3000);