Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
Description
The for loop below may find lastRecs NULL
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; }
and throws NPE.
Attachments
Issue Links
- duplicates
-
HADOOP-11361 Fix a race condition in MetricsSourceAdapter.updateJmxCache
- Closed