0

我正在尝试使用 Oozie 在我的猪脚本之前执行一个 shell 脚本。据我所知,我做的事情和我能找到的每个例子都是一样的。我的行动是:

<action name="shell_action" cred="yca_auth">
    <shell xmlns="uri:oozie:shell-action:0.1">
        <job-tracker>${jobTracker}</job-tracker>
        <name-node>${nameNode}</name-node>
        <exec>${appPath}/shell_script.sh</exec>
        <file>${appPath}/shell_script.sh#shell_script.sh</file>

        <ok to="pig_script_action"/> <error to="kill"/>
    </shell>
</action>

但我不断收到错误:

Caused by: org.apache.oozie.workflow.WorkflowException: E0701: XML schema error, cvc-complex-type.2.4.a: Invalid content was found starting with element 'ok'. One of '{"uri:oozie:shell-action:0.1":file, "uri:oozie:shell-action:0.1":archive, "uri:oozie:shell-action:0.1":capture-output}' is expected.

我不明白为什么会这样。请帮忙

4

2 回答 2

0

问题是 ok to 和 error to 不应该在里面

于 2017-08-30T16:49:26.537 回答
0

正确的配置如下:

<action name="shell_action" cred="yca_auth">
    <shell xmlns="uri:oozie:shell-action:0.1">
        <job-tracker>${jobTracker}</job-tracker>
        <name-node>${nameNode}</name-node>
        <exec>${appPath}/shell_script.sh</exec>
        <file>${appPath}/shell_script.sh#shell_script.sh</file>
    </shell>
    <ok to="pig_script_action"/> 
    <error to="kill"/>
</action>

于 2019-01-29T12:38:58.507 回答