Package org.apache.oozie.store

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


        WorkflowJobBean wfBean = store.getWorkflow(jobId, true);
        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();

View Full Code Here


                WorkflowStore store = null;
                try {
                    store = Services.get().get(WorkflowStoreService.class).create();
                    store.beginTrx();
                    jobBean = store.getWorkflow(jobId, false);
                    store.commitTrx();
                }
                catch (StoreException ex) {
                    incrCounter(INSTR_FAILED_AUTH_COUNTER, 1);
                    if (store != null) {
                        store.rollbackTrx();
View Full Code Here

                CoordinatorStore store = null;
                try {
                    store = Services.get().get(CoordinatorStoreService.class).create();
                    store.beginTrx();
                    jobBean = store.getCoordinatorJob(jobId, false);
                    store.commitTrx();
                }
                catch (StoreException ex) {
                    incrCounter(INSTR_FAILED_AUTH_COUNTER, 1);
                    if (store != null) {
                        store.rollbackTrx();
View Full Code Here

        String actionConf = action.getConf();
        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

        WorkflowActionBean action2 = store2.getAction(actionId, false);
        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

        // assertEquals(WorkflowJob.Status.SUCCEEDED, engine.getJob(jobId).getStatus());
        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,
View Full Code Here

        final WorkflowStore store = Services.get().get(WorkflowStoreService.class).create();
        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

        final WorkflowStore store2 = Services.get().get(WorkflowStoreService.class).create();
        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
View Full Code Here

        WorkflowActionBean action = actions.get(0);
        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);
View Full Code Here

        final WorkflowStore store2 = Services.get().get(WorkflowStoreService.class).create();
        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());
    }

    /**
 
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.