Inline all string members of `alluxio.metrics.MetricKey.Name`
apc999 opened this issue · 0 comments
apc999 commented
class alluxio.metrics.MetricKey.Name
is currently used as a placeholder for all string names of each alluxio.metrics.MetricKey
.
In practise, having this placeholder class is unnecessary and actually making adding a new metrics more complicated.
Given all members in this class are only used in ``alluxio.metrics.MetricKey`, this issue aims to simplify the class by inlining all occurrences of these members.
For example, to inline Name.MASTER_ABSENT_CACHE_HITS
, we can change
public static final MetricKey MASTER_ABSENT_CACHE_HITS =
new Builder(Name.MASTER_ABSENT_CACHE_HITS)
.setDescription("Number of cache hits on the absent cache")
.setMetricType(MetricType.COUNTER)
.build();
to
public static final MetricKey MASTER_ABSENT_CACHE_HITS =
new Builder("Master.AbsentCacheHits")
.setDescription("Number of cache hits on the absent cache")
.setMetricType(MetricType.COUNTER)
.build();