hwani3142 commented on code in PR #11226:
URL: https://github.com/apache/hudi/pull/11226#discussion_r1602606957


##########
hudi-common/src/main/java/org/apache/hudi/metrics/JmxMetricsReporter.java:
##########
@@ -72,9 +70,29 @@ public JmxMetricsReporter(HoodieMetricsConfig config, 
MetricRegistry registry) {
     }
   }
 
+  private boolean isServerCreated() {
+    return jmxReporterServer != null;
+  }
+
+  private void initializeJmxReporterServer(String host, int[] ports) {
+    for (int port : ports) {
+      try {
+        jmxReporterServer = createJmxReport(host, port);
+        LOG.info("Started JMX server on port " + port + ".");
+        break;
+      } catch (Exception e) {
+        if (e.getCause() instanceof ExportException) {
+          LOG.info("Skip for initializing jmx port " + port + " because of 
already in use");
+        } else {
+          LOG.info("Failed to initialize jmx port " + port + ". " + 
e.getMessage());
+        }

Review Comment:
   emit log if all unknown error occur



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