[ 
https://issues.apache.org/jira/browse/OOZIE-1202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13568294#comment-13568294
 ] 

Robert Kanter commented on OOZIE-1202:
--------------------------------------

I missed {{TestWorkflowActionKillXCommand}} when looking for the test cases for 
{{ActionKillXCommand}}, which is why I created a new one, 
{{TestActionKillXCommand}}.  Looking at {{TestWorkflowActionKillXCommand}}, it 
looks like the original behavior is the expected correct behavior.  That is, 
running {{ActionKillXCommand}} against an action that is already KILLED will 
kill it and the underlying MR job, but running {{ActionKillXCommand}} against 
an action that is still RUNNING will do nothing.  Why is it like this?  
                
> ActionKillXCommand precondition is wrong
> ----------------------------------------
>
>                 Key: OOZIE-1202
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1202
>             Project: Oozie
>          Issue Type: Bug
>          Components: action
>    Affects Versions: trunk
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>             Fix For: trunk
>
>         Attachments: OOZIE-1202.patch
>
>
> The {{ActionKillXCommand}}, which kills actions, has the following 
> precondition:
> {code}
> protected void verifyPrecondition() throws CommandException, 
> PreconditionException {
>     if (wfAction.getStatus() != WorkflowActionBean.Status.KILLED) {
>         throw new PreconditionException(ErrorCode.E0726, wfAction.getId());
>     }
> }
> {code}
> This means that if the only way to pass the precondition is for the action to 
> already have been KILLED, which is backwards.  We want the precondition to 
> pass only when the action has not already been KILLED.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to