Examples of CoordSubmitCommand


Examples of org.apache.oozie.command.coord.CoordSubmitCommand

            if (useXCommand) {
                CoordSubmitXCommand submit = new CoordSubmitXCommand(conf, getAuthToken());
                jobId = submit.call();
            }
            else {
                CoordSubmitCommand submit = new CoordSubmitCommand(conf, getAuthToken());
                jobId = submit.call();
            }
            return jobId;
        }
        catch (CommandException ex) {
            throw new CoordinatorEngineException(ex);
View Full Code Here

Examples of org.apache.oozie.command.coord.CoordSubmitCommand

            if (useXCommand) {
                CoordSubmitXCommand submit = new CoordSubmitXCommand(true, conf, getAuthToken());
                jobId = submit.call();
            }
            else {
                CoordSubmitCommand submit = new CoordSubmitCommand(true, conf, getAuthToken());
                jobId = submit.call();
            }
            return jobId;
        }
        catch (CommandException ex) {
            throw new CoordinatorEngineException(ex);
View Full Code Here

Examples of org.apache.oozie.command.coord.CoordSubmitCommand

     * org.apache.oozie.BaseEngine#submitJob(org.apache.hadoop.conf.Configuration
     * , boolean)
     */
    @Override
    public String submitJob(Configuration conf, boolean startJob) throws CoordinatorEngineException {
        CoordSubmitCommand submit = new CoordSubmitCommand(conf, getAuthToken());
        try {
            String jobId = submit.call();
            return jobId;
        }
        catch (CommandException ex) {
            throw new CoordinatorEngineException(ex);
        }
View Full Code Here

Examples of org.apache.oozie.command.coord.CoordSubmitCommand

     * org.apache.oozie.BaseEngine#dryrunSubmit(org.apache.hadoop.conf.Configuration
     * , boolean)
     */
    @Override
    public String dryrunSubmit(Configuration conf, boolean startJob) throws CoordinatorEngineException {
        CoordSubmitCommand submit = new CoordSubmitCommand(true, conf, getAuthToken());
        try {
            String jobId = submit.call();
            return jobId;
        }
        catch (CommandException ex) {
            throw new CoordinatorEngineException(ex);
        }
View Full Code Here

Examples of org.apache.oozie.command.coord.CoordSubmitCommand

        writeToFile(appXml, appPath);
        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

Examples of org.apache.oozie.command.coord.CoordSubmitCommand

        writeToFile(appXml, appPath);
        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");

        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();
                fail();
            }
            catch (CommandException ex) {
                assertEquals(ErrorCode.E1004, ex.getErrorCode());
            }
View Full Code Here

Examples of org.apache.oozie.command.coord.CoordSubmitCommand

        writeToFile(appXml, appPath);
        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

Examples of org.apache.oozie.command.coord.CoordSubmitCommand

        writeToFile(appXml, appPath);
        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

Examples of org.apache.oozie.command.coord.CoordSubmitCommand

        writeToFile(appXml, appPath);
        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 = null;
        try {
            sc.call();
            fail("Exception expected if schema has errors!");
        }
        catch (CommandException e) {
            // should come here for schema errors
        }
View Full Code Here

Examples of org.apache.oozie.command.coord.CoordSubmitCommand

        writeToFile(appXml, appPath);
        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
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.