Package org.apache.oozie.command.wf

Examples of org.apache.oozie.command.wf.SuspendXCommand


    public void suspend(String jobId) throws DagEngineException {
        // Changing to synchronous call from asynchronous queuing to prevent the
        // loss of command if the queue is full or the queue is lost in case of
        // failure.
        try {
      new SuspendXCommand(jobId).call();
        }
        catch (CommandException e) {
            throw new DagEngineException(e);
        }
    }
View Full Code Here


                            log.info("Recover a SUBMITTED coord action and resubmit CoordActionStartCommand :"
                                    + caction.getId());
                        }
                        else if (caction.getStatus() == CoordinatorActionBean.Status.SUSPENDED) {
                            if (caction.getExternalId() != null && caction.getPending() > 1) {
                                queueCallable(new SuspendXCommand(caction.getExternalId()));
                                log.debug("Recover a SUSPENDED coord action and resubmit SuspendXCommand :"
                                        + caction.getId());
                            }
                        }
                        else if (caction.getStatus() == CoordinatorActionBean.Status.KILLED) {
View Full Code Here

            List<CoordinatorActionBean> actionList = jpaService
                    .execute(new CoordJobGetActionsRunningJPAExecutor(jobId));
            for (CoordinatorActionBean action : actionList) {
                // queue a SuspendXCommand
                if (action.getExternalId() != null) {
                    queue(new SuspendXCommand(action.getExternalId()));
                    updateCoordAction(action);
                    LOG.debug(
                            "Suspend coord action = [{0}], new status = [{1}], pending = [{2}] and queue SuspendXCommand for [{3}]",
                            action.getId(), action.getStatus(), action.getPending(), action.getExternalId());
                }
View Full Code Here

                            (wfClient.getJobInfo(jobId).getActions().get(1).getStatus() == WorkflowAction.Status.RUNNING);
                }
            });
            WorkflowJob wf = wfClient.getJobInfo(jobId);
            // Suspending subworkflow
            new SuspendXCommand(wf.getActions().get(1).getExternalId()).call();
            // Check suspend for base workflow
            assertEquals(WorkflowJob.Status.SUSPENDED, wfClient.getJobInfo(jobId).getStatus());
            //Check suspend for sub workflow
            assertEquals(WorkflowJob.Status.SUSPENDED, wfClient.getJobInfo(wf.getActions().get(1).getExternalId()).getStatus());
View Full Code Here

        assertEquals(job.getAppName(), event.getAppName());
        assertEquals(job.getStartTime(), event.getStartTime());
        assertEquals(0, queue.size());

        // Suspending job
        new SuspendXCommand(job.getId()).call();
        job = jpaService.execute(wfJobGetCmd);
        assertEquals(WorkflowJob.Status.SUSPENDED, job.getStatus());
        assertEquals(1, queue.size());
        event = (JobEvent) queue.poll();
        assertNotNull(event);
View Full Code Here

    public void suspend(String jobId) throws DagEngineException {
        // Changing to synchronous call from asynchronous queuing to prevent the
        // loss of command if the queue is full or the queue is lost in case of
        // failure.
        try {
      new SuspendXCommand(jobId).call();
        }
        catch (CommandException e) {
            throw new DagEngineException(e);
        }
    }
View Full Code Here

            List<CoordinatorActionBean> actionList = jpaService
                    .execute(new CoordJobGetActionsRunningJPAExecutor(jobId));
            for (CoordinatorActionBean action : actionList) {
                // queue a SuspendXCommand
                if (action.getExternalId() != null) {
                    queue(new SuspendXCommand(action.getExternalId()));
                    updateCoordAction(action);
                    LOG.debug(
                            "Suspend coord action = [{0}], new status = [{1}], pending = [{2}] and queue SuspendXCommand for [{3}]",
                            action.getId(), action.getStatus(), action.getPending(), action.getExternalId());
                }
View Full Code Here

        assertEquals(job.getAppName(), event.getAppName());
        assertEquals(job.getStartTime(), event.getStartTime());
        assertEquals(0, queue.size());

        // Suspending job
        new SuspendXCommand(job.getId()).call();
        job = jpaService.execute(wfJobGetCmd);
        assertEquals(WorkflowJob.Status.SUSPENDED, job.getStatus());
        assertEquals(1, queue.size());
        event = (JobEvent) queue.poll();
        assertNotNull(event);
View Full Code Here

                        log.info("Recover a SUBMITTED coord action and resubmit CoordActionStartCommand :"
                                + caction.getId());
                    }
                    else if (caction.getStatus() == CoordinatorActionBean.Status.SUSPENDED) {
                        if (caction.getExternalId() != null) {
                            queueCallable(new SuspendXCommand(caction.getExternalId()));
                            log.debug("Recover a SUSPENDED coord action and resubmit SuspendXCommand :"
                                    + caction.getId());
                        }
                    }
                    else if (caction.getStatus() == CoordinatorActionBean.Status.KILLED) {
View Full Code Here

        // Changing to synchronous call from asynchronous queuing to prevent the
        // loss of command if the queue is full or the queue is lost in case of
        // failure.
        try {
            if (useXCommand) {
                new SuspendXCommand(jobId).call();
            }
            else {
                new SuspendCommand(jobId).call();
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.oozie.command.wf.SuspendXCommand

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.