Package org.apache.oozie.client

Examples of org.apache.oozie.client.OozieClient.start()


        WorkflowJob wf = wc.getJobInfo(jobId);
        assertNotNull(wf);
        assertEquals(WorkflowJob.Status.PREP, wf.getStatus());

        wc.start(jobId);

        waitFor(1000, new Predicate() {
            public boolean evaluate() throws Exception {
                WorkflowJob wf = wc.getJobInfo(jobId);
                return wf.getStatus() == WorkflowJob.Status.SUCCEEDED;
View Full Code Here


        WorkflowJob wf = wc.getJobInfo(jobId);
        assertNotNull(wf);
        assertEquals(WorkflowJob.Status.PREP, wf.getStatus());

        wc.start(jobId);

        waitFor(15 * 1000, new Predicate() {
            public boolean evaluate() throws Exception {
                WorkflowJob wf = wc.getJobInfo(jobId);
                return wf.getStatus() == WorkflowJob.Status.SUCCEEDED;
View Full Code Here

        conf.setProperty("nnbase", path.toString());
        conf.setProperty("base", path.toUri().getPath());

        final String jobId1 = wfClient.submit(conf);
        wfClient.start(jobId1);
        waitFor(15 * 1000, new Predicate() {
            public boolean evaluate() throws Exception {
                return wfClient.getJobInfo(jobId1).getStatus() == WorkflowJob.Status.KILLED;
            }
        });
View Full Code Here

        conf.setProperty(OozieClient.APP_PATH, getTestCaseFileUri("workflow.xml"));
        conf.setProperty(OozieClient.USER_NAME, getTestUser());
        conf.setProperty("cmd3", "echo1");      // expected to fail

        final String jobId1 = wfClient.submit(conf);
        wfClient.start(jobId1);
        waitFor(200 * 1000, new Predicate() {
            @Override
            public boolean evaluate() throws Exception {
                return wfClient.getJobInfo(jobId1).getStatus() == WorkflowJob.Status.KILLED;
            }
View Full Code Here

        // setting the variables "srcDir" and "dstDir", used as a file paths in the workflow, to parameterized expressions to test resolution.
        conf.setProperty("srcDir", "${base}/p1");
        conf.setProperty("dstDir", "${base}/p2");

        final String jobId1 = wfClient.submit(conf);
        wfClient.start(jobId1);

        wfClient.kill(jobId1);

        assertEquals(WorkflowJob.Status.KILLED, wfClient.getJobInfo(jobId1).getStatus());
View Full Code Here

        conf.setProperty("nnbase", path.toString());
        conf.setProperty("base", path.toUri().getPath());

        final String jobId1 = wfClient.submit(conf);
        wfClient.start(jobId1);
        waitFor(15 * 1000, new Predicate() {
            public boolean evaluate() throws Exception {
                return wfClient.getJobInfo(jobId1).getStatus() == WorkflowJob.Status.KILLED;
            }
        });
View Full Code Here

        conf.setProperty("inPath", getFsTestCaseDir().toString());
        conf.setProperty("checkDir", getFsTestCaseDir().toString() + "/check");

        final String jobId1 = wfClient.submit(conf);
        wfClient.start(jobId1);
        waitFor(15 * 1000, new Predicate() {
            public boolean evaluate() throws Exception {
                return wfClient.getJobInfo(jobId1).getStatus() == WorkflowJob.Status.FAILED;
            }
        });
View Full Code Here

        conf.setProperty("base", path.toUri().getPath());

        Properties newConf = wfClient.createConfiguration();
        newConf.setProperty("base", path.toUri().getPath());
        final String jobId = wfClient.submit(conf);
        wfClient.start(jobId);
        waitFor(15 * 1000, new Predicate() {
            public boolean evaluate() throws Exception {
                return wfClient.getJobInfo(jobId).getStatus() == WorkflowJob.Status.KILLED;
            }
        });
View Full Code Here

            assertEquals(WorkflowJob.Status.PREP, wf.getStatus());

            boolean dateTest = wf.getLastModifiedTime().compareTo(wf.getCreatedTime()) >= 0 ? true : false;
            assertEquals(true, dateTest);

            wc.start(jobId);
            wf = wc.getJobInfo(jobId);

            Date lastModTime = wf.getLastModifiedTime();

            wc.suspend(jobId);
View Full Code Here

        WorkflowJob wf = oc.getJobInfo(jobId);
        assertEquals(WorkflowJob.Status.PREP, wf.getStatus());

        long beforeStart = System.currentTimeMillis();

        oc.start(jobId);
        checkSuspendActions(wf, oc, jobId, WorkflowJob.Status.SUSPENDED,
                new String[]{"action1"},
                new String[]{":start:"});

        // Check for creation time
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.