Search in sources :

Example 1 with JvmMetrics

use of org.apache.hadoop.metrics2.source.JvmMetrics in project hadoop by apache.

the class JvmMetrics method getMetrics.

@Override
public void getMetrics(MetricsCollector collector, boolean all) {
    MetricsRecordBuilder rb = collector.addRecord(JvmMetrics).setContext("jvm").tag(ProcessName, processName).tag(SessionId, sessionId);
    getMemoryUsage(rb);
    getGcUsage(rb);
    getThreadUsage(rb);
    getEventCounters(rb);
}
Also used : MetricsRecordBuilder(org.apache.hadoop.metrics2.MetricsRecordBuilder)

Example 2 with JvmMetrics

use of org.apache.hadoop.metrics2.source.JvmMetrics in project hadoop by apache.

the class DataNodeMetrics method create.

public static DataNodeMetrics create(Configuration conf, String dnName) {
    String sessionId = conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY);
    MetricsSystem ms = DefaultMetricsSystem.instance();
    JvmMetrics jm = JvmMetrics.create("DataNode", sessionId, ms);
    String name = "DataNodeActivity-" + (dnName.isEmpty() ? "UndefinedDataNodeName" + ThreadLocalRandom.current().nextInt() : dnName.replace(':', '-'));
    // Percentile measurement is off by default, by watching no intervals
    int[] intervals = conf.getInts(DFSConfigKeys.DFS_METRICS_PERCENTILES_INTERVALS_KEY);
    return ms.register(name, null, new DataNodeMetrics(name, sessionId, intervals, jm));
}
Also used : JvmMetrics(org.apache.hadoop.metrics2.source.JvmMetrics) MetricsSystem(org.apache.hadoop.metrics2.MetricsSystem) DefaultMetricsSystem(org.apache.hadoop.metrics2.lib.DefaultMetricsSystem)

Example 3 with JvmMetrics

use of org.apache.hadoop.metrics2.source.JvmMetrics in project hive by apache.

the class LlapDaemonExecutorMetrics method create.

public static LlapDaemonExecutorMetrics create(String displayName, String sessionId, int numExecutors, final int[] intervals) {
    MetricsSystem ms = LlapMetricsSystem.instance();
    JvmMetrics jm = JvmMetrics.create(MetricsUtils.METRICS_PROCESS_NAME, sessionId, ms);
    return ms.register(displayName, "LlapDaemon Executor Metrics", new LlapDaemonExecutorMetrics(displayName, jm, sessionId, numExecutors, intervals));
}
Also used : JvmMetrics(org.apache.hadoop.metrics2.source.JvmMetrics) MetricsSystem(org.apache.hadoop.metrics2.MetricsSystem)

Example 4 with JvmMetrics

use of org.apache.hadoop.metrics2.source.JvmMetrics in project hadoop by apache.

the class WebAppProxyServer method serviceInit.

@Override
protected void serviceInit(Configuration conf) throws Exception {
    Configuration config = new YarnConfiguration(conf);
    doSecureLogin(conf);
    proxy = new WebAppProxy();
    addService(proxy);
    DefaultMetricsSystem.initialize("WebAppProxyServer");
    JvmMetrics jm = JvmMetrics.initSingleton("WebAppProxyServer", null);
    pauseMonitor = new JvmPauseMonitor();
    addService(pauseMonitor);
    jm.setPauseMonitor(pauseMonitor);
    super.serviceInit(config);
}
Also used : YarnConfiguration(org.apache.hadoop.yarn.conf.YarnConfiguration) Configuration(org.apache.hadoop.conf.Configuration) YarnConfiguration(org.apache.hadoop.yarn.conf.YarnConfiguration) JvmMetrics(org.apache.hadoop.metrics2.source.JvmMetrics) JvmPauseMonitor(org.apache.hadoop.util.JvmPauseMonitor)

Example 5 with JvmMetrics

use of org.apache.hadoop.metrics2.source.JvmMetrics in project hive by apache.

the class LlapTaskSchedulerMetrics method create.

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));
}
Also used : JvmMetrics(org.apache.hadoop.metrics2.source.JvmMetrics) MetricsSystem(org.apache.hadoop.metrics2.MetricsSystem) LlapMetricsSystem(org.apache.hadoop.hive.llap.metrics.LlapMetricsSystem)

Aggregations

JvmMetrics (org.apache.hadoop.metrics2.source.JvmMetrics)8 MetricsSystem (org.apache.hadoop.metrics2.MetricsSystem)5 JvmPauseMonitor (org.apache.hadoop.util.JvmPauseMonitor)4 Configuration (org.apache.hadoop.conf.Configuration)3 DefaultMetricsSystem (org.apache.hadoop.metrics2.lib.DefaultMetricsSystem)3 IOException (java.io.IOException)2 MetricsRecordBuilder (org.apache.hadoop.metrics2.MetricsRecordBuilder)2 YarnConfiguration (org.apache.hadoop.yarn.conf.YarnConfiguration)2 YarnRuntimeException (org.apache.hadoop.yarn.exceptions.YarnRuntimeException)2 LlapMetricsSystem (org.apache.hadoop.hive.llap.metrics.LlapMetricsSystem)1 HSAdminServer (org.apache.hadoop.mapreduce.v2.hs.server.HSAdminServer)1 MetricsCollector (org.apache.hadoop.metrics2.MetricsCollector)1 JvmMetricsInfo (org.apache.hadoop.metrics2.source.JvmMetricsInfo)1 AggregatedLogDeletionService (org.apache.hadoop.yarn.logaggregation.AggregatedLogDeletionService)1 Test (org.junit.Test)1