[
https://issues.apache.org/jira/browse/HADOOP-13339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tsuyoshi Ozawa resolved HADOOP-13339.
-------------------------------------
Resolution: Duplicate
Dup of HADOOP-11361. Closing this.
> MetricsSourceAdapter#updateAttrCache may throw NPE due to NULL lastRecs
> -----------------------------------------------------------------------
>
> Key: HADOOP-13339
> URL: https://issues.apache.org/jira/browse/HADOOP-13339
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Yongjun Zhang
> Assignee: Yongjun Zhang
>
> The for loop below may find lastRecs NULL
> {code}
> private int updateAttrCache() {
> LOG.debug("Updating attr cache...");
> int recNo = 0;
> int numMetrics = 0;
> for (MetricsRecordImpl record : lastRecs) {
> for (MetricsTag t : record.tags()) {
> setAttrCacheTag(t, recNo);
> ++numMetrics;
> }
> for (AbstractMetric m : record.metrics()) {
> setAttrCacheMetric(m, recNo);
> ++numMetrics;
> }
> ++recNo;
> }
> LOG.debug("Done. # tags & metrics="+ numMetrics);
> return numMetrics;
> }
> {code}
> and throws NPE.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]