Class NullContext
- java.lang.Object
-
- com.mapr.org.apache.hadoop.metrics.spi.AbstractMetricsContext
-
- com.mapr.org.apache.hadoop.metrics.spi.NullContext
-
- All Implemented Interfaces:
MetricsContext
@Public @Evolving public class NullContext extends AbstractMetricsContext
Null metrics context: a metrics context which does nothing. Used as the default context, so that no performance data is emitted if no configuration data is found.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.mapr.org.apache.hadoop.metrics.spi.AbstractMetricsContext
AbstractMetricsContext.MetricMap, AbstractMetricsContext.TagMap
-
-
Field Summary
-
Fields inherited from interface com.mapr.org.apache.hadoop.metrics.MetricsContext
DEFAULT_PERIOD
-
-
Constructor Summary
Constructors Constructor Description NullContext()Creates a new instance of NullContext
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidemitRecord(java.lang.String contextName, java.lang.String recordName, OutputRecord outRec)Do-nothing version of emitRecordprotected voidremove(MetricsRecordImpl record)Do-nothing version of removevoidstartMonitoring()Do-nothing version of startMonitoringprotected voidupdate(MetricsRecordImpl record)Do-nothing version of update-
Methods inherited from class com.mapr.org.apache.hadoop.metrics.spi.AbstractMetricsContext
close, createRecord, flush, getAllRecords, getAttribute, getAttributeTable, getContextFactory, getContextName, getPeriod, init, isMonitoring, newRecord, parseAndSetPeriod, registerUpdater, setPeriod, stopMonitoring, unregisterUpdater
-
-
-
-
Method Detail
-
startMonitoring
@Private public void startMonitoring()
Do-nothing version of startMonitoring- Specified by:
startMonitoringin interfaceMetricsContext- Overrides:
startMonitoringin classAbstractMetricsContext
-
emitRecord
@Private protected void emitRecord(java.lang.String contextName, java.lang.String recordName, OutputRecord outRec)Do-nothing version of emitRecord- Specified by:
emitRecordin classAbstractMetricsContext
-
update
@Private protected void update(MetricsRecordImpl record)
Do-nothing version of update- Overrides:
updatein classAbstractMetricsContext
-
remove
@Private protected void remove(MetricsRecordImpl record)
Do-nothing version of remove- Overrides:
removein classAbstractMetricsContext
-
-