You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Robert Kanter (JIRA)" <ji...@apache.org> on 2012/12/14 00:38:12 UTC

[jira] [Created] (OOZIE-1131) CoordRerunXCommand.verifyPrecondition modifies state since OOZIE-1065

Robert Kanter created OOZIE-1131:
------------------------------------

             Summary: 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 should 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