@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class MetricsSystem extends Object implements MetricsSystemMXBean
MetricsSource generate and update metrics information.MetricsSink consume the metrics informationMetricsSource and MetricsSink register with the metrics
 system. Implementations of MetricsSystem polls the
 MetricsSources periodically and pass the MetricsRecords to
 MetricsSink.| コンストラクタと説明 | 
|---|
| MetricsSystem() | 
| 修飾子とタイプ | メソッドと説明 | 
|---|---|
| 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 <T> T | register(String name,
        String desc,
        T source)Register a metrics source | 
| abstract <T extends MetricsSink> | register(String name,
        String desc,
        T sink)Register a metrics sink | 
| <T> T | 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.) | 
| abstract void | unregisterSource(String name)Unregister a metrics source | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcurrentConfig, start, startMetricsMBeans, stop, stopMetricsMBeanspublic MetricsSystem()
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.)MetricsExceptionpublic 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 registerMetricsExceptionpublic 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 sinkMetricsExceptionpublic 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()
Copyright © 2016 Apache Software Foundation. All rights reserved.