hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matteo Bertozzi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13759) Improve procedure yielding
Date Fri, 29 May 2015 15:57:17 GMT

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

Matteo Bertozzi commented on HBASE-13759:

{quote}nit: Is state superfluous in below? Doesn't the executor know the 'state' already{quote}
you mean Procedure instead of Executor?
the idea is this: the executor executes one step, and then asks. "do you want me to execute
you again or do you want someone else to run?"

for the StateMachineProcedure instead of the isYieldAfterExecutionStep(fTEnvironment) from
the base procedure you can have more information. so the executor calls isYieldBeforeExecuteFromState(TEnvironment,
TState) asking you if you want to yield before executing "state". the StateMachineProcedure
in theory should not store the state, you can grab it from getCurrentState(), but as mirror
of executeFromState(TEnvironment, TState) you don't have to know anything about the class
below, and you just have to implement execute/rollback/yield for that particular state that
the framework is telling you to execute.

> Improve procedure yielding
> --------------------------
>                 Key: HBASE-13759
>                 URL: https://issues.apache.org/jira/browse/HBASE-13759
>             Project: HBase
>          Issue Type: Sub-task
>          Components: proc-v2
>    Affects Versions: 2.0.0, 1.2.0
>            Reporter: Matteo Bertozzi
>            Assignee: Matteo Bertozzi
>            Priority: Trivial
>             Fix For: 2.0.0, 1.2.0
>         Attachments: HBASE-13759-v0.patch, HBASE-13759-v1.patch
> Adds the ability to yield the procedure every execution step.
> by default, a procedure will try to go begin to end without stopping.
> This allows procedures to be nice to other procedures.
> one usage example is ServerShutdownHandler where we want everyone to make some progress.
> Allows procedure to throw InterruptedException, the default handling will be:
> "ask the master if there is an abort of stop. If there is, stop executions and exit.
Else, clear the IE and carryon executing. the interruted procedure will retry".
> If the procedure implementor wants a different behavior, the IE can be catched and custom
handling can be performed.

This message was sent by Atlassian JIRA

View raw message