Examples of CoordJobGetJPAExecutor


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

    }

    private void checkCoordJobs(String jobId, CoordinatorJob.Status expectedStatus) {
        try {
            JPAService jpaService = Services.get().get(JPAService.class);
            CoordinatorJobBean job = jpaService.execute(new CoordJobGetJPAExecutor(jobId));
            if (job.getStatus() != expectedStatus) {
                fail("CoordJobMatLookupCommand didn't work because the status for job id"
                        + jobId + " is : " + job.getStatusStr() + "; however expected status is : " + expectedStatus.toString());
            }
        }
View Full Code Here

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

    private CoordinatorJob.Status getStatus(String jobId){
        CoordinatorJob job = null;
        try {
            JPAService jpaService = Services.get().get(JPAService.class);
            job = jpaService.execute(new CoordJobGetJPAExecutor(jobId));
        }
        catch (JPAExecutorException se) {
            se.printStackTrace();
        }
        return job.getStatus();
View Full Code Here

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

            if (actionsSize != number) {
                fail("Should have " + number + " actions created for job " + jobId + ", but has " + actionsSize + " actions.");
            }

            if (status != null) {
                CoordinatorJob job = jpaService.execute(new CoordJobGetJPAExecutor(jobId));
                if (job.getStatus() != status) {
                    fail("Job status " + job.getStatus() + " should be " + status);
                }
            }
        }
View Full Code Here

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

            log.info("Recover a WAITTING coord action and resubmit CoordActionInputCheckXCommand :"
                + caction.getId());
                    }
                    else if (caction.getStatus() == CoordinatorActionBean.Status.SUBMITTED) {
                        CoordinatorJobBean coordJob = jpaService.execute(new CoordJobGetJPAExecutor(caction.getJobId()));
            queueCallable(new CoordActionStartXCommand(
                caction.getId(), coordJob.getUser(),
                coordJob.getAuthToken(), caction.getJobId()));

                        log.info("Recover a SUBMITTED coord action and resubmit CoordActionStartCommand :" + caction.getId());
View Full Code Here

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

        assertEquals(DateUtils.parseDateUTC(dateStr), bundleJob.getPauseTime());

        final String coordJobId = coordJob.getId();
        waitFor(60000, new Predicate() {
            public boolean evaluate() throws Exception {
                CoordinatorJobBean coordJob1 = jpaService.execute(new CoordJobGetJPAExecutor(coordJobId));
                return (coordJob1.getPauseTime() != null);
            }
        });

        coordJob = jpaService.execute(new CoordJobGetJPAExecutor(coordJob.getId()));
        assertEquals(DateUtils.parseDateUTC(dateStr), coordJob.getPauseTime());
    }
View Full Code Here

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

        jpaService = Services.get().get(JPAService.class);
        if (jpaService == null) {
            throw new CommandException(ErrorCode.E0610);
        }
        try {
            coordJob = jpaService.execute(new CoordJobGetJPAExecutor(jobId));
            prevPending = coordJob.isPending();
        }
        catch (JPAExecutorException je) {
            throw new CommandException(je);
        }
View Full Code Here

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

        Runnable runnable = new CoordMaterializeTriggerRunnable(3600);
        runnable.run();
        Thread.sleep(1000);

        JPAService jpaService = Services.get().get(JPAService.class);
        CoordJobGetJPAExecutor coordGetCmd = new CoordJobGetJPAExecutor(job.getId());
        CoordinatorJobBean coordJob = jpaService.execute(coordGetCmd);
        assertEquals(CoordinatorJob.Status.RUNNING, coordJob.getStatus());

        int numWaitingActions = jpaService.execute(new CoordJobGetRunningActionsCountJPAExecutor(coordJob.getId()));
        assert (numWaitingActions <= coordJob.getMatThrottling());
View Full Code Here

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

        Runnable runnable = new CoordMaterializeTriggerRunnable(3600);
        runnable.run();
        Thread.sleep(1000);

        JPAService jpaService = Services.get().get(JPAService.class);
        CoordJobGetJPAExecutor coordGetCmd = new CoordJobGetJPAExecutor(job.getId());
        CoordinatorJobBean coordJob = jpaService.execute(coordGetCmd);
        assertEquals(CoordinatorJob.Status.RUNNING, coordJob.getStatus());
    }
View Full Code Here

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

        actions = jpaService.execute(bundleActionsGetCmd);

        assertEquals(true, actions.get(0).isPending());
        assertEquals(true, actions.get(1).isPending());

        final CoordJobGetJPAExecutor coordGetCmd1 = new CoordJobGetJPAExecutor(actions.get(0).getCoordId());
        final CoordJobGetJPAExecutor coordGetCmd2 = new CoordJobGetJPAExecutor(actions.get(1).getCoordId());


        waitFor(200000, new Predicate() {
            public boolean evaluate() throws Exception {
                CoordinatorJobBean job1 = jpaService.execute(coordGetCmd1);
View Full Code Here

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

    }

    private void _testGetJob(String jobId) throws Exception {
        JPAService jpaService = Services.get().get(JPAService.class);
        assertNotNull(jpaService);
        CoordJobGetJPAExecutor coordGetCmd = new CoordJobGetJPAExecutor(jobId);
        CoordinatorJobBean ret = jpaService.execute(coordGetCmd);
        assertNotNull(ret);
        assertEquals(ret.getId(), jobId);
    }
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.