Apache9 commented on a change in pull request #1011: HBASE-23055 Alter hbase:meta URL: https://github.com/apache/hbase/pull/1011#discussion_r365224489
########## File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/ZKAsyncRegistry.java ########## @@ -229,6 +244,43 @@ private void getMetaRegionLocation(CompletableFuture<RegionLocations> future, }); } + @Override + public CompletableFuture<TableState> getMetaTableState() { + return 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); + }).exceptionally(e -> { Review comment: Currently in HBase, usually we will create a new CompletableFuture and use FutureUtils.addListener to complete it. The code in exceptionally are a bit tricky, where we throw a CompletionException... ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services