bbeaudreault commented on code in PR #4335:
URL: https://github.com/apache/hbase/pull/4335#discussion_r848652345
##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncTableRegionLocatorImpl.java:
##########
@@ -62,7 +62,10 @@ public CompletableFuture<List<HRegionLocation>>
getAllRegionLocations() {
.thenApply(locs -> Arrays.asList(locs.getRegionLocations()));
}
return ClientMetaTableAccessor
- .getTableHRegionLocations(conn.getTable(TableName.META_TABLE_NAME),
tableName);
+ .getTableHRegionLocations(conn.getTable(TableName.META_TABLE_NAME),
tableName)
+ .whenComplete((locs, error) -> {
Review Comment:
In terms of your recent change, I don't think it's necessary to re-complete
the future within the addListener callback. I've been looking through other
usages of the method and the only time they seem to do that is in cases where
you're chaining together multiple async calls with one high level future. I
could definitely be wrong about that though, and I'm not sure there's a harm in
re-completing.
--
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]