veghlaci05 commented on code in PR #3521:
URL: https://github.com/apache/hive/pull/3521#discussion_r973062171


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/metrics/CompactionMetricData.java:
##########
@@ -148,6 +152,10 @@ Map<String, Long> getStateCount() {
     return new HashMap<>(stateCount);
   }
 
+  public Map<String, Integer> getPoolCount() {
+    return new HashMap<>(poolCount);

Review Comment:
   I think it is enough if only `CompactionMetricData` is immutable. The 
returned shallow copy allows the caller to modify these collections without 
modifying CompactionMetricData itself, which is fine in my opinion. However, in 
the current case both methods are used only one time making this discussion 
rather theoretical. I simply copied the way the already existing method works.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to