From a3b4575f700c20167a6ab0b774d8a2c9cd3916af Mon Sep 17 00:00:00 2001 From: Elliott Clark Date: Wed, 24 Feb 2016 09:02:06 -0800 Subject: [PATCH] HBASE-15319 clearJmxCache does not take effect actually --- .../java/org/apache/hadoop/metrics2/impl/JmxCacheBuster.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/metrics2/impl/JmxCacheBuster.java b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/metrics2/impl/JmxCacheBuster.java index 95734ba4e6f..8fcf623a037 100644 --- a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/metrics2/impl/JmxCacheBuster.java +++ b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/metrics2/impl/JmxCacheBuster.java @@ -52,7 +52,7 @@ public class JmxCacheBuster { public static void clearJmxCache() { //If there are more then 100 ms before the executor will run then everything should be merged. ScheduledFuture future = fut.get(); - if ((future == null || (!future.isDone() && future.getDelay(TimeUnit.MILLISECONDS) > 100))) { + if ((future != null && (!future.isDone() && future.getDelay(TimeUnit.MILLISECONDS) > 100))) { // BAIL OUT return; }