You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "abstractdog (via GitHub)" <gi...@apache.org> on 2023/09/06 07:11:17 UTC

[GitHub] [hive] abstractdog commented on a diff in pull request #4630: HIVE-17350: metrics errors when retrying HS2 startup

abstractdog commented on code in PR #4630:
URL: https://github.com/apache/hive/pull/4630#discussion_r1316835309


##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java:
##########
@@ -414,6 +415,9 @@ private boolean initCodahaleMetricsReporterClasses() {
       try {
         // Note: Hadoop metric reporter does not support tags. We create a single reporter for all metrics.
         Constructor<?> constructor = name.getConstructor(MetricRegistry.class, Configuration.class);
+        if (name.getName().equals(Metrics2Reporter.class.getName())) {
+          DefaultMetricsSystem.shutdown();

Review Comment:
   please put a code comment about this to clarify: why it's needed



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org