Package org.apache.oozie.client.rest

Examples of org.apache.oozie.client.rest.JsonWorkflowJob


        workflow.setActions(actions);
        return workflow;
    }

    private static WorkflowJob createDummyWorkflow(int idx, String conf) {
        JsonWorkflowJob workflow = new JsonWorkflowJob();
        workflow.setId(JOB_ID + idx + JOB_ID_END);
        workflow.setAppPath("hdfs://blah/blah/" + idx + "-blah");
        workflow.setStatus((idx % 2) == 0 ? WorkflowJob.Status.RUNNING : WorkflowJob.Status.SUCCEEDED);
        workflow.setRun(idx);
        workflow.setCreatedTime(new Date());
        workflow.setStartTime(new Date());
        workflow.setEndTime((idx % 2) == 0 ? null : (new Date()));
        workflow.setConf(conf);
        workflow.setAppName("workflow-" + idx);
        workflow.setGroup(GROUP);
        workflow.setUser(USER);

        List<JsonWorkflowAction> actions = new ArrayList<JsonWorkflowAction>();
        for (int i = 0; i < idx; i++) {
            actions.add(createDummyAction(i));
        }

        workflow.setActions(actions);
        return workflow;
    }
View Full Code Here


        DagEngine dagEngine = Services.get().get(DagEngineService.class).getDagEngine(getUser(request),
                                                                                      getAuthToken(request));
        try {
            if (show == null || show.equals(RestConstants.JOB_SHOW_INFO)) {
                stopCron();
                JsonWorkflowJob job = (JsonWorkflowJob) dagEngine.getJob(jobId);
                startCron();
                sendJsonResponse(response, HttpServletResponse.SC_OK, job);
            }
            else {
                if (show.equals(RestConstants.JOB_SHOW_LOG)) {
View Full Code Here

            return idx;
        }
    }

    private static WorkflowJob createDummyWorkflow(int idx) {
        JsonWorkflowJob workflow = new JsonWorkflowJob();
        workflow.setId(JOB_ID + idx);
        workflow.setAppPath("hdfs://blah/blah/" + idx + "-blah");
        workflow.setStatus((idx % 2) == 0 ? WorkflowJob.Status.RUNNING : WorkflowJob.Status.SUCCEEDED);
        workflow.setRun(idx);
        workflow.setCreatedTime(new Date());
        workflow.setStartTime(new Date());
        workflow.setEndTime((idx % 2) == 0 ? null : (new Date()));
        workflow.setConf(CONFIGURATION);
        workflow.setAppName("workflow-" + idx);
        workflow.setGroup(GROUP);
        workflow.setUser(USER);

        List<JsonWorkflowAction> actions = new ArrayList<JsonWorkflowAction>();
        for (int i = 0; i < idx; i++) {
            actions.add(createDummyAction(i));
        }

        workflow.setActions(actions);
        return workflow;
    }
View Full Code Here

        workflow.setActions(actions);
        return workflow;
    }

    private static WorkflowJob createDummyWorkflow(int idx, String conf) {
        JsonWorkflowJob workflow = new JsonWorkflowJob();
        workflow.setId(JOB_ID + idx);
        workflow.setAppPath("hdfs://blah/blah/" + idx + "-blah");
        workflow.setStatus((idx % 2) == 0 ? WorkflowJob.Status.RUNNING : WorkflowJob.Status.SUCCEEDED);
        workflow.setRun(idx);
        workflow.setCreatedTime(new Date());
        workflow.setStartTime(new Date());
        workflow.setEndTime((idx % 2) == 0 ? null : (new Date()));
        workflow.setConf(conf);
        workflow.setAppName("workflow-" + idx);
        workflow.setGroup(GROUP);
        workflow.setUser(USER);

        List<JsonWorkflowAction> actions = new ArrayList<JsonWorkflowAction>();
        for (int i = 0; i < idx; i++) {
            actions.add(createDummyAction(i));
        }

        workflow.setActions(actions);
        return workflow;
    }
View Full Code Here

TOP

Related Classes of org.apache.oozie.client.rest.JsonWorkflowJob

Copyright © 2018 www.massapicom. 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.