Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-15319

clearJmxCache does not take effect actually

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2.0, 1.1.0.1, 1.3.0, 2.0.0
    • 1.3.0, 1.2.1, 2.0.0
    • metrics
    • Reviewed

    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;
          }
          ......
      }
      

      Attachments

        1. HBASE-15319.patch
          1 kB
          Elliott Neil Clark

        Activity

          People

            eclark Elliott Neil Clark
            lin-hao Hao Lin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: