Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-2557

Counters don't reset state when readFields() called

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      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.

      Attachments

        1. MAPREDUCE-2557-trunk.patch
          3 kB
          William Slacum
        2. MAPREDUCE-2557-style.patch
          2 kB
          William Slacum
        3. MAPREDUCE-2557.patch
          2 kB
          William Slacum

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bills William Slacum
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0.5h
                  0.5h
                  Remaining:
                  Remaining Estimate - 0.5h
                  0.5h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified