|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.metrics2.impl.MetricsSystemImpl
public class MetricsSystemImpl
A base class for metrics system singletons
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.hadoop.metrics2.MetricsSystem |
|---|
MetricsSystem.AbstractCallback, MetricsSystem.Callback |
| Constructor Summary | |
|---|---|
MetricsSystemImpl()
Construct the system but not initializing (read config etc.) it. |
|
MetricsSystemImpl(String prefix)
Construct the metrics system |
|
| Method Summary | ||
|---|---|---|
String |
currentConfig()
|
|
void |
init(String prefix)
Initialized the metrics system with a prefix. |
|
void |
refreshMBeans()
Force a refresh of MBeans |
|
void |
register(MetricsSystem.Callback callback)
Register a callback interface for JMX events |
|
|
register(String name,
String description,
T sink)
Register a metrics sink |
|
|
register(String name,
String desc,
T source)
Register a metrics source |
|
void |
shutdown()
Shutdown the metrics system completely (usually during server shutdown.) The MetricsSystemMXBean will be unregistered. |
|
void |
start()
Start the metrics system |
|
void |
stop()
Stop the metrics system |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MetricsSystemImpl(String prefix)
prefix - for the systempublic MetricsSystemImpl()
| Method Detail |
|---|
public void init(String prefix)
prefix - the system will look for configs with the prefixpublic void start()
MetricsSystemMXBean
start in interface MetricsSystemMXBeanpublic void stop()
MetricsSystemMXBean
stop in interface MetricsSystemMXBean
public <T extends MetricsSource> T register(String name,
String desc,
T source)
MetricsSystem
register in interface MetricsSystemT - the type of the sourcename - of the source. Must be unique.desc - the description of the source.source - to register
public <T extends MetricsSink> T register(String name,
String description,
T sink)
MetricsSystem
register in interface MetricsSystemT - the type of the sinkname - of the sink. Must be unique.description - the description of the sinksink - to register
public void register(MetricsSystem.Callback callback)
MetricsSystem
register in interface MetricsSystemcallback - the callback object implementing the MBean interface.public void refreshMBeans()
MetricsSystemMXBean
refreshMBeans in interface MetricsSystemMXBeanpublic String currentConfig()
currentConfig in interface MetricsSystemMXBeanpublic void shutdown()
MetricsSystem
shutdown in interface MetricsSystem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||