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 Fri, 14 Apr 2017 01:27:41 GMT

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

Appy commented on HBASE-17888:

I agree with all of your thoughts above.
#1 & #3 makes sense. Adding 2-3 metrics already makes the system better. Not saying that
we should add everything now.
#2, you're right that not all states are needed.

The reason i proposed a new design earlier was because
- it wasn't much code change (should take like <15 min)
- uses already defined procedure states in a clever way
- integrates at a single point with procExecutor. With current design, i am sure it'll lead
to hooks all over the code in future.

void setState(newstate) {
  updateMetrics(oldState, newState);  

void updateMetrics(oldState, newState) {
  if (oldState == INITIALIZING && newState == RUNNABLE) {
  } else if (newState == SUCCESS || newState==FAILED) {

At this point, i think we have spent too much time on this already. So i'll also say, '+1
on current patch'.
Choose whichever design seems best to you.

> 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, HBASE-17888.v3.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