当我尝试使用以下代码运行 oozie hive 操作时
<action name="Hive-Node">
<hive xmlns="uri:oozie:hive-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<job-xml>hive-site.xml</job-xml>
<prepare>
<mkdir path="${nameNode}/hive/output"/>
</prepare>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
<property>
<name>hive.insert.into.multilevel.dirs</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>${hbaseZooQuorum}</value>
</property>
</configuration>
<script>${HIVE_QUERY_FILE}</script>
</hive>
<ok to="End" />
<error to="Fail" />
</action>
我收到以下错误:
Error: E0701 : E0701: XML schema error, cvc-complex-type.2.4.a: Invalid content was found starting with element 'prepare'. One of '{"uri:oozie:hive-action:0.2":configuration, "uri:oozie:hive-action:0.2":script}' is expected.
但是在我修改了在 hive 操作中声明标签的顺序<job-xml>...</job-xml>
之后<prepare>...</prepare>
,它工作正常。
是否有必要在 oozie 操作中遵循这些命令?