@Metric("Duration for a continuous scheduling run") MutableRate continuousSchedulingRun;
@Metric("Duration to handle a node update") MutableRate nodeUpdateCall;
@Metric("Duration for a update thread run") MutableRate updateThreadRun;
@Metric("Duration for an update call") MutableRate updateCall;
@Metric("Duration for a preempt call") MutableRate preemptCall;
@Metric("# of apps submitted") MutableCounterInt appsSubmitted;
@Metric("# of running apps") MutableGaugeInt appsRunning;
@Metric("# of pending apps") MutableGaugeInt appsPending;
@Metric("# of apps completed") MutableCounterInt appsCompleted;
@Metric("# of apps killed") MutableCounterInt appsKilled;
@Metric("# of apps failed") MutableCounterInt appsFailed;
@Metric("Allocated memory in MB") MutableGaugeInt allocatedMB;
@Metric("Allocated CPU in virtual cores") MutableGaugeInt allocatedVCores;
@Metric("# of allocated containers") MutableGaugeInt allocatedContainers;
@Metric("Aggregate # of allocated containers") MutableCounterLong aggregateContainersAllocated;
@Metric("Aggregate # of released containers") MutableCounterLong aggregateContainersReleased;
@Metric("Available memory in MB") MutableGaugeInt availableMB;
@Metric("Available CPU in virtual cores") MutableGaugeInt availableVCores;
@Metric("Pending memory allocation in MB") MutableGaugeInt pendingMB;
@Metric("Pending CPU allocation in virtual cores") MutableGaugeInt pendingVCores;
@Metric("# of pending containers") MutableGaugeInt pendingContainers;
@Metric("# of reserved memory in MB") MutableGaugeInt reservedMB;
@Metric("Reserved CPU in virtual cores") MutableGaugeInt reservedVCores;
@Metric("# of reserved containers") MutableGaugeInt reservedContainers;
@Metric("# of active users") MutableGaugeInt activeUsers;
@Metric("# of active applications") MutableGaugeInt activeApplications;
@Metric("Fair share of memory in MB") MutableGaugeInt fairShareMB;
@Metric("Fair share of CPU in vcores") MutableGaugeInt fairShareVCores;
@Metric("Steady fair share of memory in MB") MutableGaugeInt steadyFairShareMB;
@Metric("Steady fair share of CPU in vcores") MutableGaugeInt steadyFairShareVCores;
@Metric("Minimum share of memory in MB") MutableGaugeInt minShareMB;
@Metric("Minimum share of CPU in vcores") MutableGaugeInt minShareVCores;
@Metric("Maximum share of memory in MB") MutableGaugeInt maxShareMB;
@Metric("Maximum share of CPU in vcores") MutableGaugeInt maxShareVCores;
hadoop metrics2
监控的内容:
已经提供的:
Source :
org.apache.hadoop.metrics2.source.JvmMertics
和org.apache.hadoop.metrics2.source.JvmMetricsInfo
其他相关
FSOpDurations :
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSOpDurations
fairscheduler-op-durations context :
QueueMetrics :
org.apache.hadoop.yarn.server.resourcemanager.scheduler.QueueMetrics
yarn context :
FSQueueMetrics :
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSQueueMetrics
yarn context :
MetricsSystemImpl :
org.apache.hadoop.metrics2.impl.MetricsSystemImpl
metricssystem context :
Sink :
org.apache.hadoop.metrics2.sink.GraphiteSink
和org.apache.hadoop.metrics2.sink.FileSink
以及org.apache.hadoop.metrics2.sink.AbstractGangliaSink
metricsSystem :
org.apache.hadoop.metrics2.lib.DefaultMetricsSystem
自我实现:
org.apache.hadoop.metrics2.MetricsSource
org.apache.hadoop.metrics2.MetricsSink
org.apache.hadoop.metrics2.MetricsSystem
使用方式:
$HADOOP_HOME/etc/hadoop/hadoop-metrics2.properties
中配置就可以spark metrics
可以获取到的内容主要有:
实现的Sink有
ConsoleSink :
org.apache.spark.metrics.sink.ConsoleSink
CSVSink :
org.apache.spark.metrics.sink.CSVSink
JmxSink :
org.apache.spark.metrics.sink.JmxSink
MetricsServlet :
org.apache.spark.metrics.sink.MetricsServlet
GraphiteSink :
org.apache.spark.metrics.sink.GraphiteSink
Slf4jSink :
org.apache.spark.metrics.sink.Slf4jSink
实现的Source有
JvmSource :
org.apache.spark.metrics.source.JvmSource
ApplicationSource :
org.apache.spark.deploy.master.ApplicationSource
BlockManagerSource :
org.apache.spark.storage.BlockManagerSource
DAGSchedulerSource :
org.apache.spark.scheduler.DAGSchedulerSource
ExecutorAllocationManagerSource :
org.apache.spark.ExecutorAllocationManagerSource
ExecutorSource :
org.apache.spark.executor.ExecutorSource
MasterSource :
org.apache.spark.deploy.master.MasterSource
MesosClusterSchedulerSource :
org.apache.spark.scheduler.cluster.mesos.MesosClusterSchedulerSource
WorkerSource :
org.apache.spark.deploy.worker.WorkerSource