adoroszlai commented on a change in pull request #105: HDDS-2370.Support HddsDatanodeService run as DataNode Plugin URL: https://github.com/apache/hadoop-ozone/pull/105#discussion_r340565182
########## File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsUtils.java ########## @@ -499,9 +500,13 @@ public static InetSocketAddress getScmAddressForSecurityProtocol( public static MetricsSystem initializeMetrics( OzoneConfiguration configuration, String serverName) { MetricsSystem metricsSystem = DefaultMetricsSystem.initialize(serverName); - JvmMetrics.create(serverName, - configuration.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY), - DefaultMetricsSystem.instance()); + try { + JvmMetrics.create(serverName, + configuration.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY), + DefaultMetricsSystem.instance()); + } catch (MetricsException e) { + LOG.info("Metrics source JvmMetrics already added to DataNode."); Review comment: Checkstyle says: ``` hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsUtils.java 508: 'catch' child has incorrect indentation level 8, expected level should be 6. ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org