hbase-issues mailing list archives

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

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

stack commented on HBASE-17716:

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

All scans. Not per scan for sure. You want per scan (I suppose so, yeah, makes sense). What
is weird here is that this metrics is NOT available via JMX.

bq. 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

This seems like a good idea to me. It'd be cleanup on our part recognizing that metric names
are not internals-only.

On @Metric, chatting w/ coworker, how about we just used our current InterfaceAudience annotations?
A metric name is probably inside a class that is stamped as Private. We'd annotate the static
final name as InterfaceAudience.Public. I could add a type so we could actually write @InterfaceAudience.Public(HBaseInterfaceAudience.METRIC)
so it would be clear why we have this String in the middle of an internal class as public.
My coworker ([~jmhsieh]) suggested that not all metrics would get this stamping, just those
we know for sure should never change -- the ones folks depend on -- and other metrics might
get a LimitedPrivate stamping (or as is currently allowed, no stamping means PRIVATE).

Would something like this work [~samarth.jain@gmail.com]? If so, I'll go shop it up on dev
list and then we can change this patch to implement?

I'll skip the enum thing. There are benefits but minimal and we could attack these in another

> 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