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

Make metrics naming consistent

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.20.2, 0.21.0
    • None
    • metrics
    • None
    • Incompatible change
    • Hide
      Harmonizing metrics names to CapitalizedCamelCase.

      Examples: bytes_written becomes BytesWritten; threadsBlocked becomes ThreadsBlocked etc.
      Show
      Harmonizing metrics names to CapitalizedCamelCase. Examples: bytes_written becomes BytesWritten; threadsBlocked becomes ThreadsBlocked etc.
    • metrics

    Description

      While working HADOOP-6728, I noticed that our metrics naming style is all over the place:

      • Capitalized camel case: e.g., "FilesCreated" in namenode metrics and some rpc metrics
      • uncapitalized camel case: e.g, "threadsBlocked" in jvm metrics and some rpc metrics
      • lowercased underscored: e.g., "bytes_written" in datanode metrics and mapreduce metrics

      Let's make them consistent. How about uncapitalized camel case? My main reason for the camel case: some backends have limits on the name length and underscore is wasteful.

      Once we have a consistent naming style we can do:
      @Metric("Number of INodes created") MutableCounterLong filesCreated;

      instead of the more redundant:
      @Metric(

      {"FilesCreated", "Number of INodes created"}

      ) MutableCounterLong filesCreated;

      Attachments

        Issue Links

          Activity

            People

              vicaya Luke Lu
              vicaya Luke Lu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: