hwani3142 commented on code in PR #11226:
URL: https://github.com/apache/hudi/pull/11226#discussion_r1602512348
##########
hudi-common/src/main/java/org/apache/hudi/metrics/JmxMetricsReporter.java:
##########
@@ -72,9 +69,25 @@ 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) {
Review Comment:
> Should we catch specific exception type here?
https://github.com/apache/hudi/pull/11226/commits/c7b402870d78e079662a5d810f7484e39dc20f83
Caller function catches all exceptions, then rethrow to HoodieException.
Thus, check causes and log messages in detail.
Thanks for comment
--
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]