You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Maysam Yabandeh (JIRA)" <ji...@apache.org> on 2014/11/18 02:16:34 UTC

[jira] [Updated] (HADOOP-11301) [optionally] update jmx cache to drop old metrics

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

Maysam Yabandeh updated HADOOP-11301:
-------------------------------------
    Attachment: HADOOP-11301.v01.patch

[~andrew.wang], I am attaching the initial patch that demonstrates the problem and offers a basic solution that we employed in nntop.

> [optionally] update jmx cache to drop old metrics
> -------------------------------------------------
>
>                 Key: HADOOP-11301
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11301
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Maysam Yabandeh
>            Assignee: Maysam Yabandeh
>         Attachments: HADOOP-11301.v01.patch
>
>
> MetricsSourceAdapter::updateJmxCache() skips updating the info cache if no new metric is added since last time:
> {code}
>       int oldCacheSize = attrCache.size();
>       int newCacheSize = updateAttrCache();
>       if (oldCacheSize < newCacheSize) {
>         updateInfoCache();
>       }
> {code}
> This behavior is not desirable in some applications. For example nntop (HDFS-6982) reports the top users via jmx. The list is updated after each report. The previously reported top users hence should be removed from the cache upon each report request.
> In our production run of nntop we made a change to ignore the size check and always perform updateInfoCache. I am planning to submit a patch including this change. The feature can be enabled by a configuration parameter.



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