我有一個簡單的oozie工作流程,執行豬操作並在發生故障時發送電子郵件。如何將配置傳遞給Oozie電子郵件操作
電子郵件動作節點:
<action name="send_email_on_error">
<email xmlns="uri:oozie:email-action:0.1">
<job-xml>oozie-site.xml</job-xml>
<to>[email protected]</to>
<subject>Oozie Error</subject>
<body>error message[${wf:errorMessage(wf:lastErrorNode())}]</body>
</email>
<ok to="fail"/>
<error to="fail"/>
</action>
我創建了一個Oozie的-site.xml文件,並添加到它的以下屬性:
<property>
<name>oozie.email.smtp.host</name>
<value>smtp.gmail.com</value>
</property>
<property>
<name>oozie.email.smtp.port</name>
<value>587</value>
</property>
<property>
<name>oozie.email.from.address</name>
<value>[email protected]</value>
</property>
嘗試部署我得到一個錯誤的工作:
E0701: XML schema error, cvc-complex-type.2.4.a: Invalid content was found starting with element 'job-xml'. One of '{"uri:oozie:email-action:0.1":to}' is expected.
如何將此必要配置傳遞給Oozie?