You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Elliott Clark (JIRA)" <ji...@apache.org> on 2016/02/24 18:05:18 UTC

[jira] [Assigned] (HBASE-15319) clearJmxCache does not take effect actually

     [ https://issues.apache.org/jira/browse/HBASE-15319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Elliott Clark reassigned HBASE-15319:
-------------------------------------

    Assignee: Elliott Clark

> clearJmxCache does not take effect actually
> -------------------------------------------
>
>                 Key: HBASE-15319
>                 URL: https://issues.apache.org/jira/browse/HBASE-15319
>             Project: HBase
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 1.1.0.1
>            Reporter: Hao Lin
>            Assignee: Elliott Clark
>              Labels: easyfix
>
> 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:
> {code:title=org.apache.hadoop.metrics2.impl.JmxCacheBuster.java|borderStyle=solid}
> // 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;
>     }
>     ......
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)