FAQ
Counters don't reset state when readFields() called
---------------------------------------------------

Key: MAPREDUCE-2557
URL: https://issues.apache.org/jira/browse/MAPREDUCE-2557
Project: Hadoop Map/Reduce
Issue Type: Bug
Reporter: William Slacum
Priority: Trivial


When calling readFields() on a Counters object, the internal state is not completely reset. The IdentityHashMap<Enum<?>, Counter> cache retains all previous mappings, even after the actual CounterGroups are changed. Using the same Counters pointer over and over again results in the cache always keeping the mapping for the first call to getCounter(Enum<?>). I've add a clear() call to the cache when readFields() is called and added a unit test to verify that it works.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmapreduce-dev @
categorieshadoop
postedJun 2, '11 at 2:25a
activeJun 2, '11 at 2:25a
posts1
users1
websitehadoop.apache.org...
irc#hadoop

1 user in discussion

William Slacum (JIRA): 1 post

People

Translate

site design / logo © 2022 Grokbase