Package org.apache.hadoop.metrics2.impl
Class JmxCacheBuster
java.lang.Object
org.apache.hadoop.metrics2.impl.JmxCacheBuster
JMX caches the beans that have been exported; even after the values are removed from hadoop's
metrics system the keys and old values will still remain. This class stops and restarts the
Hadoop metrics system, forcing JMX to clear the cache of exported metrics. This class need to be
in the o.a.h.metrics2.impl namespace as many of the variables/calls used are package private.
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final class
-
Field Summary
Modifier and TypeFieldDescriptionprivate static MetricsExecutor
private static AtomicReference<ScheduledFuture>
private static final org.slf4j.Logger
private static AtomicBoolean
-
Constructor Summary
-
Method Summary
-
Field Details
-
LOG
-
fut
-
executor
-
stopped
-
-
Constructor Details
-
JmxCacheBuster
private JmxCacheBuster()
-
-
Method Details
-
clearJmxCache
For JMX to forget about all previously exported metrics. -
stop
Stops the clearing of JMX metrics and restarting the Hadoop metrics system. This is needed for some test environments where we manually inject sources or sinks dynamically. -
restart
Restarts the stopped service.- See Also:
-