当我尝试使用以下代码运行 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>
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
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.
Run Code Online (Sandbox Code Playgroud)
但是在我修改了 hive action 中声明标签的顺序<job-xml>...</job-xml>
后<prepare>...</prepare>
,即移动后,它工作正常。
是否有必要在 oozie 操作中遵循这些命令?
该架构使用,
<xs:sequence>
<xs:element name="job-tracker" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="name-node" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="prepare" type="hive:PREPARE" minOccurs="0" maxOccurs="1"/>
<xs:element name="job-xml" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="configuration" type="hive:CONFIGURATION" minOccurs="0" maxOccurs="1"/>
<xs:element name="script" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="param" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="file" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="archive" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
Run Code Online (Sandbox Code Playgroud)
的元件xs:sequence
,其作为每W3Schools的,
该序列元素指定了子元素必须出现在序列。每个子元素可以出现 0 次到任意次数。
我们可以看到按照该架构蜂房行动<prepare>
到来之前<job-xml>
的序列
归档时间: |
|
查看次数: |
2258 次 |
最近记录: |