You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/03/30 20:48:22 UTC
[GitHub] ctubbsii commented on a change in pull request #290: ACCUMULO-4392: Expose metrics2 JVM metrics
ctubbsii commented on a change in pull request #290: ACCUMULO-4392: Expose metrics2 JVM metrics
URL: https://github.com/apache/accumulo/pull/290#discussion_r178375023
##########
File path: server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsSystemHelper.java
##########
@@ -16,20 +16,65 @@
*/
package org.apache.accumulo.server.metrics;
+import java.util.HashMap;
+import java.util.Map;
+
import org.apache.hadoop.metrics2.MetricsSystem;
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
+import org.apache.hadoop.metrics2.source.JvmMetrics;
+import org.apache.hadoop.metrics2.source.JvmMetricsInfo;
/**
*
*/
public class MetricsSystemHelper {
+ private static Map<String,String> serviceNameMap = new HashMap<>();
+ private static String processName = "Unknown";
+
+ static {
+ serviceNameMap.put("master", "Master");
+ serviceNameMap.put("tserver", "TabletServer");
+ serviceNameMap.put("monitor", "Monitor");
+ serviceNameMap.put("gc", "GarbageCollector");
+ serviceNameMap.put("tracer", "Tracer");
+ serviceNameMap.put("shell", "Shell");
+ }
+
+ public static void configure(String application) {
+ String serviceName = application;
+ if (MetricsSystemHelper.serviceNameMap.containsKey(application)) {
+ serviceName = MetricsSystemHelper.serviceNameMap.get(application);
Review comment:
I don't think this serviceNameMap translation is necessary.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services