Examples of WorkflowJobGetJPAExecutor


Examples of org.apache.oozie.executor.jpa.WorkflowJobGetJPAExecutor

        new CoordKillXCommand("action2").call();

        waitFor(5 * 1000, new Predicate() {
            public boolean evaluate() throws Exception {
                WorkflowJobBean wfJob = jpaService
                        .execute(new WorkflowJobGetJPAExecutor(coordAction1_4.getExternalId()));
                return wfJob.getStatus().equals(Job.Status.KILLED);
            }
        });

        Runnable runnable = new StatusTransitRunnable();
View Full Code Here

Examples of org.apache.oozie.executor.jpa.WorkflowJobGetJPAExecutor

        new CoordSuspendXCommand("action2").call();

        waitFor(5 * 1000, new Predicate() {
            public boolean evaluate() throws Exception {
                WorkflowJobBean wfJob = jpaService
                        .execute(new WorkflowJobGetJPAExecutor(coordAction1_4.getExternalId()));
                return wfJob.getStatus().equals(Job.Status.SUSPENDED);
            }
        });

        Runnable runnable = new StatusTransitRunnable();
View Full Code Here

Examples of org.apache.oozie.executor.jpa.WorkflowJobGetJPAExecutor

    @Override
    protected void loadState() throws CommandException {
        try {
            jpaService = Services.get().get(JPAService.class);
            if (jpaService != null) {
                this.wfJob = jpaService.execute(new WorkflowJobGetJPAExecutor(wfId));
                this.actionList = jpaService.execute(new WorkflowActionsGetForJobJPAExecutor(wfId));
                LogUtils.setLogInfo(wfJob, logInfo);
            }
            else {
                throw new CommandException(ErrorCode.E0610);
View Full Code Here

Examples of org.apache.oozie.executor.jpa.WorkflowJobGetJPAExecutor

                //store.updateCoordinatorAction(coordAction);
                JPAService jpaService = Services.get().get(JPAService.class);
                if (jpaService != null) {
                    log.debug("Updating WF record for WFID :" + wfId + " with parent id: " + actionId);
                    WorkflowJobBean wfJob = jpaService.execute(new WorkflowJobGetJPAExecutor(wfId));
                    wfJob.setParentId(actionId);
                    jpaService.execute(new WorkflowJobUpdateJPAExecutor(wfJob));
                    jpaService.execute(new org.apache.oozie.executor.jpa.CoordActionUpdateForStartJPAExecutor(coordAction));
                }
                else {
View Full Code Here

Examples of org.apache.oozie.executor.jpa.WorkflowJobGetJPAExecutor

        assertEquals(WorkflowJob.Status.SUCCEEDED, engine.getJob(jobId).getStatus());
        new PurgeXCommand(1, 10000).call();
        Thread.sleep(1000);

        JPAService jpaService = Services.get().get(JPAService.class);
        WorkflowJobGetJPAExecutor wfJobGetCmd = new WorkflowJobGetJPAExecutor(jobId);
        WorkflowJobBean wfBean = jpaService.execute(wfJobGetCmd);
        Date endDate = new Date(System.currentTimeMillis() - 2 * 24 * 60 * 60 * 1000);
        wfBean.setEndTime(endDate);
        WorkflowJobUpdateJPAExecutor wfUpdateCmd = new WorkflowJobUpdateJPAExecutor(wfBean);
        jpaService.execute(wfUpdateCmd);
View Full Code Here

Examples of org.apache.oozie.executor.jpa.WorkflowJobGetJPAExecutor

                if (jobId.endsWith("-W")) {
                    WorkflowJobBean jobBean = null;
                    JPAService jpaService = Services.get().get(JPAService.class);
                    if (jpaService != null) {
                        try {
                            jobBean = jpaService.execute(new WorkflowJobGetJPAExecutor(jobId));
                        }
                        catch (JPAExecutorException je) {
                            throw new AuthorizationException(je);
                        }
                    }
View Full Code Here

Examples of org.apache.oozie.executor.jpa.WorkflowJobGetJPAExecutor

        final JPAService jpaService = Services.get().get(JPAService.class);
        assertNotNull(jpaService);

        waitFor(10000, new Predicate() {
            public boolean evaluate() throws Exception {
                WorkflowJobGetJPAExecutor wfGetCmd = new WorkflowJobGetJPAExecutor(wfJobId);
                WorkflowJobBean ret = jpaService.execute(wfGetCmd);
                return (ret.getStatus() == WorkflowJob.Status.SUSPENDED);
            }
        });

        WorkflowJobGetJPAExecutor wfGetCmd = new WorkflowJobGetJPAExecutor(wfJobId);
        WorkflowJobBean ret = jpaService.execute(wfGetCmd);
        assertEquals(WorkflowJob.Status.SUSPENDED, ret.getStatus());
    }
View Full Code Here

Examples of org.apache.oozie.executor.jpa.WorkflowJobGetJPAExecutor

        final JPAService jpaService = Services.get().get(JPAService.class);
        assertNotNull(jpaService);

        waitFor(10000, new Predicate() {
            public boolean evaluate() throws Exception {
                WorkflowJobGetJPAExecutor wfGetCmd = new WorkflowJobGetJPAExecutor(wfJobId);
                WorkflowJobBean ret = jpaService.execute(wfGetCmd);
                return (ret.getStatus() == WorkflowJob.Status.KILLED);
            }
        });

        WorkflowJobGetJPAExecutor wfGetCmd = new WorkflowJobGetJPAExecutor(wfJobId);
        WorkflowJobBean ret = jpaService.execute(wfGetCmd);
        assertEquals(WorkflowJob.Status.KILLED, ret.getStatus());
    }
View Full Code Here

Examples of org.apache.oozie.executor.jpa.WorkflowJobGetJPAExecutor

        final JPAService jpaService = Services.get().get(JPAService.class);
        assertNotNull(jpaService);

        waitFor(10000, new Predicate() {
            public boolean evaluate() throws Exception {
                WorkflowJobGetJPAExecutor wfGetCmd = new WorkflowJobGetJPAExecutor(wfJobId);
                WorkflowJobBean ret = jpaService.execute(wfGetCmd);
                return (ret.getStatus() == WorkflowJob.Status.RUNNING);
            }
        });

        WorkflowJobGetJPAExecutor wfGetCmd = new WorkflowJobGetJPAExecutor(wfJobId);
        WorkflowJobBean ret = jpaService.execute(wfGetCmd);
        assertEquals(WorkflowJob.Status.RUNNING, ret.getStatus());
    }
View Full Code Here

Examples of org.apache.oozie.executor.jpa.WorkflowJobGetJPAExecutor

     */
    @Override
    protected Void execute() throws CommandException {
        try {
            InstrumentUtils.incrJobCounter(getName(), 1, getInstrumentation());
            WorkflowJobBean wf = jpaService.execute(new WorkflowJobGetJPAExecutor(coordAction.getExternalId()));

            Status slaStatus = null;

            if (wf.getStatus() == WorkflowJob.Status.SUCCEEDED) {
                coordAction.setStatus(CoordinatorAction.Status.SUCCEEDED);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.