oozie 失败重试和报警

393 查看

配置重试

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>

参考


2018 - 知识虫 - 我的知识库 渝ICP备16002641号-2

渝公网安备 50010702501581号