public void updateBatchSchedule(RequestExecution requestExecution)
    throws AmbariException {
    BatchRequest activeBatch = calculateActiveBatch(requestExecution);
    if (activeBatch == null) {
      LOG.warn("Ignoring RequestExecution status update since all batches has been executed");
      return;
    }
    if (requestExecution.getStatus().equals(SCHEDULED.name())) {
      scheduleBatch(requestExecution, activeBatch.getOrderId());
    } else if (requestExecution.getStatus().equals(PAUSED.name()) ||
               requestExecution.getStatus().equals(ABORTED.name())) {
      LOG.info("Request execution status changed to " + requestExecution.getStatus() + " for request schedule "
        + requestExecution.getId() + ". Deleting related jobs.");
      deleteJobs(requestExecution, activeBatch.getOrderId());
      Collection<Long> requestIDsToAbort = requestExecution.getBatchRequestRequestsIDs(activeBatch.getOrderId());
      for (Long requestId : requestIDsToAbort) {
        //might be null if the request is for not long running job
        if (requestId == null) continue;
        abortRequestById(requestExecution, requestId);
      }
    }
  }
Pause/resume/abort request schedule and related jobs and triggers
@param requestExecution
ambari-server/src/main/java/org/apache/ambari/server/scheduler/ExecutionScheduleManager.java