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

metrics API should enforce some restrictions on tag and metric names

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.10.1
    • None
    • metrics
    • None

    Description

      The metrics API currently allows any string to be a metric name or tag name (see org.apache.hadoop.metrics.Metrics.createRecord(...) and org.apache.hadoop.metrics .Metrics.report(...)).

      Such unrestricted names makes it difficult to implement metrics providers that generate source code to manipulate these metrics, since many characters are invalid as method or variable names.

      I'd like to propose that metric names be restricted to letters, digits, and underscore (A-Za-z0-9_) and this restriction be documented and enforced by the API.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nidaley Nigel Daley
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: