hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Appy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17888) Add generic methods for updating metrics on start and end of a procedure execution
Date Thu, 13 Apr 2017 18:41:41 GMT

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

Appy commented on HBASE-17888:

I was gonna +1 it earlier and see how next changes iterated on design, but that was before
our discussion on {{updateMetricsOnStart}} got going.
That made me take a step back and think about overall design. I posted the suggestion in RB
yesterday (copying here). I think the idea ties metrics system to proc executor quite neatly.
Let me know your thoughts.
Thinking about rough design for 'metrics in proc framework', here are the main ideas which
click me:

* There should be clearly defined (and well documented) points where metrics are updated.
Ideally, these points should be either single line in code and/or well defined state (great
if both).
Currently it's not well defined state, and requires hooks from multiple code paths.
With current approach, I am afraid that it might 'evolve' like other components, and those
not much familier with this code may add more updateMetricsOnFoo() methods from random points
in exectuor.

* One possible design is: Initiate all metric updates from setState() function. That ties
metrics design to a single well defined point in ProcExecutor. Also, that way we can have:
1. updateMetricsOn<State>() functions: to update metrics on well defined states 
2. update metrics on few interesting transitions. For eg.
 -updateMetricsOnSubmit(): when state changes from INITIALIZING to RUNNABLE.
 -updateMetricsOnFinish(): when state changes to SUCCESS or FINISH.

- There should be two sets of metrics: core metrics and feature metrics.
Core metrics will include things like proc wait time, proc execute time, number of yeilds,
num subprocedures, etc
Feature metrics : Metrics like RIT metrics, snapshot metrics, etc.
Just to make sure, we are only designing for 'core metrics' and not 'feature metrics' here
right? Am confused since there are description changes for 'feature metrics' in this patch.
If we are designing for core metrics, it would be good to see actual metrics in next patch.
That would help to see if particular updateMetricsOn*() hook makes sense.

> Add generic methods for updating metrics on start and end of a procedure execution
> ----------------------------------------------------------------------------------
>                 Key: HBASE-17888
>                 URL: https://issues.apache.org/jira/browse/HBASE-17888
>             Project: HBase
>          Issue Type: Improvement
>          Components: proc-v2
>            Reporter: Umesh Agashe
>            Assignee: Umesh Agashe
>         Attachments: HBASE-17888.v1.patch, HBASE-17888.v2.patch
> For all procedures in Procv2 framework, Procedure class can have generic methods to update
metrics on start and end of a procedure execution. Specific procedure can override these and
implement/ update respective metrics. Default implementation needs to be provided so override
and implementation is optional.

This message was sent by Atlassian JIRA

View raw message