oozie - 无法使用数字

时间:2017-11-03 19:22:54

标签: oozie oozie-coordinator oozie-workflow

我有一个oozie工作流程,它有许多控制和动作节点。为了使跟踪Hue浏览器中的操作变得容易一些,我尝试通过将1,2,3等前缀添加到节点名称来对控制和操作节点进行编号。 这是工作流代码段

<workflow-app name="reporting_W_error_audit_report" xmlns="uri:oozie:workflow:0.4">
    <start to="1_JobInitiated_SendMail" />
    <action name='1_JobInitiated_SendMail'>
        <email xmlns='uri:oozie:email-action:0.1'>
            <to>${failureEmailToAddress}</to>
            <subject>The workflow has been kicked off at ${timestamp()}</subject>
            <body>The workflow "${wf:name()}" with workflow id "${wf:id()}" has been started at ${timestamp()} and is currently running. You will get further notification upon its Success or Failure.</body>
        </email>
        <ok to='2_rename_trigger_flag_file_processing'/>
        <error to='2_rename_trigger_flag_file_processing' />
    </action>
    <action name="02_rename_trigger_flag_file_processing">
        <fs>
...
...

在验证工作流程时,我收到了以下错误。

Error: E0701: XML schema error, /dn01/home/testarea/wf.xml, org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 40; cvc-pattern-valid: Value '1_JobInitiated_SendMail' is not facet-valid with respect to pattern '([a-zA-Z_]([\-_a-zA-Z0-9])*){1,39}' for type 'IDENTIFIER'.

如何编写节点名称,如何摆脱此错误?

1 个答案:

答案 0 :(得分:0)

我觉得我应该发布答案,因为我设法让这个工作。我发现的是节点的名称不能用数字开头,但它可以容纳任何其他地方的数字。我只是尝试用其后缀数字命名其中一个节点,并且它有效。下面的工作代码段..

<workflow-app name="reporting_W_error_audit_report" xmlns="uri:oozie:workflow:0.4">
    <start to="JobInitiated_SendMail_01" />
    <action name='JobInitiated_SendMail_01'>
        <email xmlns='uri:oozie:email-action:0.1'>
            <to>${failureEmailToAddress}</to>
            <subject>The workflow has been kicked off at ${timestamp()}</subject>
            <body>The workflow "${wf:name()}" with workflow id "${wf:id()}" has been started at ${timestamp()} and is currently running. You will get further notification upon its Success or Failure.</body>
        </email>
        <ok to='rename_trigger_flag_file_processing_02'/>
        <error to='rename_trigger_flag_file_processing_02' />
    </action>
    <action name="rename_trigger_flag_file_processing_02">
...
...