Package org.apache.oozie.executor.jpa

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


        BundleActionBean action = createBundleAction(jobId, coordId, coordName, pending, status);

        try {
            JPAService jpaService = Services.get().get(JPAService.class);
            assertNotNull(jpaService);
            BundleActionInsertJPAExecutor bundleActionJPAExecutor = new BundleActionInsertJPAExecutor(action);
            jpaService.execute(bundleActionJPAExecutor);

            CoordinatorJobBean coordJob = jpaService.execute(new CoordJobGetJPAExecutor(coordId));
            coordJob.setBundleId(jobId);
            CoordJobQueryExecutor.getInstance().executeUpdate(CoordJobQuery.UPDATE_COORD_JOB_BUNDLEID, coordJob);
View Full Code Here


        BundleActionBean bundleAction = new BundleActionBean();
        bundleAction.setBundleActionId(bundleJob.getId() + "_COORD-TEST1");
        bundleAction.setCoordId(coordJob.getId());
        bundleAction.setBundleId(bundleJob.getId());
        bundleAction.setStatus(Job.Status.SUCCEEDED);
        jpaService.execute(new BundleActionInsertJPAExecutor(bundleAction));

        String dateStr = "2099-01-01T01:00Z";
        BundleJobGetJPAExecutor bundleJobGetCmd = new BundleJobGetJPAExecutor(bundleJob.getId());
        bundleJob = jpaService.execute(bundleJobGetCmd);
        assertEquals(bundleJob.getPauseTime(), null);
View Full Code Here

        BundleActionBean bundleAction1 = new BundleActionBean();
        bundleAction1.setBundleActionId(bundleJob.getId() + "_COORD-TEST1");
        bundleAction1.setCoordId(coordJob1.getId());
        bundleAction1.setBundleId(bundleJob.getId());
        bundleAction1.setStatus(Job.Status.SUCCEEDED);
        jpaService.execute(new BundleActionInsertJPAExecutor(bundleAction1));

        CoordinatorJobBean coordJob2 = addRecordToCoordJobTable(CoordinatorJob.Status.KILLED, false, false);
        coordJob2.setBundleId(bundleJob.getId());
        coordJob2.setAppName("COORD-TEST2");
        CoordJobQueryExecutor.getInstance().executeUpdate(CoordJobQuery.UPDATE_COORD_JOB, coordJob2);
        BundleActionBean bundleAction2 = new BundleActionBean();
        bundleAction2.setBundleActionId(bundleJob.getId() + "_COORD-TEST2");
        bundleAction2.setCoordId(coordJob2.getId());
        bundleAction2.setBundleId(bundleJob.getId());
        bundleAction2.setStatus(Job.Status.KILLED);
        jpaService.execute(new BundleActionInsertJPAExecutor(bundleAction2));

        CoordinatorJobBean coordJob3 = addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, false, false);
        addRecordToCoordActionTable(coordJob3.getId(), 1, CoordinatorAction.Status.SUCCEEDED, "coord-action-get.xml", 0);
        addRecordToCoordActionTable(coordJob3.getId(), 2, CoordinatorAction.Status.SUCCEEDED, "coord-action-get.xml",
                0, DateUtils.parseDateOozieTZ("2013-08-01T02:00Z"));
        addRecordToCoordActionTable(coordJob3.getId(), 3, CoordinatorAction.Status.RUNNING, "coord-action-get.xml", 0,
                DateUtils.parseDateOozieTZ("2013-08-01T03:00Z"));
        addRecordToCoordActionTable(coordJob3.getId(), 4, CoordinatorAction.Status.WAITING, "coord-action-get.xml", 0,
                DateUtils.parseDateOozieTZ("2013-08-01T04:00Z"));

        coordJob3.setBundleId(bundleJob.getId());
        coordJob3.setAppName("COORD-TEST3");
        coordJob3.setLastActionNumber(4);
        coordJob3.setEndTime(DateUtils.parseDateOozieTZ("2013-08-01T04:00Z"));
        coordJob3.setStartTime(DateUtils.parseDateOozieTZ("2013-08-01T00:00Z"));

        CoordJobQueryExecutor.getInstance().executeUpdate(CoordJobQuery.UPDATE_COORD_JOB, coordJob3);
        BundleActionBean bundleAction3 = new BundleActionBean();
        bundleAction3.setBundleActionId(bundleJob.getId() + "_COORD-TEST3");
        bundleAction3.setCoordId(coordJob3.getId());
        bundleAction3.setBundleId(bundleJob.getId());
        bundleAction3.setStatus(Job.Status.RUNNING);
        jpaService.execute(new BundleActionInsertJPAExecutor(bundleAction3));
        BundleJobGetJPAExecutor bundleJobGetCmd = new BundleJobGetJPAExecutor(bundleJob.getId());

        String dateStr = "2099-01-01T01:00Z";
        bundleJob = jpaService.execute(bundleJobGetCmd);
        assertEquals(bundleJob.getPauseTime(), null);
View Full Code Here

        BundleActionBean bundleAction1 = new BundleActionBean();
        bundleAction1.setBundleActionId(bundleJob.getId() + "_COORD-TEST1");
        bundleAction1.setCoordId(coordJob1.getId());
        bundleAction1.setBundleId(bundleJob.getId());
        bundleAction1.setStatus(Job.Status.SUCCEEDED);
        jpaService.execute(new BundleActionInsertJPAExecutor(bundleAction1));

        CoordinatorJobBean coordJob2 = addRecordToCoordJobTable(CoordinatorJob.Status.PREP, false, false);
        coordJob2.setBundleId(bundleJob.getId());
        coordJob2.setAppName("COORD-TEST2");
        coordJob2.setStartTime(DateUtils.parseDateOozieTZ("2099-08-01T02:00Z"));
        CoordJobQueryExecutor.getInstance().executeUpdate(CoordJobQuery.UPDATE_COORD_JOB, coordJob2);
        BundleActionBean bundleAction2 = new BundleActionBean();
        bundleAction2.setBundleActionId(bundleJob.getId() + "_COORD-TEST2");
        bundleAction2.setCoordId(coordJob2.getId());
        bundleAction2.setBundleId(bundleJob.getId());
        bundleAction2.setStatus(Job.Status.PREP);
        jpaService.execute(new BundleActionInsertJPAExecutor(bundleAction2));

        CoordinatorJobBean coordJob3 = addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, false, false);
        addRecordToCoordActionTable(coordJob3.getId(), 1, CoordinatorAction.Status.SUCCEEDED, "coord-action-get.xml", 0);
        addRecordToCoordActionTable(coordJob3.getId(), 2, CoordinatorAction.Status.SUCCEEDED, "coord-action-get.xml",
                0, DateUtils.parseDateOozieTZ("2013-08-01T02:00Z"));
        addRecordToCoordActionTable(coordJob3.getId(), 3, CoordinatorAction.Status.RUNNING, "coord-action-get.xml", 0,
                DateUtils.parseDateOozieTZ("2013-08-01T03:00Z"));
        addRecordToCoordActionTable(coordJob3.getId(), 4, CoordinatorAction.Status.RUNNING, "coord-action-get.xml", 0,
                DateUtils.parseDateOozieTZ("2013-08-01T04:00Z"));

        coordJob3.setBundleId(bundleJob.getId());
        coordJob3.setAppName("COORD-TEST3");
        coordJob3.setLastActionNumber(4);
        coordJob3.setEndTime(DateUtils.parseDateOozieTZ("2013-08-01T04:00Z"));
        coordJob3.setStartTime(DateUtils.parseDateOozieTZ("2013-08-01T00:00Z"));

        CoordJobQueryExecutor.getInstance().executeUpdate(CoordJobQuery.UPDATE_COORD_JOB, coordJob3);
        BundleActionBean bundleAction3 = new BundleActionBean();
        bundleAction3.setBundleActionId(bundleJob.getId() + "_COORD-TEST3");
        bundleAction3.setPending(1);
        bundleAction3.setCoordId(coordJob3.getId());
        bundleAction3.setBundleId(bundleJob.getId());
        bundleAction3.setStatus(Job.Status.RUNNING);
        jpaService.execute(new BundleActionInsertJPAExecutor(bundleAction3));

        String dateStr = "2013-08-01T03:00Z";
        try {
            new BundleJobChangeXCommand(bundleJob.getId(), "endtime=" + dateStr).call();
            fail("should throw exception");
View Full Code Here

        BundleActionBean action = createBundleAction(jobId, coordName, coordName, pending, status);

        try {
            JPAService jpaService = Services.get().get(JPAService.class);
            assertNotNull(jpaService);
            BundleActionInsertJPAExecutor bundleActionJPAExecutor = new BundleActionInsertJPAExecutor(action);
            jpaService.execute(bundleActionJPAExecutor);
        }
        catch (JPAExecutorException ex) {
            ex.printStackTrace();
            fail("Unable to insert the test bundle action record to table");
View Full Code Here

        BundleActionBean action = createBundleAction(jobId, coordId, coordName, pending, status);

        try {
            JPAService jpaService = Services.get().get(JPAService.class);
            assertNotNull(jpaService);
            BundleActionInsertJPAExecutor bundleActionJPAExecutor = new BundleActionInsertJPAExecutor(action);
            jpaService.execute(bundleActionJPAExecutor);

            CoordinatorJobBean coordJob = jpaService.execute(new CoordJobGetJPAExecutor(coordId));
            coordJob.setBundleId(jobId);
            jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));
View Full Code Here

                }

                for (Entry<String, Boolean> coordName : map.entrySet()) {
                    BundleActionBean action = createBundleAction(jobId, coordName.getKey(), coordName.getValue());

                    jpaService.execute(new BundleActionInsertJPAExecutor(action));
                }
            }
            catch (JPAExecutorException je) {
                throw new CommandException(je);
            }
View Full Code Here

        BundleActionBean action = createBundleAction(jobId, coordName, pending, status);

        try {
            JPAService jpaService = Services.get().get(JPAService.class);
            assertNotNull(jpaService);
            BundleActionInsertJPAExecutor bundleActionJPAExecutor = new BundleActionInsertJPAExecutor(action);
            jpaService.execute(bundleActionJPAExecutor);
        }
        catch (JPAExecutorException ex) {
            ex.printStackTrace();
            fail("Unable to insert the test bundle action record to table");
View Full Code Here

TOP

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

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.