org.apache.hadoop.metrics2
usage.@Deprecated @InterfaceAudience.Private @InterfaceStability.Evolving public interface MetricsContext
限定符和类型 | 字段和说明 |
---|---|
static int |
DEFAULT_PERIOD
已过时。
Default period in seconds at which data is sent to the metrics system.
|
限定符和类型 | 方法和说明 |
---|---|
void |
close()
已过时。
Stops monitoring and also frees any buffered data, returning this
object to its initial state.
|
MetricsRecord |
createRecord(String recordName)
已过时。
Creates a new MetricsRecord instance with the given
recordName . |
Map<String,Collection<OutputRecord>> |
getAllRecords()
已过时。
Retrieves all the records managed by this MetricsContext.
|
String |
getContextName()
已过时。
Returns the context name.
|
int |
getPeriod()
已过时。
Returns the timer period.
|
void |
init(String contextName,
ContextFactory factory)
已过时。
Initialize this context.
|
boolean |
isMonitoring()
已过时。
Returns true if monitoring is currently in progress.
|
void |
registerUpdater(Updater updater)
已过时。
Registers a callback to be called at regular time intervals, as
determined by the implementation-class specific configuration.
|
void |
startMonitoring()
已过时。
Starts or restarts monitoring, the emitting of metrics records as they are
updated.
|
void |
stopMonitoring()
已过时。
Stops monitoring.
|
void |
unregisterUpdater(Updater updater)
已过时。
Removes a callback, if it exists.
|
static final int DEFAULT_PERIOD
void init(String contextName, ContextFactory factory)
contextName
- The given name for this contextfactory
- The creator of this contextString getContextName()
void startMonitoring() throws IOException
IOException
void stopMonitoring()
startMonitoring()
again after calling
this.close()
boolean isMonitoring()
void close()
MetricsRecord createRecord(String recordName)
recordName
.
Throws an exception if the metrics implementation is configured with a fixed
set of record names and recordName
is not in that set.recordName
- the name of the recordMetricsException
- if recordName conflicts with configuration datavoid registerUpdater(Updater updater)
updater
- object to be run periodically; it should updated
some metrics records and then returnvoid unregisterUpdater(Updater updater)
updater
- object to be removed from the callback listint getPeriod()
Map<String,Collection<OutputRecord>> getAllRecords()
Copyright © 2009 The Apache Software Foundation