saintstack commented on a change in pull request #995: HBASE-23055 Alter
hbase:meta
URL: https://github.com/apache/hbase/pull/995#discussion_r363954749
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ZKAsyncRegistry.java
##########
@@ -229,6 +242,33 @@ private void
getMetaRegionLocation(CompletableFuture<RegionLocations> future,
});
}
+ @Override
+ public CompletableFuture<TableState> getMetaTableState() {
+ CompletableFuture<TableState> result =
+ getAndConvert(this.znodeMirroredMetaTableState,
ZKAsyncRegistry::getTableState)
+ .thenApply(state -> {
+ return state == null ||
state.equals(ENABLED_META_TABLE_STATE.getState())?
+ ENABLED_META_TABLE_STATE: new TableState(TableName.META_TABLE_NAME,
state);
+ });
+ // If completed exceptionally return default ENABLED state.
+ return result.isCompletedExceptionally()? COMPLETED_GET_META_TABLE_STATE:
result;
Review comment:
You are right. Undid this. Letting any exception out instead of trying to
paper it over with a default.
Will add test.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services