hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harsh J (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-2557) Counters don't reset state when readFields() called
Date Mon, 05 Sep 2011 04:43:10 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-2557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13097000#comment-13097000
] 

Harsh J commented on MAPREDUCE-2557:
------------------------------------

Hello William,

Thanks for the patch!

Can you re-up an updated patch for trunk, granting ASF permissions to use the patch? This
is doable by checking the "Grant license to ASF for inclusion in ASF works" option when attaching
a file via more-actions>attach-files dialog. It is required if you intend the patch to
be committed into the project.

> 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
>         Attachments: MAPREDUCE-2557-style.patch, MAPREDUCE-2557.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> 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

        

Mime
View raw message