[ https://issues.apache.org/jira/browse/HBASE-17716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15892929#comment-15892929 ]
stack commented on HBASE-17716: ------------------------------- Thanks for chiming in [~samarthjain] bq. The metric keys aren't exposed today unless someone goes and looks at the HBase source code. Aren't they exported as JMX and in our metrics dump page? They are for all intensive purposes 'public'. We do not have the same rigor regards change as we do w/ our public APIs but there'd be pushback if a contributor tried a random rename. Regards our not exporting a list other than in jsp or in jmx, thats a failing on our part. In the past, a thought was to put up an hbase instance as part of the build, crawl its exported metrics with descriptions and then dump out a page we could incorporate into our refguide. Doing this would shine a light on how poor our descriptions are currently I'd think at a minimum of how they need work. I'm trying to understand the value of the enum indirection. Is there a history of our randomly changing metric names out from under phoenix (other than at say key junctions such as a major release?). And if enum'ing has a value, should we do it for all metrics rather than just a subset as here? bq. On a side note, I am not sure of the motivation behind exposing the setCounter() like methods in the ServerSideScanMetrics class. Taking a quick look, it seems to be for serialization -- sending ScanMetrics over RPC. We should mark such methods as not for external use... our fault. > 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)