Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7E51A1837F for ; Sun, 24 May 2015 22:06:17 +0000 (UTC) Received: (qmail 69319 invoked by uid 500); 24 May 2015 22:06:17 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 69268 invoked by uid 500); 24 May 2015 22:06:17 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 69256 invoked by uid 99); 24 May 2015 22:06:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 May 2015 22:06:17 +0000 Date: Sun, 24 May 2015 22:06:17 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-13759) Improve procedure yielding MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-13759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14557862#comment-14557862 ] stack commented on HBASE-13759: ------------------------------- Do you want to ask the host if it is aborting or stopping in here handleInterruptedException? The implementation of isYieldAfterExecutionStep is done by doing a isYieldBeforeExecuteFromState in StateMachineProcedure? Interesting... 141 protected boolean isYieldAfterExecutionStep(final TEnvironment env) { 142 return isYieldBeforeExecuteFromState(env, getCurrentState()); 143 } Patch LGTM. +1 after hadoopqa passes. > 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 > > > 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 (v6.3.4#6332)