Examples of commitTrx()


Examples of org.apache.oozie.store.CoordinatorStore.commitTrx()

        store.beginTrx();
        try {
            addRecordToJobTable(jobId, store, CoordinatorJob.Status.SUCCEEDED);
            addRecordToActionTable(jobId, actionNum, actionId, store, CoordinatorAction.Status.SUCCEEDED,
                    "coord-rerun-action3.xml");
            store.commitTrx();
        }
        catch (Exception e) {
            e.printStackTrace();
            fail("Could not update db.");
        }
View Full Code Here

Examples of org.apache.oozie.store.CoordinatorStore.commitTrx()

        int slaSize = slaBeans.size();
        for (SLAEventBean w : slaBeans) {
            entityManager.remove(w);
        }

        store.commitTrx();
        store.closeTrx();
        log.info(wfjSize + " entries in WF_JOBS removed from DB!");
        log.info(wfaSize + " entries in WF_ACTIONS removed from DB!");
        log.info(cojSize + " entries in COORD_JOBS removed from DB!");
        log.info(coaSize + " entries in COORD_ACTIONS removed from DB!");
View Full Code Here

Examples of org.apache.oozie.store.CoordinatorStore.commitTrx()

            createTestCaseSubDir("no-op/lib");
            createTestCaseSubDir("workflows");
            createTestCaseSubDir("in");
            addRecordToJobTable(jobId, store, getTestCaseDir());
            addRecordToActionTable(jobId, actionNum, actionId, store, getTestCaseDir());
            store.commitTrx();
        }
        finally {
            store.closeTrx();
        }
View Full Code Here

Examples of org.apache.oozie.store.CoordinatorStore.commitTrx()

        }
        else {
            fail();
        }
        store2.commitTrx();
        store2.closeTrx();
    }

    /**
     * Tests functionality of the Recovery Service Runnable command. </p> Insert a coordinator job with RUNNING and
View Full Code Here

Examples of org.apache.oozie.store.CoordinatorStore.commitTrx()

            fail("Could not set end time");
        }
        try {
            store.beginTrx();
            store.insertCoordinatorJob(coordJob);
            store.commitTrx();
        }
        catch (StoreException se) {
            se.printStackTrace();
            store.rollbackTrx();
            fail("Unable to insert the test job record to table");
View Full Code Here

Examples of org.apache.oozie.store.CoordinatorStore.commitTrx()

        coordJob.setLastActionNumber(0);
        coordJob.setFrequency(5);
        try {
            store.beginTrx();
            store.insertCoordinatorJob(coordJob);
            store.commitTrx();
        }
        catch (StoreException se) {
            se.printStackTrace();
            store.rollbackTrx();
            fail("Unable to insert the test job record to table");
View Full Code Here

Examples of org.apache.oozie.store.CoordinatorStore.commitTrx()

        store.beginTrx();
        try {
            addRecordToJobTable(jobId, store, CoordinatorJob.Status.SUCCEEDED);
            addRecordToActionTable(jobId, actionNum, actionId, store, CoordinatorAction.Status.SUCCEEDED,
                    "coord-rerun-action1.xml");
            store.commitTrx();
        }
        catch (Exception e) {
            e.printStackTrace();
            fail("Could not update db.");
        }
View Full Code Here

Examples of org.apache.oozie.store.CoordinatorStore.commitTrx()

        CoordinatorStore store1 = Services.get().get(StoreService.class).getStore(CoordinatorStore.class);
        store1.beginTrx();
        CoordinatorActionBean action1 = store1.getCoordinatorAction(actionId, false);
        assertEquals(action1.getStatus(), CoordinatorAction.Status.SUCCEEDED);
        store1.commitTrx();
        store1.closeTrx();

        final OozieClient coordClient = LocalOozie.getCoordClient();
        coordClient.reRunCoord(jobId, RestConstants.JOB_COORD_RERUN_ACTION, Integer.toString(actionNum), false, true);
View Full Code Here

Examples of org.apache.oozie.store.CoordinatorStore.commitTrx()

        CoordinatorStore store2 = Services.get().get(StoreService.class).getStore(CoordinatorStore.class);
        store2.beginTrx();
        CoordinatorActionBean action2 = store2.getCoordinatorAction(actionId, false);
        assertNotSame(action2.getStatus(), CoordinatorAction.Status.SUCCEEDED);
        store2.commitTrx();
        store2.closeTrx();
    }

    /**
     * Test : rerun <jobId> -action 1-2 -nocleanup
View Full Code Here

Examples of org.apache.oozie.store.CoordinatorStore.commitTrx()

            addRecordToJobTable(jobId, store, CoordinatorJob.Status.SUCCEEDED);
            addRecordToActionTable(jobId, actionNum1, actionId1, store, CoordinatorAction.Status.SUCCEEDED,
                    "coord-rerun-action1.xml");
            addRecordToActionTable(jobId, actionNum2, actionId2, store, CoordinatorAction.Status.SUCCEEDED,
                    "coord-rerun-action2.xml");
            store.commitTrx();
        }
        catch (Exception e) {
            e.printStackTrace();
            fail("Could not update db.");
        }
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.