Package org.apache.oozie.action

Examples of org.apache.oozie.action.ActionExecutorException


        if (regularMR) {
            // Resolve uber jar path (has to be done after super because oozie.mapreduce.uber.jar is under <configuration>)
            String uberJar = actionConf.get(OOZIE_MAPREDUCE_UBER_JAR);
            if (uberJar != null) {
                if (!Services.get().getConf().getBoolean(OOZIE_MAPREDUCE_UBER_JAR_ENABLE, false)) {
                    throw new ActionExecutorException(ActionExecutorException.ErrorType.ERROR, "MR003",
                            "{0} property is not allowed.  Set {1} to true in oozie-site to enable.", OOZIE_MAPREDUCE_UBER_JAR,
                            OOZIE_MAPREDUCE_UBER_JAR_ENABLE);
                }
                String nameNode = actionXml.getChildTextTrim("name-node", ns);
                if (nameNode != null) {
View Full Code Here


                Element actionXml = XmlUtils.parseXml(action.getConf());
                JobConf jobConf = createBaseHadoopConf(context, actionXml);
                jobClient = createJobClient(context, jobConf);
                RunningJob runningJob = jobClient.getJob(JobID.forName(action.getExternalId()));
                if (runningJob == null) {
                    throw new ActionExecutorException(ActionExecutorException.ErrorType.FAILED, "MR002",
                                                      "Unknown hadoop job [{0}] associated with action [{1}].  Failing this action!", action
                            .getExternalId(), action.getId());
                }

                Counters counters = runningJob.getCounters();
View Full Code Here

                            XLog.getLog(getClass()).debug("Start, name [{0}] type [{1}] configuration{E}{E}{2}{E}",
                                                          action.getName(), action.getType(), actionConf);

                        }
                        catch (ELEvaluationException ex) {
                            throw new ActionExecutorException(ActionExecutorException.ErrorType.TRANSIENT,
                                                              EL_EVAL_ERROR, ex.getMessage(), ex);
                        }
                        catch (ELException ex) {
                            context.setErrorInfo(EL_ERROR, ex.getMessage());
                            XLog.getLog(getClass()).warn("ELException in ActionStartCommand ", ex.getMessage(), ex);
View Full Code Here

                LOG.debug("Start, name [{0}] type [{1}] configuration{E}{E}{2}{E}", wfAction.getName(), wfAction
                        .getType(), actionConf);

            }
            catch (ELEvaluationException ex) {
                throw new ActionExecutorException(ActionExecutorException.ErrorType.TRANSIENT, EL_EVAL_ERROR, ex
                        .getMessage(), ex);
            }
            catch (ELException ex) {
                context.setErrorInfo(EL_ERROR, ex.getMessage());
                LOG.warn("ELException in ActionStartXCommand ", ex.getMessage(), ex);
View Full Code Here

                JobConf jobConf = new JobConf();
                XConfiguration.copy(conf, jobConf);
                jobClient = createJobClient(context, jobConf);
                RunningJob runningJob = jobClient.getJob(JobID.forName(action.getExternalId()));
                if (runningJob == null) {
                    throw new ActionExecutorException(ActionExecutorException.ErrorType.FAILED, "MR002",
                                                      "Unknown hadoop job [{0}] associated with action [{1}].  Failing this action!", action
                            .getExternalId(), action.getId());
                }

                // TODO this has to be done in a better way
                if (!runningJob.getJobName().startsWith("oozie:action:")) {
                    throw new ActionExecutorException(ActionExecutorException.ErrorType.FAILED, "MR001",
                                                      "ID swap should have happened in launcher job [{0}]", action.getExternalId());
                }
                Counters counters = runningJob.getCounters();
                if (counters != null) {
                    JSONObject json = counterstoJson(counters);
View Full Code Here

    private Element getConfiguration(String strConf) throws ActionExecutorException {
        try {
            return XmlUtils.parseXml(strConf);
        }
        catch (JDOMException ex) {
            throw new ActionExecutorException(ActionExecutorException.ErrorType.ERROR, TEST_ERROR, ex.getMessage(), ex);
        }
    }
View Full Code Here

        Element eConf = getConfiguration(action.getConf());
        Namespace ns = eConf.getNamespace();
        String error = eConf.getChild("error", ns).getText().trim();

        if ("start.transient".equals(error)) {
            throw new ActionExecutorException(ActionExecutorException.ErrorType.TRANSIENT, TEST_ERROR, "start");
        }
        if ("start.non-transient".equals(error)) {
            throw new ActionExecutorException(ActionExecutorException.ErrorType.NON_TRANSIENT, TEST_ERROR, "start");
        }
        if ("start.error".equals(error)) {
            throw new ActionExecutorException(ActionExecutorException.ErrorType.ERROR, TEST_ERROR, "start");
        }
        String externalStatus = eConf.getChild("external-status", ns).getText().trim();

        String runningMode = "sync";
        Element runningModeElement = eConf.getChild("running-mode", ns);
View Full Code Here

    public void end(Context context, WorkflowAction action) throws ActionExecutorException {
        Element eConf = getConfiguration(action.getConf());
        Namespace ns = eConf.getNamespace();
        String error = eConf.getChild("error", ns).getText().trim();
        if ("end.transient".equals(error)) {
            throw new ActionExecutorException(ActionExecutorException.ErrorType.TRANSIENT, TEST_ERROR, "end");
        }
        if ("end.non-transient".equals(error)) {
            throw new ActionExecutorException(ActionExecutorException.ErrorType.NON_TRANSIENT, TEST_ERROR, "end");
        }
        if ("end.error".equals(error)) {
            throw new ActionExecutorException(ActionExecutorException.ErrorType.ERROR, TEST_ERROR, "end");
        }
        String signalValue = eConf.getChild("signal-value", ns).getText().trim();
        String externalStatus = action.getExternalStatus();
        WorkflowAction.Status status = null;
        if (externalStatus.equals("ok")) {
View Full Code Here

    void validatePath(Path path, boolean withScheme) throws ActionExecutorException {
        String scheme = path.toUri().getScheme();
        if (withScheme) {
            if (scheme == null) {
                throw new ActionExecutorException(ActionExecutorException.ErrorType.ERROR, "FS001",
                                                  "Missing scheme in path [{0}]", path);
            }
            else {
                if (!scheme.equals("hdfs")) {
                    throw new ActionExecutorException(ActionExecutorException.ErrorType.ERROR, "FS002",
                                                      "Scheme [{0}] not supported in path [{1}]", scheme, path);
                }
            }
        }
        else {
            if (scheme != null) {
                throw new ActionExecutorException(ActionExecutorException.ErrorType.ERROR, "FS003",
                                                  "Scheme [{0}] not allowed in path [{1}]", scheme, path);
            }
        }
    }
View Full Code Here

        String t = destPath.toUri().getScheme() + destPath.toUri().getAuthority();
        String s = source.toUri().getScheme() + source.toUri().getAuthority();

        //checking whether NN prefix of source and target is same. can modify this to adjust for a set of multiple whitelisted NN
        if(!t.equals(s)) {
            throw new ActionExecutorException(ActionExecutorException.ErrorType.ERROR, "FS007",
                    "move, target NN URI different from that of source", dest);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.oozie.action.ActionExecutorException

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.