abstractdog commented on code in PR #6436:
URL: https://github.com/apache/hive/pull/6436#discussion_r3092080947
##########
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/metrics/LlapTaskSchedulerMetrics.java:
##########
@@ -102,10 +107,12 @@ private LlapTaskSchedulerMetrics(String displayName,
JvmMetrics jm, String sessi
}
public static LlapTaskSchedulerMetrics create(String displayName, String
sessionId) {
- MetricsSystem ms = LlapMetricsSystem.instance();
- JvmMetrics jm = JvmMetrics.create(MetricsUtils.METRICS_PROCESS_NAME,
sessionId, ms);
- return ms.register(displayName, "Llap Task Scheduler Metrics",
- new LlapTaskSchedulerMetrics(displayName, jm, sessionId));
+ return INSTANCES.computeIfAbsent(displayName, name -> {
+ MetricsSystem ms = LlapMetricsSystem.instance();
+ JvmMetrics jm =
JvmMetrics.initSingleton(MetricsUtils.METRICS_PROCESS_NAME, sessionId);
Review Comment:
sorry, I still don't get your point :( so I misunderstood, we're 1 level up,
not on `JvmMetrics` , but on the metrics system level
with the change, we acquire the singleton `LlapMetricsSystem` the same way:
```
MetricsSystem ms = LlapMetricsSystem.instance();
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]