org.apache.hadoop.metrics.spi
Class NullContextWithUpdateThread
java.lang.Object
org.apache.hadoop.metrics.spi.AbstractMetricsContext
org.apache.hadoop.metrics.spi.NullContextWithUpdateThread
- All Implemented Interfaces:
- org.apache.hadoop.metrics.MetricsContext
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class NullContextWithUpdateThread
- extends AbstractMetricsContext
A null context which has a thread calling
periodically when monitoring is started. This keeps the data sampled
correctly.
In all other respects, this is like the NULL context: No data is emitted.
This is suitable for Monitoring systems like JMX which reads the metrics
when someone reads the data from JMX.
The default impl of start and stop monitoring:
is the AbstractMetricsContext is good enough.
Fields inherited from interface org.apache.hadoop.metrics.MetricsContext |
DEFAULT_PERIOD |
Methods inherited from class org.apache.hadoop.metrics.spi.AbstractMetricsContext |
close, createRecord, flush, getAllRecords, getAttribute, getAttributeTable, getContextFactory, getContextName, getPeriod, isMonitoring, newRecord, parseAndSetPeriod, registerUpdater, setPeriod, startMonitoring, stopMonitoring, unregisterUpdater |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NullContextWithUpdateThread
@InterfaceAudience.Private
public NullContextWithUpdateThread()
- Creates a new instance of NullContextWithUpdateThread
Copyright © 2014 Apache Software Foundation. All Rights Reserved.