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

adding counters methods using String (as opposed to Enum)

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.18.0
    • None
    • None
    • all

    • Reviewed
    • Provided a new method to update counters. "incrCounter(String group, String counter, long amount)"

    Description

      Currently to use the counters from within Map/Reduce code Enums have to be used, the Enum class defines the group and the Enum itself the counter. Internally they are converted to Strings (the class name and the enum toString) and you can retrieve them as strings from the client API.

      Using dynamic counters (driven by configuration of the map/reduce) is not easy with the counters Enum based API. For example, currently I have an Enum class with 50 enums and we have to map the cardinality to the counter name on the client. This is cumbersome.

      This could be easily improve by adding a String based counter method increment(String group, String counter, long count) to allow use of the counters without Enums.

      Internally this method already exists, so the changes are minimal.

      Attachments

        1. hadoop-1915.patch
          10 kB
          Thomas White
        2. hadoop-1915-v10.patch
          17 kB
          Thomas White
        3. hadoop-1915-v2.patch
          10 kB
          Thomas White
        4. hadoop-1915-v3.patch
          10 kB
          Thomas White
        5. hadoop-1915-v4.patch
          13 kB
          Thomas White
        6. hadoop-1915-v5.patch
          13 kB
          Thomas White
        7. hadoop-1915-v6.patch
          13 kB
          Thomas White
        8. hadoop-1915-v7.patch
          13 kB
          Owen O'Malley
        9. hadoop-1915-v8.patch
          13 kB
          Thomas White
        10. hadoop-1915-v9.patch
          13 kB
          Thomas White

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tomwhite Thomas White
            tucu00 Alejandro Abdelnur
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment