infraio commented on a change in pull request #426: HBASE-22695 Store the rsgroup of a table in table configuration URL: https://github.com/apache/hbase/pull/426#discussion_r310128343
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServiceImpl.java ########## @@ -137,17 +156,24 @@ public void getRSGroupInfoOfTable(RpcController controller, GetRSGroupInfoOfTabl RpcCallback<GetRSGroupInfoOfTableResponse> done) { GetRSGroupInfoOfTableResponse.Builder builder = GetRSGroupInfoOfTableResponse.newBuilder(); TableName tableName = ProtobufUtil.toTableName(request.getTableName()); - RSGroupAdminEndpoint.LOG.info( + LOG.info( master.getClientIdAuditPrefix() + " initiates rsgroup info retrieval, table=" + tableName); try { if (master.getMasterCoprocessorHost() != null) { master.getMasterCoprocessorHost().preGetRSGroupInfoOfTable(tableName); } checkPermission("getRSGroupInfoOfTable"); - RSGroupInfo RSGroupInfo = groupAdminServer.getRSGroupInfoOfTable(tableName); - if (RSGroupInfo != null) { - builder.setRSGroupInfo(ProtobufUtil.toProtoGroupInfo(RSGroupInfo)); + Optional<RSGroupInfo> optGroup = + RSGroupUtil.getRSGroupInfo(master, groupAdminServer, tableName); + if (optGroup.isPresent()) { + builder.setRSGroupInfo(ProtobufUtil.toProtoGroupInfo(fillTables(optGroup.get()))); + } else { + if (master.getTableStateManager().isTablePresent(tableName)) { Review comment: Don't check table present for above case? ---------------------------------------------------------------- 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