|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
org.apache.hadoop.metrics2 usage.
@Deprecated @InterfaceAudience.Private @InterfaceStability.Evolving public interface MetricsContext
The main interface to the metrics package.
| Field Summary | |
|---|---|
static int |
DEFAULT_PERIOD
Deprecated. Default period in seconds at which data is sent to the metrics system. |
| Method Summary | |
|---|---|
void |
close()
Deprecated. Stops monitoring and also frees any buffered data, returning this object to its initial state. |
MetricsRecord |
createRecord(String recordName)
Deprecated. Creates a new MetricsRecord instance with the given recordName. |
Map<String,Collection<OutputRecord>> |
getAllRecords()
Deprecated. Retrieves all the records managed by this MetricsContext. |
String |
getContextName()
Deprecated. Returns the context name. |
int |
getPeriod()
Deprecated. Returns the timer period. |
void |
init(String contextName,
ContextFactory factory)
Deprecated. Initialize this context. |
boolean |
isMonitoring()
Deprecated. Returns true if monitoring is currently in progress. |
void |
registerUpdater(Updater updater)
Deprecated. Registers a callback to be called at regular time intervals, as determined by the implementation-class specific configuration. |
void |
startMonitoring()
Deprecated. Starts or restarts monitoring, the emitting of metrics records as they are updated. |
void |
stopMonitoring()
Deprecated. Stops monitoring. |
void |
unregisterUpdater(Updater updater)
Deprecated. Removes a callback, if it exists. |
| Field Detail |
|---|
static final int DEFAULT_PERIOD
| Method Detail |
|---|
void init(String contextName,
ContextFactory factory)
contextName - The given name for this contextfactory - The creator of this contextString getContextName()
void startMonitoring()
throws IOException
IOExceptionvoid 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 record
MetricsException - 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||