anmolnar commented on code in PR #7474:
URL: https://github.com/apache/hbase/pull/7474#discussion_r2611893097


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java:
##########
@@ -3116,16 +3116,9 @@ public ClusterMetrics 
getClusterMetricsWithoutCoprocessor(EnumSet<Option> option
           if (isActiveMaster() && isInitialized() && assignmentManager != 
null) {
             try {
               Map<TableName, RegionStatesCount> tableRegionStatesCountMap = 
new HashMap<>();
-              Map<String, TableDescriptor> tableDescriptorMap = 
getTableDescriptors().getAll();
-              for (TableDescriptor tableDescriptor : 
tableDescriptorMap.values()) {
+              List<TableDescriptor> tableDescriptors = 
listTableDescriptors(null, null, null, true);
+              for (TableDescriptor tableDescriptor : tableDescriptors) {

Review Comment:
   > I wonder why don't we just get the list directly from meta, but either way 
the patch looks good to me.
   
   It would be a full scan on the meta table VS currently we do a GET on meta 
for every table that we find on the filesystem.
   
   I'm not sure which one is more efficient.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to