Package org.apache.oozie.util

Examples of org.apache.oozie.util.XConfiguration.toXmlString()


        String testDir = getTestCaseDir();

        XConfiguration jobConf = new XConfiguration();
        jobConf.set(OozieClient.USER_NAME, getTestUser());

        String confStr = jobConf.toXmlString(false);
        coordJob.setConf(confStr);
        String appXml = "<coordinator-app xmlns='uri:oozie:coordinator:0.2' name='NAME' frequency=\"1\" start='2009-02-01T01:00" + TZ + "' end='2009-02-03T23:59" + TZ + "' timezone='UTC' freq_timeunit='DAY' end_of_duration='NONE'>";
        appXml += "<controls>";
        appXml += "<timeout>10</timeout>";
        appXml += "<concurrency>2</concurrency>";
View Full Code Here


    }

    public void testCoordNotificationTimeout() throws Exception {
        XConfiguration conf = new XConfiguration();
        conf.set(OozieClient.COORD_ACTION_NOTIFICATION_URL, container.getServletURL("/hang/*"));
        String runConf = conf.toXmlString(false);
        CoordinatorActionBean coord = Mockito.mock(CoordinatorActionBean.class);
        Mockito.when(coord.getId()).thenReturn("1");
        Mockito.when(coord.getStatus()).thenReturn(CoordinatorAction.Status.SUCCEEDED);
        Mockito.when(coord.getRunConf()).thenReturn(runConf);
        CoordActionNotificationXCommand command = new CoordActionNotificationXCommand(coord);
View Full Code Here

        StringBuilder sb = new StringBuilder("<map-reduce>")
                .append("<job-tracker>").append(getJobTrackerUri())
                .append("</job-tracker>").append("<name-node>")
                .append(getNameNodeUri()).append("</name-node>")
                .append(mrConfig.toXmlString(false)).append("</map-reduce>");
        String actionXml = sb.toString();

        Context context = createContext("map-reduce", actionXml);
        final RunningJob launcherJob = submitAction(context);
        String launcherId = context.getAction().getExternalId();
View Full Code Here

        XConfiguration wfConf = new XConfiguration();
        wfConf.set(OozieClient.APP_PATH, appPath.toString());

        WorkflowJobBean workflow = new WorkflowJobBean();
        workflow.setConf(wfConf.toXmlString());
        workflow.setAppPath(wfConf.get(OozieClient.APP_PATH));
        workflow.setProtoActionConf(protoConf.toXmlString());
        workflow.setId(Services.get().get(UUIDService.class).generateId(ApplicationType.WORKFLOW));

        final WorkflowActionBean action = new WorkflowActionBean();
View Full Code Here

        createdConf += "</configuration> ";

        XConfiguration conf = new XConfiguration(new StringReader(createdConf));
        injectKerberosInfo(conf);
        createdConf = conf.toXmlString(false);

        action.setCreatedConf(createdConf);
        store.insertCoordinatorAction(action);
        String content = "<workflow-app xmlns='uri:oozie:workflow:0.1'  xmlns:sla='uri:oozie:sla:0.1' name='no-op-wf'>";
        content += "<start to='end' />";
View Full Code Here

        XConfiguration jobConf = new XConfiguration();
        jobConf.set(OozieClient.USER_NAME, getTestUser());
        jobConf.set(OozieClient.GROUP_NAME, getTestGroup());
        injectKerberosInfo(jobConf);
        String confStr = jobConf.toXmlString(false);
        coordJob.setConf(confStr);
        String appXml = "<coordinator-app xmlns='uri:oozie:coordinator:0.1' name='NAME' frequency=\"1\" start='2009-02-01T01:00Z' end='2009-02-03T23:59Z' timezone='UTC' freq_timeunit='DAY' end_of_duration='NONE'>";
        appXml += "<controls>";
        appXml += "<timeout>10</timeout>";
        appXml += "<concurrency>2</concurrency>";
View Full Code Here

        XConfiguration jobConf = new XConfiguration();
        jobConf.set(OozieClient.USER_NAME, getTestUser());
        jobConf.set(OozieClient.GROUP_NAME, getTestGroup());
        injectKerberosInfo(jobConf);
        String confStr = jobConf.toXmlString(false);
        coordJob.setConf(confStr);
        String appXml = "<coordinator-app xmlns='uri:oozie:coordinator:0.2' name='NAME' frequency=\"1\" start='2009-02-01T01:00Z' end='2009-02-03T23:59Z' timezone='UTC' freq_timeunit='DAY' end_of_duration='NONE'>";
        appXml += "<controls>";
        appXml += "<timeout>10</timeout>";
        appXml += "<concurrency>2</concurrency>";
View Full Code Here

        wf.setAppPath("appPath");
        wf.setUser("user");
        wf.setGroup("group");
        wf.setWorkflowInstance(job);
        wf.setRun(2);
        wf.setProtoActionConf(conf.toXmlString());

        WorkflowActionBean action = new WorkflowActionBean();
        action.setId("actionId");
        action.setName("actionName");
        action.setErrorInfo("ec", "em");
View Full Code Here

        XConfiguration protoConf = getBaseProtoConf();
        WorkflowJobBean workflow = createBaseWorkflow(protoConf, "W");
        String defaultConf = workflow.getConf();
        XConfiguration newConf = new XConfiguration(new StringReader(defaultConf));
        newConf.set("abc", "xyz");
        workflow.setConf(newConf.toXmlString());

        final WorkflowActionBean action = (WorkflowActionBean) workflow.getActions().get(0);
        action.setConf("<sub-workflow xmlns='uri:oozie:workflow:0.1' name='subwf'>" +
                "      <app-path>" + subWorkflowAppPath + File.separator + "workflow.xml" + "</app-path>" +
                "      <propagate-configuration />" +
View Full Code Here

        XConfiguration protoConf = getBaseProtoConf();
        WorkflowJobBean workflow = createBaseWorkflow(protoConf, "W");
        String defaultConf = workflow.getConf();
        XConfiguration newConf = new XConfiguration(new StringReader(defaultConf));
        newConf.set("abc", "xyz");
        workflow.setConf(newConf.toXmlString());

        final WorkflowActionBean action = (WorkflowActionBean) workflow.getActions().get(0);
        action.setConf("<sub-workflow xmlns='uri:oozie:workflow:0.1' name='subwf'>" +
                "      <app-path>" + subWorkflowAppPath + File.separator + "workflow.xml" + "</app-path>" +
                "      <configuration>" +
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.