frostruan commented on code in PR #4335:
URL: https://github.com/apache/hbase/pull/4335#discussion_r848727749
##########
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:
Thanks for your patient reply. It helps me a lot.
After re-reading the doc and doing some tests, it turns out I was wrong
before. Yes, there will indeed be NPE problem here. But based on the doc above
and my tests, the user will still see the originating error. If the error is
not null here, the future will completed exceptionally with this error no
matter the supplied action throws an exception or not. Am I right?
--
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]