|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.metrics2.MetricsSystem
@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class MetricsSystem
The metrics system interface
Constructor Summary | |
---|---|
MetricsSystem()
|
Method Summary | ||
---|---|---|
abstract void |
publishMetricsNow()
Requests an immediate publish of all metrics from sources to sinks. |
|
abstract void |
register(org.apache.hadoop.metrics2.MetricsSystem.Callback callback)
Register a callback interface for JMX events |
|
abstract
|
register(String name,
String desc,
T source)
Register a metrics source |
|
abstract
|
register(String name,
String desc,
T sink)
Register a metrics sink |
|
|
register(T source)
Register a metrics source (deriving name and description from the object) |
|
abstract boolean |
shutdown()
Shutdown the metrics system completely (usually during server shutdown.) The MetricsSystemMXBean will be unregistered. |
|
abstract void |
unregisterSource(String name)
Unregister a metrics source |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.metrics2.MetricsSystemMXBean |
---|
currentConfig, start, startMetricsMBeans, stop, stopMetricsMBeans |
Constructor Detail |
---|
public MetricsSystem()
Method Detail |
---|
public abstract <T> T register(String name, String desc, T source)
T
- the actual type of the source objectsource
- object to registername
- of the source. Must be unique or null (then extracted from
the annotations of the source object.)desc
- the description of the source (or null. See above.)
MetricsException
public abstract void unregisterSource(String name)
name
- of the source. This is the name you use to call register()public <T> T register(T source)
T
- the actual type of the source objectsource
- object to register
MetricsException
public abstract <T extends MetricsSink> T register(String name, String desc, T sink)
T
- the type of the sinksink
- to registername
- of the sink. Must be unique.desc
- the description of the sink
MetricsException
public abstract void register(org.apache.hadoop.metrics2.MetricsSystem.Callback callback)
callback
- the callback object implementing the MBean interface.public abstract void publishMetricsNow()
public abstract boolean shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |