accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billoley <>
Subject [GitHub] accumulo pull request #291: ACCUMULO-4693: Add instance-specific ProcessName...
Date Fri, 11 Aug 2017 12:29:32 GMT
Github user billoley commented on a diff in the pull request:
    --- Diff: server/base/src/main/java/org/apache/accumulo/server/metrics/
    @@ -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");
    --- End diff --
    I was originally using this map when I grabbed the -Dapp system property.  Because the
same string exists in the main() method of master, tserver, monitor, gc, and tracer, I changed
to passing that string instead of grabbing the property.  I suppose I should just go one step
further and pass the string that I want from each location which would get rid of this map.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message