[GitHub] [hbase] mymeiyi commented on a change in pull request #721: HBASE-23170 Admin#getRegionServers use ClusterMetrics.Option.SERVERS_NAME
mymeiyi 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_r335835605 ## 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: done 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] mymeiyi commented on a change in pull request #721: HBASE-23170 Admin#getRegionServers use ClusterMetrics.Option.SERVERS_NAME
mymeiyi 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_r335835232 ## 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: It's a async admin and does not need to close. 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] mymeiyi commented on a change in pull request #721: HBASE-23170 Admin#getRegionServers use ClusterMetrics.Option.SERVERS_NAME
mymeiyi 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_r334900860 ## File path: hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientClusterMetrics.java ## @@ -104,6 +104,7 @@ public void testDefaults() throws Exception { defaults.getLiveServerMetrics().size()); Assert.assertEquals(origin.getMasterInfoPort(), defaults.getMasterInfoPort()); Assert.assertEquals(origin.getServersName().size(), defaults.getServersName().size()); +Assert.assertEquals(ADMIN.getRegionServers().size(), defaults.getServersName().size()); Review comment: Used for testing the Admin#getRegionServers method 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