1

配置重试

xml<workflow-app xmlns="uri:oozie:workflow:0.3" name="wf-name">  
    <action name="a" retry-max="3" retry-interval="1">  
</action>  

添加失败报警

xml<action name="sdk-sendmail-failed">
        <email xmlns="uri:oozie:email-action:0.1">
            <to>alert@timger.info</to>
            <subject>[OOZIE FAILED] ${wf:id()}</subject>
            <body>
                Etl daily stat failed!
                Stat DATE:${jobYear}-${jobMonth}-${jobDay},
                Error message:[${wf:errorMessage(wf:lastErrorNode())}].
            </body>
        </email>
        <ok to="end"/>
        <error to="fail"/>
    </action>

    <kill name="fail">
        <message>Sdk daily stat workflow failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>

参考


timger
631 声望22 粉丝