Details
Description
When trying to backport HBASE-14166 to 0.98.6, I find JmxCacheBuster::clearJmxCache() does no take effect actually. The related code are listed below:
org.apache.hadoop.metrics2.impl.JmxCacheBuster.java
// fut is initialized to null private static AtomicReference<ScheduledFuture> fut = new AtomicReference<>(null); public static void clearJmxCache() { // clearJmxCache return directly when fut is null, which is always true. // the actual intent is 'if (future != null && !future.isDone ...)' ? ScheduledFuture future = fut.get(); if ((future == null || (!future.isDone() && future.getDelay(TimeUnit.MILLISECONDS) > 100))) { return; } ...... }