virajjasani commented on code in PR #5837:
URL: https://github.com/apache/hbase/pull/5837#discussion_r1627039745
##########
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ReadOnlyZKClient.java:
##########
@@ -253,6 +253,18 @@ public void closed(IOException e) {
}
}
+ public CompletableFuture<byte[]> getWithTimeout(String path, long timeout) {
+ CompletableFuture<byte[]> future = get(path);
+ while(timeout > 0){
+ if(future.isCancelled() || future.isDone() ||
future.isCompletedExceptionally()){
+ return future;
+ }
+ --timeout;
+ }
+ future.completeExceptionally(new
KeeperException.OperationTimeoutException());
+ return future;
+ }
+
Review Comment:
@Divneet18 we need async implementation like mentioned here
https://github.com/apache/hbase/pull/5837#issuecomment-2146135324
--
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]