Description
Copied from @appy's comments in HBASE-17888:
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.
Please refer to the discussion on that JIRA.
Attachments
Issue Links
- is a parent of
-
HBASE-16549 Procedure v2 - Add new AM metrics
- Closed
-
HBASE-17911 Refactor ProcedureExecutor to have single code path for submitting proc and subprocs
- Open
-
HBASE-17945 Procedure V2: Add new Snapshot metrics to Snapshot procedure
- Closed
- relates to
-
HBASE-17888 Add generic methods for updating metrics on start and end of a procedure execution
- Closed