Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
0.10.1
-
None
-
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.