Package org.apache.hadoop.metrics2.lib
Enum Class DefaultMetricsSystem
- All Implemented Interfaces:
Serializable,Comparable<DefaultMetricsSystem>,Constable
The default metrics system singleton. This class is used by all the daemon
processes(such as NameNode, DataNode, JobTracker etc.). During daemon process
initialization the processes call
init(String)
to initialize the MetricsSystem.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic MetricsSysteminitialize(String prefix) Convenience method to initialize the metrics systemstatic booleanstatic MetricsSysteminstance()static ObjectNamenewMBeanName(String name) static voidremoveMBeanName(ObjectName name) static voidremoveSourceName(String name) static MetricsSystemsetInstance(MetricsSystem ms) static voidsetMiniClusterMode(boolean choice) static voidshutdown()Shutdown the metrics systemstatic StringsourceName(String name, boolean dupOK) static DefaultMetricsSystemReturns the enum constant of this class with the specified name.static DefaultMetricsSystem[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
initialize
Convenience method to initialize the metrics system- Parameters:
prefix- for the metrics system configuration- Returns:
- the metrics system instance
-
instance
- Returns:
- the metrics system object
-
shutdown
public static void shutdown()Shutdown the metrics system -
setInstance
-
setMiniClusterMode
@VisibleForTesting public static void setMiniClusterMode(boolean choice) -
inMiniClusterMode
@VisibleForTesting public static boolean inMiniClusterMode() -
newMBeanName
-
removeMBeanName
-
removeSourceName
-
sourceName
-