Package org.apache.oozie.workflow

Examples of org.apache.oozie.workflow.WorkflowException


                Element element = XmlUtils.parseXml(nodeConf);
                actionType = element.getName();
                nodeConf = XmlUtils.prettyPrint(element).toString();
            }
            catch (JDOMException ex) {
                throw new WorkflowException(ErrorCode.E0700, ex.getMessage(), ex);
            }

            log.debug(" Creating action for node [{0}]", nodeName);
            action.setType(actionType);
            action.setExecutionPath(executionPath);
View Full Code Here


        if (!userRetryInterval.equals("null")) {
            try {
                ret = Integer.parseInt(userRetryInterval);
            }
            catch (NumberFormatException nfe) {
                throw new WorkflowException(ErrorCode.E0700, nfe.getMessage(), nfe);
            }
        }
        return ret;
    }
View Full Code Here

                    ret = max;
                    log.warn(ErrorCode.E0820.getTemplate(), ret, max);
                }
            }
            catch (NumberFormatException nfe) {
                throw new WorkflowException(ErrorCode.E0700, nfe.getMessage(), nfe);
            }
        }
        else {
            ret = 0;
        }
View Full Code Here

                Element element = XmlUtils.parseXml(nodeConf);
                actionType = element.getName();
                nodeConf = XmlUtils.prettyPrint(element).toString();
            }
            catch (JDOMException ex) {
                throw new WorkflowException(ErrorCode.E0700, ex.getMessage(), ex);
            }

            log.debug(" Creating action for node [{0}]", nodeName);
            action.setType(actionType);
            action.setExecutionPath(executionPath);
View Full Code Here

            IOUtils.copyCharStream(reader, writer);
            return writer.toString();

        }
        catch (IOException ex) {
            throw new WorkflowException(ErrorCode.E0710, ex.getMessage(), ex);
        }
        catch (URISyntaxException ex) {
            throw new WorkflowException(ErrorCode.E0711, appPath, ex.getMessage(), ex);
        }
        catch (HadoopAccessorException ex) {
            throw new WorkflowException(ex);
        }
        catch (Exception ex) {
            throw new WorkflowException(ErrorCode.E0710, ex.getMessage(), ex);
        }
    }
View Full Code Here

                }
            }
            return conf;
        }
        catch (IOException ex) {
            throw new WorkflowException(ErrorCode.E0712, jobConf.get(OozieClient.APP_PATH), ex.getMessage(), ex);
        }
        catch (URISyntaxException ex) {
            throw new WorkflowException(ErrorCode.E0711, jobConf.get(OozieClient.APP_PATH), ex.getMessage(), ex);
        }
        catch (HadoopAccessorException ex) {
            throw new WorkflowException(ex);
        }
        catch (Exception ex) {
            throw new WorkflowException(ErrorCode.E0712, jobConf.get(OozieClient.APP_PATH),
                                        ex.getMessage(), ex);
        }
    }
View Full Code Here

        status = Status.PREP;
    }

    public synchronized boolean start() throws WorkflowException {
        if (status != Status.PREP) {
            throw new WorkflowException(ErrorCode.E0719);
        }
        log.debug(XLog.STD, "Starting job");
        status = Status.RUNNING;
        executionPaths.put(ROOT, new NodeInstance(StartNodeDef.START));
        return signal(ROOT, StartNodeDef.START);
View Full Code Here

    public synchronized boolean signal(String executionPath, String signalValue) throws WorkflowException {
        ParamChecker.notEmpty(executionPath, "executionPath");
        ParamChecker.notNull(signalValue, "signalValue");
        log.debug(XLog.STD, "Signaling job execution path [{0}] signal value [{1}]", executionPath, signalValue);
        if (status != Status.RUNNING) {
            throw new WorkflowException(ErrorCode.E0716);
        }
        NodeInstance nodeJob = executionPaths.get(executionPath);
        if (nodeJob == null) {
            status = Status.FAILED;
            log.error("invalid execution path [{0}]", executionPath);
View Full Code Here

        return status.isEndState();
    }

    public synchronized void fail(String nodeName) throws WorkflowException {
        if (status.isEndState()) {
            throw new WorkflowException(ErrorCode.E0718);
        }
        String failedNode = failNode(nodeName);
        if (failedNode != null) {
            log.warn(XLog.STD, "Workflow Failed. Failing node [{0}]", failedNode);
        }
View Full Code Here

        status = Status.FAILED;
    }

    public synchronized void kill() throws WorkflowException {
        if (status.isEndState()) {
            throw new WorkflowException(ErrorCode.E0718);
        }
        log.debug(XLog.STD, "Killing job");
        List<String> killedNodes = killNodes();
        if (killedNodes.size() > 1) {
            log.warn(XLog.STD, "workflow killed, killing [{0}] nodes", killedNodes.size());
View Full Code Here

TOP

Related Classes of org.apache.oozie.workflow.WorkflowException

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.