Class JmxCacheBuster

java.lang.Object
org.apache.hadoop.metrics2.impl.JmxCacheBuster

@Private public final class JmxCacheBuster extends Object
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.
  • Field Details

  • Constructor Details

  • Method Details

    • clearJmxCache

      public static void clearJmxCache()
      For JMX to forget about all previously exported metrics.
    • stop

      public static void 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

      public static void restart()
      Restarts the stopped service.
      See Also: