Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-2661

Coordinator Action status not updated when workflow job SUSPENDED

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.3.0
    • None
    • None

    Description

      It's a bug in Oozie. CoordActionCheckXCommand doesn't take care of SUSPENDED state. It only handles SUCCEEDED, FAILED and KILLED.

      protected Void execute() throws CommandException {
              try {
                  InstrumentUtils.incrJobCounter(getName(), 1, getInstrumentation());
                  Status slaStatus = null;
                  CoordinatorAction.Status initialStatus = coordAction.getStatus();
      
                  if (workflowJob.getStatus() == WorkflowJob.Status.SUCCEEDED) {
                      coordAction.setStatus(CoordinatorAction.Status.SUCCEEDED);
                      // set pending to false as the status is SUCCEEDED
                      coordAction.setPending(0);
                      slaStatus = Status.SUCCEEDED;
                  }
                  else {
                      if (workflowJob.getStatus() == WorkflowJob.Status.FAILED) {
                          coordAction.setStatus(CoordinatorAction.Status.FAILED);
                          slaStatus = Status.FAILED;
                          // set pending to false as the status is FAILED
                          coordAction.setPending(0);
                      }
                      else {
                          if (workflowJob.getStatus() == WorkflowJob.Status.KILLED) {
                              coordAction.setStatus(CoordinatorAction.Status.KILLED);
                              slaStatus = Status.KILLED;
                              // set pending to false as the status is KILLED
                              coordAction.setPending(0);
                          }
                          else {
                              LOG.warn("Unexpected workflow " + workflowJob.getId() + " STATUS " + workflowJob.getStatus());
                              coordAction.setLastModifiedTime(new Date());
                              CoordActionQueryExecutor.getInstance().executeUpdate(
                                      CoordActionQueryExecutor.CoordActionQuery.UPDATE_COORD_ACTION_FOR_MODIFIED_DATE,
                                      coordAction);
                              return null;
                          }
                      }
                  }
      
      

      Thank you puru for pointing it out.

      Attachments

        1. OOZIE-2661-1.patch
          3 kB
          Satish Saley
        2. OOZIE-2661-2.patch
          5 kB
          Satish Saley
        3. OOZIE-2661-3.patch
          3 kB
          Satish Saley
        4. OOZIE-2661-4.patch
          3 kB
          Satish Saley

        Issue Links

          Activity

            People

              satishsaley Satish Saley
              satishsaley Satish Saley
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: