|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<DefaultMetricsSystem>
org.apache.hadoop.metrics2.lib.DefaultMetricsSystem
public enum DefaultMetricsSystem
The default metrics system singleton
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.hadoop.metrics2.MetricsSystem |
|---|
MetricsSystem.AbstractCallback, MetricsSystem.Callback |
| Enum Constant Summary | |
|---|---|
INSTANCE
The singleton instance |
|
| Method Summary | ||
|---|---|---|
String |
currentConfig()
|
|
static MetricsSystem |
initialize(String prefix)
Common static convenience method to initialize the metrics system |
|
void |
publishMetricsNow()
Requests an immediate publish of all metrics from sources to sinks. |
|
void |
refreshMBeans()
Force a refresh of MBeans |
|
void |
register(MetricsSystem.Callback callback)
Register a callback interface for JMX events |
|
|
register(String name,
String desc,
T sink)
Register a metrics sink |
|
|
register(String name,
String desc,
T source)
Register a metrics source |
|
static
|
registerSource(String name,
String desc,
T source)
Common static method to register a 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 |
|
static DefaultMetricsSystem |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
|
static DefaultMetricsSystem[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
|
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final DefaultMetricsSystem INSTANCE
| Method Detail |
|---|
public static DefaultMetricsSystem[] values()
for (DefaultMetricsSystem c : DefaultMetricsSystem.values()) System.out.println(c);
public static DefaultMetricsSystem valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic static MetricsSystem initialize(String prefix)
prefix - for configuration
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 static <T extends MetricsSource> T registerSource(String name,
String desc,
T source)
T - type of the sourcename - of the sourcedesc - descriptionsource - the source object to register
public <T extends MetricsSink> T register(String name,
String desc,
T sink)
MetricsSystem
register in interface MetricsSystemT - the type of the sinkname - of the sink. Must be unique.desc - 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 publishMetricsNow()
MetricsSystem
publishMetricsNow in interface MetricsSystempublic void start()
MetricsSystemMXBean
start in interface MetricsSystemMXBeanpublic void stop()
MetricsSystemMXBean
stop in interface MetricsSystemMXBeanpublic 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 | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||