Package org.apache.oozie.client

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


        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());

        // Skip executed nodes
        getFileSystem().delete(new Path(path, "p2"), true);
View Full Code Here


        OozieClient ozClient = OozieClientFactory.get(cluster.getCluster());
        List<BundleJob> bundles = getBundles();
        if (bundles != null) {
            for (BundleJob bundle : bundles) {
                ozClient.kill(bundle.getId());
            }
        }
        return false;
    }
View Full Code Here

    public void kill(Context context, WorkflowAction action) throws ActionExecutorException {
        try {
            String subWorkflowId = action.getExternalId();
            String oozieUri = action.getTrackerUri();
            OozieClient oozieClient = getWorkflowClient(context, oozieUri);
            oozieClient.kill(subWorkflowId);
            context.setEndData(WorkflowAction.Status.KILLED, getActionSignal(WorkflowAction.Status.KILLED));
        }
        catch (Exception ex) {
            throw convertException(ex);
        }
View Full Code Here

        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());

        // Skip executed nodes
        getFileSystem().delete(new Path(path, "p2"), true);
View Full Code Here

    public void kill(Context context, WorkflowAction action) throws ActionExecutorException {
        try {
            String subWorkflowId = action.getExternalId();
            String oozieUri = action.getTrackerUri();
            OozieClient oozieClient = getWorkflowClient(context, oozieUri);
            oozieClient.kill(subWorkflowId);
            context.setEndData(WorkflowAction.Status.KILLED, getActionSignal(WorkflowAction.Status.KILLED));
        }
        catch (Exception ex) {
            throw convertException(ex);
        }
View Full Code Here

        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());

        // Skip executed nodes
        getFileSystem().delete(new Path(path, "p2"), true);
View Full Code Here

        if (action.getStatus() == CoordinatorAction.Status.SUBMITTED) {
            fail("CoordActionStartCommand didn't work because the status for action id" + actionId + " is :"
                    + action.getStatus() + " expected to be NOT SUBMITTED (i.e. RUNNING)");
        }
        final String wfId = action.getExternalId();
        wfClient.kill(wfId);
        waitFor(15 * 1000, new Predicate() {
            public boolean evaluate() throws Exception {
                return wfClient.getJobInfo(wfId).getStatus() == WorkflowJob.Status.KILLED;
            }
        });
View Full Code Here

    public void kill(Context context, WorkflowAction action) throws ActionExecutorException {
        try {
            String subWorkflowId = action.getExternalId();
            String oozieUri = action.getTrackerUri();
            OozieClient oozieClient = getWorkflowClient(context, oozieUri);
            oozieClient.kill(subWorkflowId);
            context.setEndData(WorkflowAction.Status.KILLED, getActionSignal(WorkflowAction.Status.KILLED));
        }
        catch (Exception ex) {
            throw convertException(ex);
        }
View Full Code Here

                + "</property></configuration> </workflow> </action> </coordinator-app>";
        writeToFile(appXml, appPath);

        conf.setProperty(OozieClient.COORDINATOR_APP_PATH, appPath);
        String jobId0 = client.submit(conf);
        client.kill(jobId0);

        String jobId = client.run(conf);
        client.suspend(jobId);
        client.resume(jobId);
        client.kill(jobId);
View Full Code Here

        client.kill(jobId0);

        String jobId = client.run(conf);
        client.suspend(jobId);
        client.resume(jobId);
        client.kill(jobId);

        CoordinatorJob job = client.getCoordJobInfo(jobId);
        String appName = job.getAppName();
        assertEquals("NAME", appName);
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.