Package org.apache.oozie.executor.jpa

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);
                return job1.getStatus().equals(CoordinatorJobBean.Status.SUSPENDED);
View Full Code Here


    protected void loadState() throws CommandException {
        super.eagerLoadState();
        try {
            jpaService = Services.get().get(JPAService.class);
            if (jpaService != null) {
                this.coordJob = jpaService.execute(new CoordJobGetJPAExecutor(this.jobId));
                prevStatus = coordJob.getStatus();
            }
            else {
                throw new CommandException(ErrorCode.E0610);
            }
View Full Code Here

        CoordinatorActionBean action = addRecordToCoordActionTable(job.getId(), 1, CoordinatorAction.Status.SUCCEEDED,
                "coord-action-get.xml", 0);

        JPAService jpaService = Services.get().get(JPAService.class);
        assertNotNull(jpaService);
        CoordJobGetJPAExecutor coordJobGetExecutor = new CoordJobGetJPAExecutor(job.getId());
        CoordActionGetJPAExecutor coordActionGetExecutor = new CoordActionGetJPAExecutor(action.getId());

        job = jpaService.execute(coordJobGetExecutor);
        action = jpaService.execute(coordActionGetExecutor);
        assertEquals(job.getStatus(), CoordinatorJob.Status.SUCCEEDED);
View Full Code Here

    protected void loadState() throws CommandException {
        try {
            jpaService = Services.get().get(JPAService.class);

            if (jpaService != null) {
                this.coordJob = jpaService.execute(new CoordJobGetJPAExecutor(jobId));
                //Get actions which are not succeeded, failed, timed out or killed
                this.actionList = jpaService.execute(new CoordJobGetActionsNotCompletedJPAExecutor(jobId));
                prevStatus = coordJob.getStatus();
                LogUtils.setLogInfo(coordJob, logInfo);
            }
View Full Code Here

                else {
                    CoordinatorJobBean jobBean = null;
                    JPAService jpaService = Services.get().get(JPAService.class);
                    if (jpaService != null) {
                        try {
                            jobBean = jpaService.execute(new CoordJobGetJPAExecutor(jobId));
                        }
                        catch (JPAExecutorException je) {
                            throw new AuthorizationException(je);
                        }
                    }
View Full Code Here

                }
                pendingJobCheckList = new ArrayList<CoordinatorJobBean>();
                for (String coordId : coordIds.toArray(new String[coordIds.size()])) {
                    CoordinatorJobBean coordJob;
                    try{
                        coordJob = jpaService.execute(new CoordJobGetJPAExecutor(coordId));
                    }
                    catch (JPAExecutorException jpaee) {
                        if (jpaee.getErrorCode().equals(ErrorCode.E0604)) {
                            LOG.warn("Exception happened during StatusTransitRunnable; Coordinator Job doesn't exist", jpaee);
                            continue;
View Full Code Here

        if (jpaService == null) {
            LOG.error(ErrorCode.E0610);
        }

        try {
            coordJob = jpaService.execute(new CoordJobGetJPAExecutor(jobId));
            prevStatus = coordJob.getStatus();
        }
        catch (JPAExecutorException jex) {
            throw new CommandException(jex);
        }
View Full Code Here

        if (jpaService == null) {
            throw new CommandException(ErrorCode.E0610);
        }

        try {
            this.coordJob = jpaService.execute(new CoordJobGetJPAExecutor(jobId));
            oldPauseTime = coordJob.getPauseTime();
            prevStatus = coordJob.getStatus();
        }
        catch (JPAExecutorException e) {
            throw new CommandException(e);
View Full Code Here

        final String coordJobId1 = coordJob1.getId();
        final String coordJobId2 = coordJob2.getId();
        waitFor(10 * 1000, new Predicate() {
            public boolean evaluate() throws Exception {
                CoordinatorJobBean cJob1 = jpaService.execute(new CoordJobGetJPAExecutor(coordJobId1));
                return cJob1.getStatus() == Job.Status.PAUSED;
            }
        });

        job = jpaService.execute(new BundleJobGetJPAExecutor(jobId));
        assertEquals(Job.Status.PAUSED, job.getStatus());

        coordJob1 = jpaService.execute(new CoordJobGetJPAExecutor(coordJobId1));
        assertEquals(Job.Status.PAUSED, coordJob1.getStatus());

        coordJob2 = jpaService.execute(new CoordJobGetJPAExecutor(coordJobId2));
        assertEquals(Job.Status.PAUSED, coordJob2.getStatus());

        bundleAction1 = jpaService.execute(new BundleActionGetJPAExecutor(job.getId(), "action1"));
        assertEquals(Job.Status.PAUSED, bundleAction1.getStatus());

View Full Code Here

        final String coordJobId1 = coordJob1.getId();
        final String coordJobId2 = coordJob2.getId();
        waitFor(10 * 1000, new Predicate() {
            public boolean evaluate() throws Exception {
                CoordinatorJobBean cJob1 = jpaService.execute(new CoordJobGetJPAExecutor(coordJobId1));
                return cJob1.getStatus() == Job.Status.RUNNING;
            }
        });

        job = jpaService.execute(new BundleJobGetJPAExecutor(jobId));
        assertEquals(Job.Status.RUNNING, job.getStatus());

        coordJob1 = jpaService.execute(new CoordJobGetJPAExecutor(coordJobId1));
        assertEquals(Job.Status.RUNNING, coordJob1.getStatus());

        coordJob2 = jpaService.execute(new CoordJobGetJPAExecutor(coordJobId2));
        assertEquals(Job.Status.RUNNING, coordJob2.getStatus());

        bundleAction1 = jpaService.execute(new BundleActionGetJPAExecutor(job.getId(), "action1"));
        assertEquals(Job.Status.RUNNING, bundleAction1.getStatus());

View Full Code Here

TOP

Related Classes of org.apache.oozie.executor.jpa.CoordJobGetJPAExecutor

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.