Package org.apache.oozie.command.coord

Examples of org.apache.oozie.command.coord.CoordRerunXCommand


                        String coordEnd = DateUtils.convertDateToString(coordJob.getEndTime());
                        rerunDateScope = coordStart + "::" + coordEnd;
                    }
                    LOG.debug("Queuing rerun range [" + rerunDateScope + "] for coord id " + coordId + " of bundle "
                            + bundleJob.getId());
                    queue(new CoordRerunXCommand(coordId, RestConstants.JOB_COORD_RERUN_DATE, rerunDateScope, refresh,
                            noCleanup));
                    updateBundleAction(coordNameToBAMapping.get(coordName));
                    isUpdateActionDone = true;
                }
                else {
                    LOG.info("Rerun for coord " + coordName + " NOT performed because it is not in bundle ", bundleJob.getId());
                }
            }
        }
        else if (dateScope != null && !dateScope.isEmpty()) {
            if (bundleActions != null) {
                for (BundleActionBean action : bundleActions) {
                    if (action.getCoordId() == null) {
                        LOG.info("No coord id found. Therefore nothing to queue for coord rerun with coord name "
                                + action.getCoordName());
                        continue;
                    }
                    LOG.debug("Queuing rerun range [" + dateScope + "] for coord id " + action.getCoordId() + " of bundle "
                            + bundleJob.getId());
                    queue(new CoordRerunXCommand(action.getCoordId(), RestConstants.JOB_COORD_RERUN_DATE, dateScope,
                            refresh, noCleanup));
                    updateBundleAction(action);
                    isUpdateActionDone = true;
                }
            }
View Full Code Here


     * @throws BaseEngineException
     */
    public CoordinatorActionInfo reRun(String jobId, String rerunType, String scope, boolean refresh, boolean noCleanup)
            throws BaseEngineException {
        try {
      return new CoordRerunXCommand(jobId, rerunType, scope, refresh,
          noCleanup).call();
        }
        catch (CommandException ex) {
            throw new BaseEngineException(ex);
        }
View Full Code Here

                        String coordEnd = DateUtils.convertDateToString(coordJob.getEndTime());
                        rerunDateScope = coordStart + "::" + coordEnd;
                    }
                    LOG.debug("Queuing rerun range [" + rerunDateScope + "] for coord id " + coordId + " of bundle "
                            + bundleJob.getId());
                    queue(new CoordRerunXCommand(coordId, RestConstants.JOB_COORD_RERUN_DATE, rerunDateScope, refresh,
                            noCleanup));
                    updateBundleAction(coordNameToBAMapping.get(coordName));
                    isUpdateActionDone = true;
                }
                else {
                    LOG.info("Rerun for coord " + coordName + " NOT performed because it is not in bundle ", bundleJob.getId());
                }
            }
        }
        else if (dateScope != null && !dateScope.isEmpty()) {
            if (bundleActions != null) {
                for (BundleActionBean action : bundleActions) {
                    if (action.getCoordId() == null) {
                        LOG.info("No coord id found. Therefore nothing to queue for coord rerun with coord name "
                                + action.getCoordName());
                        continue;
                    }
                    LOG.debug("Queuing rerun range [" + dateScope + "] for coord id " + action.getCoordId() + " of bundle "
                            + bundleJob.getId());
                    queue(new CoordRerunXCommand(action.getCoordId(), RestConstants.JOB_COORD_RERUN_DATE, dateScope,
                            refresh, noCleanup));
                    updateBundleAction(action);
                    isUpdateActionDone = true;
                }
            }
View Full Code Here

     */
    public CoordinatorActionInfo reRun(String jobId, String rerunType, String scope, boolean refresh, boolean noCleanup)
            throws BaseEngineException {
        try {
            if (useXCommand) {
                return new CoordRerunXCommand(jobId, rerunType, scope, refresh, noCleanup).call();
            }
            else {
                return new CoordRerunCommand(jobId, rerunType, scope, refresh, noCleanup).call();
            }
        }
View Full Code Here

                        String coordEnd = DateUtils.formatDateOozieTZ(coordJob.getEndTime());
                        rerunDateScope = coordStart + "::" + coordEnd;
                    }
                    LOG.debug("Queuing rerun range [" + rerunDateScope + "] for coord id " + coordId + " of bundle "
                            + bundleJob.getId());
                    queue(new CoordRerunXCommand(coordId, RestConstants.JOB_COORD_RERUN_DATE, rerunDateScope, refresh,
                            noCleanup));
                    updateBundleAction(coordNameToBAMapping.get(coordName));
                    isUpdateActionDone = true;
                }
                else {
                    LOG.info("Rerun for coord " + coordName + " NOT performed because it is not in bundle ", bundleJob.getId());
                }
            }
        }
        else if (dateScope != null && !dateScope.isEmpty()) {
            if (bundleActions != null) {
                for (BundleActionBean action : bundleActions) {
                    if (action.getCoordId() == null) {
                        LOG.info("No coord id found. Therefore nothing to queue for coord rerun with coord name "
                                + action.getCoordName());
                        continue;
                    }
                    LOG.debug("Queuing rerun range [" + dateScope + "] for coord id " + action.getCoordId() + " of bundle "
                            + bundleJob.getId());
                    queue(new CoordRerunXCommand(action.getCoordId(), RestConstants.JOB_COORD_RERUN_DATE, dateScope,
                            refresh, noCleanup));
                    updateBundleAction(action);
                    isUpdateActionDone = true;
                }
            }
View Full Code Here

     * @throws BaseEngineException
     */
    public CoordinatorActionInfo reRun(String jobId, String rerunType, String scope, boolean refresh, boolean noCleanup)
            throws BaseEngineException {
        try {
      return new CoordRerunXCommand(jobId, rerunType, scope, refresh,
          noCleanup).call();
        }
        catch (CommandException ex) {
            throw new BaseEngineException(ex);
        }
View Full Code Here

     * @throws BaseEngineException
     */
    public CoordinatorActionInfo reRun(String jobId, String rerunType, String scope, boolean refresh, boolean noCleanup)
            throws BaseEngineException {
        try {
            return new CoordRerunXCommand(jobId, rerunType, scope, refresh,
                    noCleanup).call();
        }
        catch (CommandException ex) {
            throw new BaseEngineException(ex);
        }
View Full Code Here

    public void testCoordRerunNoSLA() throws Exception {
        CoordinatorJobBean job = this.addRecordToCoordJobTable(CoordinatorJob.Status.SUCCEEDED, false, false);
        addRecordToCoordActionTable(job.getId(), 1, CoordinatorAction.Status.FAILED, "coord-rerun-action1.xml", 0);

        try {
            new CoordRerunXCommand(job.getId(), RestConstants.JOB_COORD_SCOPE_DATE, "2009-12-15T01:00Z", false, true)
                    .call();
        }
        catch (CommandException ce) {
            if (ce.getErrorCode() == ErrorCode.E0604) {
                fail("Coord Rerun with no SLA should not throw " + ce.getMessage() + " exception");
View Full Code Here

        // Action going to WAITING on Coord Rerun
        action.setStatus(CoordinatorAction.Status.KILLED);
        CoordActionQueryExecutor.getInstance().executeUpdate(CoordActionQuery.UPDATE_COORD_ACTION_STATUS_PENDING_TIME, action);
        queue.clear();
        new CoordRerunXCommand(coord.getId(), RestConstants.JOB_COORD_SCOPE_ACTION, "1", false, true)
                .call();
        waitFor(3 * 100, new Predicate() {
            @Override
            public boolean evaluate() throws Exception {
                return jpaService.execute(coordGetCmd).getStatus() == CoordinatorAction.Status.WAITING;
View Full Code Here

                        String coordEnd = DateUtils.formatDateOozieTZ(coordJob.getEndTime());
                        rerunDateScope = coordStart + "::" + coordEnd;
                    }
                    LOG.debug("Queuing rerun range [" + rerunDateScope + "] for coord id " + coordId + " of bundle "
                            + bundleJob.getId());
                    queue(new CoordRerunXCommand(coordId, RestConstants.JOB_COORD_SCOPE_DATE, rerunDateScope, refresh,
                            noCleanup));
                    updateBundleAction(coordNameToBAMapping.get(coordName));
                    isUpdateActionDone = true;
                }
                else {
                    LOG.info("Rerun for coord " + coordName + " NOT performed because it is not in bundle ", bundleJob.getId());
                }
            }
        }
        else if (dateScope != null && !dateScope.isEmpty()) {
            if (bundleActions != null) {
                for (BundleActionBean action : bundleActions) {
                    if (action.getCoordId() == null) {
                        LOG.info("No coord id found. Therefore nothing to queue for coord rerun with coord name "
                                + action.getCoordName());
                        continue;
                    }
                    LOG.debug("Queuing rerun range [" + dateScope + "] for coord id " + action.getCoordId() + " of bundle "
                            + bundleJob.getId());
                    queue(new CoordRerunXCommand(action.getCoordId(), RestConstants.JOB_COORD_SCOPE_DATE, dateScope,
                            refresh, noCleanup));
                    updateBundleAction(action);
                    isUpdateActionDone = true;
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.oozie.command.coord.CoordRerunXCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.