[GitHub] [hbase] Apache9 commented on a change in pull request #721: HBASE-23170 Admin#getRegionServers use ClusterMetrics.Option.SERVERS_NAME

2019-10-16 Thread GitBox
Apache9 commented on a change in pull request #721: HBASE-23170 
Admin#getRegionServers use ClusterMetrics.Option.SERVERS_NAME
URL: https://github.com/apache/hbase/pull/721#discussion_r335447694
 
 

 ##
 File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
 ##
 @@ -1048,8 +1048,7 @@
* @return current live region servers list wrapped by {@link 
CompletableFuture}
*/
   default CompletableFuture> getRegionServers() {
-return getClusterMetrics(EnumSet.of(Option.LIVE_SERVERS))
-  .thenApply(cm -> cm.getLiveServerMetrics().keySet());
+return getClusterMetrics(EnumSet.of(Option.SERVERS_NAME)).thenApply(cm -> 
cm.getServersName());
 
 Review comment:
   ClusterMetrics::getServersName?


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


[GitHub] [hbase] Apache9 commented on a change in pull request #721: HBASE-23170 Admin#getRegionServers use ClusterMetrics.Option.SERVERS_NAME

2019-10-16 Thread GitBox
Apache9 commented on a change in pull request #721: HBASE-23170 
Admin#getRegionServers use ClusterMetrics.Option.SERVERS_NAME
URL: https://github.com/apache/hbase/pull/721#discussion_r335447964
 
 

 ##
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionPlacementMaintainer.java
 ##
 @@ -204,9 +202,7 @@ private void genAssignmentPlan(TableName tableName,
 
 // Get the all the region servers
 List servers = new ArrayList<>();
-servers.addAll(
-  
FutureUtils.get(getConnection().getAdmin().getClusterMetrics(EnumSet.of(Option.LIVE_SERVERS)))
-.getLiveServerMetrics().keySet());
+
servers.addAll(FutureUtils.get(getConnection().getAdmin().getRegionServers()));
 
 Review comment:
   Not introduced by you, but I wonder whether we need to close the Admin here?


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