2016-07-29 74 views
0

我想運行使用ozzie的示例impala查詢。雖然運行中的shell我在HDFSOOzie Shell -Impala動作XML錯誤

<workflow-app name="shell-impala-select-wf" xmlns="uri:oozie:workflow:0.4"> 
    <start to="shell-impala-select"/> 
        <action name="shell-impala-select"> 
            <shell xmlns="uri:oozie:shell-action:0.1"> 
                <job-tracker>${jobTracker}</job-tracker> 
                <name-node>${nameNode}</name-node> 
       <configuration> 
        <property> 
         <name>mapred.job.queue.name</name> 
         <value>${queueName}</value> 
        </property> 
       </configuration> 
                <exec>script.sh</exec> 
                <file>${appPath}/script.sh#script.sh</file> 
                <file>${appPath}/first_impala.iql#first_impala.iql</file> 
           </shell> 
           <ok to="end"/> 
           <error to="kill"/> 
        </action> 
     <kill name="kill"> 
      <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message> 
     </kill> 
    <end name="end"/> 
</workflow-app> 

得到以下錯誤

Error: E0701 : E0701: XML schema error, cvc-complex-type.2.3: Element 'shell' cannot have character [children], because the type's content type is element-only.

Workflow.xml我checked..this是一個有效的XML.first_impala.iql有一個SELECT COUNT(*)查詢。

回答

2

Oozie驗證命令說這是有效的XML。我最近遇到了同樣的錯誤消息,但我自己的XML。這是由一些無效的空白字符引起的,這些字符以某種方式進入了我的XML(最可能是一個流浪的複製/粘貼)。嘗試從每一行中刪除所有前導/尾隨空白,並查找可能無效的其他任何字符。堆棧溢出可能已從您的帖子中刪除了無效字符。

+0

謝謝bduffin它工作..特殊字符是問題 – user2895589