You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Virag Kothari (JIRA)" <ji...@apache.org> on 2012/12/14 00:58:12 UTC
[jira] [Commented] (OOZIE-1131)
CoordRerunXCommand.verifyPrecondition modifies state since OOZIE-1065
[ https://issues.apache.org/jira/browse/OOZIE-1131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13531662#comment-13531662 ]
Virag Kothari commented on OOZIE-1131:
--------------------------------------
I think it should if it the coordinator is in a failed or killed state, so it can let its parent (bundleaction) know about it.
For e.g in OOZIE-1065 description, the first case where a bundle job is rerun with a killed coordinator, the bundle job will itself become running and will initially set the bundle action's pending flag to true. If the killed coordinator never calls its parent (bundleaction) and resets the pending flag, the bundle status transit service wont be able to modify the status of the bundle job.
> CoordRerunXCommand.verifyPrecondition modifies state since OOZIE-1065
> ---------------------------------------------------------------------
>
> Key: OOZIE-1131
> URL: https://issues.apache.org/jira/browse/OOZIE-1131
> Project: Oozie
> Issue Type: Bug
> Components: bundle
> Affects Versions: trunk, 3.3.1
> Reporter: Robert Kanter
> Fix For: trunk, 3.3.1
>
>
> OOZIE-1065 adds the following, which calls a {{BundleStatusUpdateXCommand}}:
> {code}
> protected void verifyPrecondition() throws CommandException, PreconditionException {
> + BundleStatusUpdateXCommand bundleStatusUpdate = new BundleStatusUpdateXCommand(coordJob, coordJob.getStatus());
> if (coordJob.getStatus() == CoordinatorJob.Status.KILLED
> || coordJob.getStatus() == CoordinatorJob.Status.FAILED) {
> LOG.info("CoordRerunXCommand is not able to run, job status=" + coordJob.getStatus() + ", jobid=" + jobId);
> + // Call the parent so the pending flag is reset and state transition
> + // of bundle can happen
> + if (coordJob.getBundleId() != null) {
> + bundleStatusUpdate.call();
> + }
> throw new CommandException(ErrorCode.E1018,
> "coordinator job is killed or failed so all actions are not eligible to rerun!");
> }
> {code}
> {{verifyPrecondition()}} methods shouldn't modify state though
--
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