Examples of CoordJobUpdateJPAExecutor


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

                if (!resetPauseTime) {
                    processLookaheadActions(coordJob, newPauseTime);
                }
            }

            jpaService.execute(new CoordJobUpdateJPAExecutor(this.coordJob));

            return null;
        }
        catch (XException ex) {
            throw new CommandException(ex);
View Full Code Here

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

        CoordinatorJobBean coordJob1 = addRecordToCoordJobTable("action1", CoordinatorJob.Status.RUNNING, false);
        CoordinatorJobBean coordJob2 = addRecordToCoordJobTable("action2", CoordinatorJob.Status.RUNNING, false);

        coordJob1.setPauseTime(pauseTime);
        coordJob1.setBundleId(job.getId());
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob1));
        coordJob2.setPauseTime(pauseTime);
        coordJob2.setBundleId(job.getId());
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob2));

        BundleJobGetJPAExecutor bundleJobGetExecutor = new BundleJobGetJPAExecutor(job.getId());
        job = jpaService.execute(bundleJobGetExecutor);
        assertEquals(Job.Status.RUNNING, job.getStatus());
View Full Code Here

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

        CoordinatorJobBean coordJob1 = addRecordToCoordJobTable("action1", CoordinatorJob.Status.PAUSED, false);
        CoordinatorJobBean coordJob2 = addRecordToCoordJobTable("action2", CoordinatorJob.Status.PAUSED, false);

        coordJob1.setPauseTime(null);
        coordJob1.setBundleId(job.getId());
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob1));
        coordJob2.setPauseTime(null);
        coordJob2.setBundleId(job.getId());
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob2));

        BundleJobGetJPAExecutor bundleJobGetExecutor = new BundleJobGetJPAExecutor(job.getId());
        job = jpaService.execute(bundleJobGetExecutor);
        assertEquals(Job.Status.PAUSED, job.getStatus());
View Full Code Here

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

        CoordinatorJobBean coordJob1 = addRecordToCoordJobTable("action1", CoordinatorJob.Status.RUNNING, false);
        CoordinatorJobBean coordJob2 = addRecordToCoordJobTable("action2", CoordinatorJob.Status.RUNNING, false);

        coordJob1.setAppNamespace(SchemaService.COORDINATOR_NAMESPACE_URI_1);
        coordJob1.setPauseTime(pauseTime);
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob1));
        coordJob2.setAppNamespace(SchemaService.COORDINATOR_NAMESPACE_URI_1);
        coordJob2.setPauseTime(pauseTime);
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob2));

        Runnable pauseStartRunnable = new PauseTransitRunnable();
        pauseStartRunnable.run();

        final String coordJobId1 = coordJob1.getId();
View Full Code Here

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

        CoordinatorJobBean coordJob = addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, start, end, true, true, 3);

        final JPAService jpaService = Services.get().get(JPAService.class);
        assertNotNull(jpaService);
        coordJob.setAppNamespace(SchemaService.COORDINATOR_NAMESPACE_URI_1);
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));

        addRecordToCoordActionTable(coordJob.getId(), 1, CoordinatorAction.Status.KILLED, "coord-action-get.xml", 0);
        addRecordToCoordActionTable(coordJob.getId(), 2, CoordinatorAction.Status.SUCCEEDED, "coord-action-get.xml", 0);
        addRecordToCoordActionTable(coordJob.getId(), 3, CoordinatorAction.Status.SUCCEEDED, "coord-action-get.xml", 0);
View Full Code Here

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

            // not supported
            coordJob.setStatus(StatusUtils.getStatusIfBackwardSupportTrue(coordStatus));
            // Backward support when coordinator namespace is 0.1
            coordJob.setStatus(StatusUtils.getStatus(coordJob));
            coordJob.setLastModifiedTime(new Date());
            jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));
            // update bundle action only when status changes in coord job
            if (coordJob.getBundleId() != null) {
                if (!prevStatus.equals(coordJob.getStatus())) {
                    BundleStatusUpdateXCommand bundleStatusUpdate = new BundleStatusUpdateXCommand(coordJob, prevStatus);
                    bundleStatusUpdate.call();
View Full Code Here

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

                coordJob.resetPending();
                LOG.info("Coord job [" + coordJob.getId() + "] Pending set to FALSE");
            }

            if (saveToDB) {
                jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));
            }
        }
View Full Code Here

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

        CoordinatorJobBean coordJob1 = addRecordToCoordJobTable("action1", CoordinatorJob.Status.RUNNING, start, end, false);
        CoordinatorJobBean coordJob2 = addRecordToCoordJobTable("action2", CoordinatorJob.Status.RUNNING, start, end, false);

        coordJob1.setPauseTime(pauseTime);
        coordJob1.setBundleId(job.getId());
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob1));
        coordJob2.setPauseTime(pauseTime);
        coordJob2.setBundleId(job.getId());
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob2));

        BundleJobGetJPAExecutor bundleJobGetExecutor = new BundleJobGetJPAExecutor(job.getId());
        job = jpaService.execute(bundleJobGetExecutor);
        assertEquals(Job.Status.RUNNING, job.getStatus());
View Full Code Here

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

        CoordinatorJobBean coordJob1 = addRecordToCoordJobTable("action1", CoordinatorJob.Status.PAUSED, start, end, false);
        CoordinatorJobBean coordJob2 = addRecordToCoordJobTable("action2", CoordinatorJob.Status.PAUSED, start, end, false);

        coordJob1.setPauseTime(null);
        coordJob1.setBundleId(job.getId());
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob1));
        coordJob2.setPauseTime(null);
        coordJob2.setBundleId(job.getId());
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob2));

        BundleJobGetJPAExecutor bundleJobGetExecutor = new BundleJobGetJPAExecutor(job.getId());
        job = jpaService.execute(bundleJobGetExecutor);
        assertEquals(Job.Status.PAUSED, job.getStatus());
View Full Code Here

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

        CoordinatorJobBean coordJob1 = addRecordToCoordJobTable("action1", CoordinatorJob.Status.RUNNING, start, end, false);
        CoordinatorJobBean coordJob2 = addRecordToCoordJobTable("action2", CoordinatorJob.Status.RUNNING, start, end, false);

        coordJob1.setAppNamespace(SchemaService.COORDINATOR_NAMESPACE_URI_1);
        coordJob1.setPauseTime(pauseTime);
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob1));
        coordJob2.setAppNamespace(SchemaService.COORDINATOR_NAMESPACE_URI_1);
        coordJob2.setPauseTime(pauseTime);
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob2));

        Runnable pauseStartRunnable = new PauseTransitRunnable();
        pauseStartRunnable.run();

        final String coordJobId1 = coordJob1.getId();
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.