Package org.apache.oozie.store

Examples of org.apache.oozie.store.WorkflowStore.closeTrx()


        Date endDate = new Date(System.currentTimeMillis() - 2 * 24 * 60 * 60
                * 1000);
        wfBean.setEndTime(endDate);
        store.updateWorkflow(wfBean);
        store.commitTrx();
        store.closeTrx();

        Runnable purgeRunnable = new PurgeRunnable(1, 1, 100);
        purgeRunnable.run();

        waitFor(10000, new Predicate() {
View Full Code Here


                }
                finally {
                    if (store != null) {
                        if (!store.isActive()) {
                            try {
                                store.closeTrx();
                            }
                            catch (RuntimeException rex) {
                                log.warn("Exception while attempting to close store", rex);
                            }
                        }
View Full Code Here

                }
                finally {
                    if (store != null) {
                        if (!store.isActive()) {
                            try {
                                store.closeTrx();
                            }
                            catch (RuntimeException rex) {
                                log.warn("Exception while attempting to close store", rex);
                            }
                        }
View Full Code Here

        String fixedActionConf = actionConf.replaceAll("async", "sync");
        action.setConf(fixedActionConf);
        action.setPending();
        store.updateAction(action);
        store.commitTrx();
        store.closeTrx();

        Runnable recoveryRunnable = new RecoveryRunnable(0, 60);
        recoveryRunnable.run();
        Thread.sleep(3000);
View Full Code Here

        assertEquals(WorkflowActionBean.Status.RUNNING, action2.getStatus());
        action2.setStatus(WorkflowActionBean.Status.PREP);
        action2.setPending();
        store2.updateAction(action2);
        store2.commitTrx();
        store2.closeTrx();

        Thread.sleep(1000);
        recoveryRunnable.run();
        Thread.sleep(3000);
View Full Code Here

        final WorkflowStore store3 = Services.get().get(WorkflowStoreService.class).create();
        store3.beginTrx();
        WorkflowActionBean action3 = store3.getAction(actionId, false);
        assertEquals(WorkflowActionBean.Status.OK, action3.getStatus());
        store3.commitTrx();
        store3.closeTrx();
    }

    /**
     * Tests functionality of the Recovery Service Runnable command. </p> Insert a coordinator job with PREPMATER. Then,
     * runs the recovery runnable and ensures the state changes to RUNNING.
View Full Code Here

        store.beginTrx();
        List<WorkflowActionBean> actions = store.getActionsForWorkflow(jobId, false);
        WorkflowActionBean action = actions.get(0);
        assertEquals(WorkflowActionBean.Status.RUNNING, action.getStatus());
        store.commitTrx();
        store.closeTrx();

        Thread.sleep(2000);
        Runnable actionCheckRunnable = new ActionCheckRunnable(0);
        actionCheckRunnable.run();
View Full Code Here

        store2.beginTrx();
        List<WorkflowActionBean> actions2 = store2.getActionsForWorkflow(jobId, false);
        WorkflowActionBean action2 = actions2.get(0);
        assertEquals(WorkflowActionBean.Status.OK, action2.getStatus());
        store2.commitTrx();
        store2.closeTrx();
    }

    /**
     * Tests the delayed check functionality of the Action Check Service Runnable. </p> Starts an action which behaves
     * like an Async Action (Action and Job state set to Running). Verifies the action status to be RUNNING. </p>
View Full Code Here

        assertEquals(WorkflowActionBean.Status.RUNNING, action.getStatus());

        action.setLastCheckTime(new Date());
        store.updateAction(action);
        store.commitTrx();
        store.closeTrx();

        int actionCheckDelay = 20;

        Runnable actionCheckRunnable = new ActionCheckRunnable(actionCheckDelay);
        actionCheckRunnable.run();
View Full Code Here

        store2.beginTrx();
        List<WorkflowActionBean> actions2 = store2.getActionsForWorkflow(jobId, false);
        WorkflowActionBean action2 = actions2.get(0);
        assertEquals(WorkflowActionBean.Status.RUNNING, action2.getStatus());
        store2.commitTrx();
        store2.closeTrx();
        assertEquals(WorkflowJob.Status.RUNNING, engine.getJob(jobId).getStatus());
    }

    /**
     * Tests functionality of the Action Checker Service Runnable for coordinator actions. </p> Inserts Coord Job, Coord
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.