[
https://issues.apache.org/jira/browse/HBASE-17716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15892816#comment-15892816
]
Samarth Jain commented on HBASE-17716:
--------------------------------------
[[email protected]] - the general idea behind this JIRA was to make sure
that users of scan metrics like Phoenix can guard against the metric name
getting changed behind the scenes. The metric keys aren't exposed today unless
someone goes and looks at the HBase source code. Having a metric enum sort of
formalizes the contract of the API instead of having plain strings.
On a side note, I am not sure of the motivation behind exposing the
setCounter() like methods in the ServerSideScanMetrics class. Was it intended
to be like a grab-bag where clients can add and update whatever metrics they
would like to? If not, then we should really get rid of such methods, and
simply initialize the backing map by creating counters for all the enums in the
Metric enum.
> Formalize Scan Metric names
> ---------------------------
>
> Key: HBASE-17716
> URL: https://issues.apache.org/jira/browse/HBASE-17716
> Project: HBase
> Issue Type: Bug
> Components: metrics
> Reporter: Karan Mehta
> Assignee: Karan Mehta
> Priority: Minor
> Attachments: HBASE-17716.patch
>
>
> HBase provides various metrics through the API's exposed by ScanMetrics
> class.
> The JIRA PHOENIX-3248 requires them to be surfaced through the Phoenix
> Metrics API. Currently these metrics are referred via hard-coded strings,
> which are not formal and can break the Phoenix API. Hence we need to refactor
> the code to assign enums for these metrics.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)