Package org.apache.oozie.command.coord

Examples of org.apache.oozie.command.coord.CoordSubmitCommand.call()


        conf.set(OozieClient.COORDINATOR_APP_PATH, appPath);
        conf.set(OozieClient.USER_NAME, getTestUser());
        conf.set(OozieClient.GROUP_NAME, "other");
        injectKerberosInfo(conf);
        CoordSubmitCommand sc = new CoordSubmitCommand(conf, "UNIT_TESTING");
        String jobId = sc.call();

        assertEquals(jobId.substring(jobId.length() - 2), "-C");
        CoordinatorJobBean job = checkCoordJobs(jobId);
        if (job != null) {
            assertEquals(job.getTimeout(), Services.get().getConf().getInt(
View Full Code Here


        if (withDefaults) {
            String defaults = "<configuration><property><name>startTime</name>" +
                              "<value>2009-02-01T01:00Z</value></property></configuration>";
            writeToFile(defaults, getTestCaseDir() + File.separator + CoordSubmitCommand.CONFIG_DEFAULT);
            String jobId = sc.call();
            assertEquals(jobId.substring(jobId.length() - 2), "-C");
        }
        else {
            try {
                sc.call();
View Full Code Here

            String jobId = sc.call();
            assertEquals(jobId.substring(jobId.length() - 2), "-C");
        }
        else {
            try {
                sc.call();
                fail();
            }
            catch (CommandException ex) {
                assertEquals(ErrorCode.E1004, ex.getErrorCode());
            }
View Full Code Here

        conf.set(OozieClient.COORDINATOR_APP_PATH, appPath);
        conf.set(OozieClient.USER_NAME, getTestUser());
        conf.set(OozieClient.GROUP_NAME, "other");
        injectKerberosInfo(conf);
        CoordSubmitCommand sc = new CoordSubmitCommand(conf, "UNIT_TESTING");
        String jobId = sc.call();

        assertEquals(jobId.substring(jobId.length() - 2), "-C");
        checkCoordJobs(jobId);
    }
View Full Code Here

        conf.set(OozieClient.COORDINATOR_APP_PATH, appPath);
        conf.set(OozieClient.USER_NAME, getTestUser());
        conf.set(OozieClient.GROUP_NAME, "other");
        injectKerberosInfo(conf);
        CoordSubmitCommand sc = new CoordSubmitCommand(conf, "UNIT_TESTING");
        String jobId = sc.call();

        assertEquals(jobId.substring(jobId.length() - 2), "-C");
        checkCoordJobs(jobId);
    }
View Full Code Here

        conf.set(OozieClient.GROUP_NAME, "other");
        injectKerberosInfo(conf);
        CoordSubmitCommand sc = new CoordSubmitCommand(conf, "UNIT_TESTING");
        String jobId = null;
        try {
            sc.call();
            fail("Exception expected if schema has errors!");
        }
        catch (CommandException e) {
            // should come here for schema errors
        }
View Full Code Here

        conf.set(OozieClient.COORDINATOR_APP_PATH, appPath);
        conf.set(OozieClient.USER_NAME, getTestUser());
        conf.set(OozieClient.GROUP_NAME, "other");
        injectKerberosInfo(conf);
        CoordSubmitCommand sc = new CoordSubmitCommand(conf, "UNIT_TESTING");
        String jobId = sc.call();

        assertEquals(jobId.substring(jobId.length() - 2), "-C");
        checkCoordJobs(jobId);
    }
View Full Code Here

        conf.set(OozieClient.GROUP_NAME, "other");
        injectKerberosInfo(conf);
        CoordSubmitCommand sc = new CoordSubmitCommand(conf, "UNIT_TESTING");
        String jobId = null;
        try {
            sc.call();
            fail("Exception expected if user.name is not set!");
        }
        catch (CommandException e) {
            // should come here
        }
View Full Code Here

        conf.set(OozieClient.COORDINATOR_APP_PATH, appPath);
        conf.set(OozieClient.USER_NAME, getTestUser());
        conf.set(OozieClient.GROUP_NAME, "other");
        injectKerberosInfo(conf);
        CoordSubmitCommand sc = new CoordSubmitCommand(conf, "UNIT_TESTING");
        String jobId = sc.call();

        assertEquals(jobId.substring(jobId.length() - 2), "-C");
        checkCoordJobs(jobId);

    }
View Full Code Here

        conf.set(OozieClient.USER_NAME, getTestUser());
        conf.set(OozieClient.GROUP_NAME, "other");
        conf.set("MY_DONE_FLAG", "complete");
        injectKerberosInfo(conf);
        CoordSubmitCommand sc = new CoordSubmitCommand(conf, "UNIT_TESTING");
        String jobId = sc.call();

        assertEquals(jobId.substring(jobId.length() - 2), "-C");
        checkCoordJobs(jobId);
    }
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.