bbeaudreault commented on code in PR #4335:
URL: https://github.com/apache/hbase/pull/4335#discussion_r848652969
##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncTableRegionLocatorImpl.java:
##########
@@ -61,8 +62,17 @@ public CompletableFuture<List<HRegionLocation>>
getAllRegionLocations() {
return conn.registry.getMetaRegionLocations()
.thenApply(locs -> Arrays.asList(locs.getRegionLocations()));
}
- return ClientMetaTableAccessor
+ CompletableFuture<List<HRegionLocation>> future = ClientMetaTableAccessor
.getTableHRegionLocations(conn.getTable(TableName.META_TABLE_NAME),
tableName);
+ addListener(future, (locs, error) -> {
+ if (error != null) {
+ future.completeExceptionally(error);
Review Comment:
when i say re-complete I mean i think it may not be necessary to call
completeExceptionally here or complete below. Instead just return if error !=
null
--
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]