Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13615

Convert uses of AtomicLong for counter metrics to LongAdder

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: None
    • Component/s: metrics
    • Labels:
      None

      Description

      LongAdder (available in JDK8) can provide much better performance than AtomicLong since it uses thread locals under the hood.

      We should consider switching over our uses of AtomicLong and friends over to LongAdder.

      If we want to target for JDK7, we can also pull in the implementation since it's pure Java (public domain):

      http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/jsr166e/LongAdder.java?view=co

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                andrew.wang Andrew Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: