Package org.apache.oozie.service

Examples of org.apache.oozie.service.WorkflowAppService


        String xml = submitMRCmd.getWorkflowXml(conf);

        XLog.getLog(getClass()).info("xml = " + xml);

        //verifying is a valid WF
        WorkflowAppService wps = Services.get().get(WorkflowAppService.class);
        wps.parseDef(xml, conf);

        Element wfE = XmlUtils.parseXml(xml);
        Namespace ns = wfE.getNamespace();
        Element actionE = wfE.getChild("action", ns).getChild("map-reduce", ns);
        Element confE = actionE.getChild("configuration", ns);
View Full Code Here


            SubmitMRXCommand submitMRCmd = new SubmitMRXCommand(conf);
            String xml = submitMRCmd.getWorkflowXml(conf);

            //verifying is a valid WF
            WorkflowAppService wps = Services.get().get(WorkflowAppService.class);
            wps.parseDef(xml, conf);

            Element wfE = XmlUtils.parseXml(xml);
            Namespace ns = wfE.getNamespace();
            Element actionE = wfE.getChild("action", ns).getChild("map-reduce", ns);
            Element nnE = actionE.getChild("name-node", ns);
View Full Code Here

        wfBean.getActions().add(action);
        return wfBean;
    }

    private WorkflowJobBean createWorkflow(WorkflowApp app, Configuration conf, String authToken) throws Exception {
        WorkflowAppService wps = Services.get().get(WorkflowAppService.class);
        Configuration protoActionConf = wps.createProtoActionConf(conf, authToken, true);
        WorkflowLib workflowLib = Services.get().get(WorkflowStoreService.class).getWorkflowLibWithNoDB();
        WorkflowInstance wfInstance;
        wfInstance = workflowLib.createInstance(app, conf);
        WorkflowJobBean workflow = new WorkflowJobBean();
        workflow.setId(wfInstance.getId());
View Full Code Here

        WorkflowInstance newWfInstance;
        XLog log = XLog.getLog(getClass());
        parseSkippedNodeConf();
        checkPreConditions(wfBean, actions);

        WorkflowAppService wps = Services.get().get(WorkflowAppService.class);
        try {
            XLog.Info.get().setParameter(DagXLogInfoService.TOKEN, conf.get(OozieClient.LOG_TOKEN));
            WorkflowApp app = wps.parseDef(conf, authToken);
            XConfiguration protoActionConf = wps.createProtoActionConf(conf, authToken, true);
            WorkflowLib workflowLib = Services.get().get(WorkflowStoreService.class).getWorkflowLibWithNoDB();

            Path configDefault = new Path(new Path(conf.get(OozieClient.APP_PATH)).getParent(), SubmitCommand.CONFIG_DEFAULT);
            FileSystem fs = Services.get().get(HadoopAccessorService.class).
                    createFileSystem(wfBean.getUser(), wfBean.getGroup(), configDefault.toUri(), protoActionConf);
View Full Code Here

    }

    @Override
    protected String execute() throws CommandException {
        InstrumentUtils.incrJobCounter(getName(), 1, getInstrumentation());
        WorkflowAppService wps = Services.get().get(WorkflowAppService.class);
        try {
            XLog.Info.get().setParameter(DagXLogInfoService.TOKEN, conf.get(OozieClient.LOG_TOKEN));
            WorkflowApp app = wps.parseDef(conf, authToken);
            XConfiguration protoActionConf = wps.createProtoActionConf(conf, authToken, true);
            WorkflowLib workflowLib = Services.get().get(WorkflowStoreService.class).getWorkflowLibWithNoDB();

            String user = conf.get(OozieClient.USER_NAME);
            String group = conf.get(OozieClient.GROUP_NAME);
            URI uri = new URI(conf.get(OozieClient.APP_PATH));
View Full Code Here

        InstrumentUtils.incrJobCounter(getName(), 1, getInstrumentation());
        LogUtils.setLogInfo(wfBean, logInfo);
        WorkflowInstance oldWfInstance = this.wfBean.getWorkflowInstance();
        WorkflowInstance newWfInstance;

        WorkflowAppService wps = Services.get().get(WorkflowAppService.class);
        try {
            XLog.Info.get().setParameter(DagXLogInfoService.TOKEN, conf.get(OozieClient.LOG_TOKEN));
            WorkflowApp app = wps.parseDef(conf, authToken);
            XConfiguration protoActionConf = wps.createProtoActionConf(conf, authToken, true);
            WorkflowLib workflowLib = Services.get().get(WorkflowStoreService.class).getWorkflowLibWithNoDB();

            URI uri = new URI(conf.get(OozieClient.APP_PATH));
            FileSystem fs = Services.get().get(HadoopAccessorService.class).createFileSystem(wfBean.getUser(),
                    wfBean.getGroup(), uri, new Configuration());
View Full Code Here

    abstract protected String getWorkflowXml(Configuration conf);

    @Override
    protected String call(WorkflowStore store) throws StoreException, CommandException {
        incrJobCounter(1);
        WorkflowAppService wps = Services.get().get(WorkflowAppService.class);
        try {
            XLog.Info.get().setParameter(DagXLogInfoService.TOKEN, conf.get(OozieClient.LOG_TOKEN));
            String wfXml = getWorkflowXml(conf);
            XLog.getLog(getClass()).debug("workflow xml created on the server side is :\n");
            XLog.getLog(getClass()).debug(wfXml);
            WorkflowApp app = wps.parseDef(wfXml);

            if (conf.get(OozieClient.USE_SYSTEM_LIBPATH) == null) {
                if (Services.get().getConf().getBoolean(USE_SYSTEM_LIBPATH_FOR_MR_PIG_JOBS, false)) {
                    conf.setBoolean(OozieClient.USE_SYSTEM_LIBPATH, true);
                }
            }

            XConfiguration protoActionConf = wps.createProtoActionConf(conf, authToken, false);
            WorkflowLib workflowLib = Services.get().get(WorkflowStoreService.class).getWorkflowLibWithNoDB();

            PropertiesUtils.checkDisallowedProperties(conf, DISALLOWED_USER_PROPERTIES);

            // Resolving all variables in the job properties.
View Full Code Here

    }

    @Override
    protected String call(WorkflowStore store) throws StoreException, CommandException {
        incrJobCounter(1);
        WorkflowAppService wps = Services.get().get(WorkflowAppService.class);
        try {
            XLog.Info.get().setParameter(DagXLogInfoService.TOKEN, conf.get(OozieClient.LOG_TOKEN));
            WorkflowApp app = wps.parseDef(conf, authToken);
            XConfiguration protoActionConf = wps.createProtoActionConf(conf, authToken, true);
            WorkflowLib workflowLib = Services.get().get(WorkflowStoreService.class).getWorkflowLibWithNoDB();

            Path configDefault = new Path(new Path(conf.get(OozieClient.APP_PATH)).getParent(), CONFIG_DEFAULT);
            String user = conf.get(OozieClient.USER_NAME);
            String group = conf.get(OozieClient.GROUP_NAME);
View Full Code Here

    }

    @Override
    protected String call(WorkflowStore store) throws StoreException, CommandException {
        incrJobCounter(1);
        WorkflowAppService wps = Services.get().get(WorkflowAppService.class);
        try {
            XLog.Info.get().setParameter(DagXLogInfoService.TOKEN, conf.get(OozieClient.LOG_TOKEN));
            WorkflowApp app = wps.parseDef(conf, authToken);
            XConfiguration protoActionConf = wps.createProtoActionConf(conf, authToken, true);
            WorkflowLib workflowLib = Services.get().get(WorkflowStoreService.class).getWorkflowLibWithNoDB();

            Path configDefault = new Path(new Path(conf.get(OozieClient.APP_PATH)).getParent(), CONFIG_DEFAULT);
            String user = conf.get(OozieClient.USER_NAME);
            String group = conf.get(OozieClient.GROUP_NAME);
View Full Code Here

     * @see org.apache.oozie.command.XCommand#execute()
     */
    @Override
    protected String execute() throws CommandException {
        InstrumentUtils.incrJobCounter(getName(), 1, getInstrumentation());
        WorkflowAppService wps = Services.get().get(WorkflowAppService.class);
        try {
            XLog.Info.get().setParameter(DagXLogInfoService.TOKEN, conf.get(OozieClient.LOG_TOKEN));
            String wfXml = getWorkflowXml(conf);
            LOG.debug("workflow xml created on the server side is :\n");
            LOG.debug(wfXml);
            WorkflowApp app = wps.parseDef(wfXml);
            XConfiguration protoActionConf = wps.createProtoActionConf(conf, authToken, false);
            WorkflowLib workflowLib = Services.get().get(WorkflowStoreService.class).getWorkflowLibWithNoDB();

            PropertiesUtils.checkDisallowedProperties(conf, DISALLOWED_USER_PROPERTIES);

            // Resolving all variables in the job properties.
View Full Code Here

TOP

Related Classes of org.apache.oozie.service.WorkflowAppService

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.