[
https://issues.apache.org/jira/browse/HBASE-17716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15893661#comment-15893661
]
stack commented on HBASE-17716:
-------------------------------
bq. I am guessing the dump in JMX or metrics page is probably just some
aggregated info so may not be useful for us.
Nah. This is our mechanism for publishing metrics. Phoenix could read the
MBeans. That'd have it so you were relying on 'public' Interface rather than
hbase internals.
We could add rules around metric evolution like those we have on our APIs so
downstreamers could have something to rely on if that'd help.
bq. We would like to have these metric names as constants to provide users
capability of looking up metrics of their choice via static metric names.
bq. It could very well be strings defined as public static final .
This makes sense. We should do this for sure. If it inconvenient for you to get
access, we should clean house. Looking, it looks like metrics are scattered all
around. We could define the names as static final and then perhaps annotate
them as metrics names so easy to find and so they'd be demarked as 'public',
not for change?
bq. With enums though we can use an EnumMap which is more performant and
compact as compared to a HashMap.
So, enums. Is the above the only advantage you see to enum'ing all of our
metrics? Its minor, no? (EnumMap and HashMap both extend AbstractMap -- enum
has advantage hashing since fixed set). You have some perf stats to go along w/
above? And would this be just for the way phoenix accesses the metrics or could
hbase benefit too?
Thanks.
> 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)