hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samarth Jain (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17716) Formalize Scan Metric names
Date Fri, 03 Mar 2017 17:54:45 GMT

    [ https://issues.apache.org/jira/browse/HBASE-17716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15894766#comment-15894766

Samarth Jain commented on HBASE-17716:

bq. Phoenix could read the MBeans.
Are the scan metrics in MBeans for all the scans or are they per scan level? 

bq. So, enums. Is the above the only advantage you see to enum'ing all of our metrics? Its
minor, no? You have some perf stats to go along w/ above?
It's not a big deal really. We could have metric names defined as public static final String
too with their declarations annotated with the @Metric annotation to tell HBase developers
not to change these names. No perf stats as such. I was going more by the java-doc of enum

*  Enum maps
* are represented internally as arrays.  This representation is extremely
* compact and efficient.

I was thinking more in terms of map collisions and having to expand the map when more metrics
get added. Not sure if the argument would apply here though since number of metrics are limited.

bq.  And would this be just for the way phoenix accesses the metrics or could hbase benefit
One benefit I can think of is that in the proto-buf serialization, if we have metrics as enums,
we can get away with just serializing the ordinal position of the enum instead of sending
the entire metric string. It will save us a few bytes of network.  

> 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

View raw message