pankaj72981 commented on code in PR #5837:
URL: https://github.com/apache/hbase/pull/5837#discussion_r1679968276
##########
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ReadOnlyZKClient.java:
##########
@@ -258,6 +264,23 @@ public void closed(IOException e) {
}
}
+ private static TimerTask getTimerTask(final long timeoutMs, final
CompletableFuture<?> future,
+ final String api) {
+ return timeout -> {
+ if (!future.isDone()) {
+ future.completeExceptionally(new DoNotRetryIOException(
+ "Zookeeper " + api + " could not be completed in " + timeoutMs + "
ms"));
+ }
+ };
+ }
+
+ public CompletableFuture<byte[]> getWithTimeout(final String path, final
long timeoutMs) {
Review Comment:
nit: Can we overload the existing methods instead of creating new methods
with Timeout suffix?
eg.
` public CompletableFuture<byte[]> get(final String path, final long
timeoutMs) `
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]