rmahindra123 commented on code in PR #13851:
URL: https://github.com/apache/hudi/pull/13851#discussion_r2331356288


##########
hudi-common/src/main/java/org/apache/hudi/metrics/prometheus/PrometheusReporter.java:
##########
@@ -50,10 +53,15 @@ public class PrometheusReporter extends MetricsReporter {
   private static final Logger LOG = 
LoggerFactory.getLogger(PrometheusReporter.class);
   private static final Map<Integer, CollectorRegistry> 
PORT_TO_COLLECTOR_REGISTRY = new HashMap<>();
   private static final Map<Integer, HTTPServer> PORT_TO_SERVER = new 
HashMap<>();
+  
+  private static final Map<Integer, AtomicInteger> PORT_TO_REFERENCE_COUNT = 
new HashMap<>();
+  private static final Map<Integer, Set<DropwizardExports>> PORT_TO_EXPORTS = 
new HashMap<>();

Review Comment:
   can we do a POJO that contains HTTPServer, ref counts and exports to avoid 3 
hash maps?
   
   Also, lets use ConcurrentHashMap



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