2017-01-09 16 views
0

以下のhqlクエリに基づいてHue UIで新しいOozieワークフローを作成しました。Oozieワークフローが正しく実行されていない

things.hql

drop table output_table; 
create table output_table like things; 
insert overwrite table output_table select t.* from things_dup td right outer join things t on (td.item_id = t.item_id) where td.item_id is null; 
insert overwrite table things_dup select * from things; 

テーブルがあり、

物事テーブル

item_id product 
1   soap 
2   chocklate 

things_dup

item_id product 
1   soap 

ワット鶏私はHQL別々

HadoopのDFS -f things.hql

その作業罰金を実行します。 things_dupテーブルが正しく更新されました。

しかし、ワークフローを実行すると、things_dupテーブルは更新されませんでした。 上書き挿入テーブルthings_dup select * from things;

理由を知ることはできますか?この問題を解決するのを手伝ってください。

Workflow.xml

<workflow-app name="Things_workflow" xmlns="uri:oozie:workflow:0.4"> 
    <start to="Things_workflow"/> 
    <action name="Things_workflow"> 
     <hive xmlns="uri:oozie:hive-action:0.2"> 
      <job-tracker>${jobTracker}</job-tracker> 
      <name-node>${nameNode}</name-node> 
       <job-xml>/user/cloudera/hive-site.xml</job-xml> 
      <script>things.hql</script> 
      <file>/user/cloudera/hive-site.xml#hive-site.xml</file> 
     </hive> 
     <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> 

アクション

<hive xmlns="uri:oozie:hive-action:0.2"> 
    <job-tracker>localhost.localdomain:8021</job-tracker> 
    <name-node>hdfs://localhost.localdomain:8020</name-node> 
    <job-xml>/user/cloudera/hive-site.xml</job-xml> 
    <script>things.hql</script> 
    <file>/user/cloudera/hive-site.xml#hive-site.xml</file> 
</hive> 

おかげで、私もハイブoozieの問題を得たが、最終的に解決

+0

あなたのworkflow.xml –

+0

'workflow.xml'を投稿してください。あなたが見ているエラーは何ですか?起動したハイブアクションジョブからログを確認してください。ありがとう。 – YoungHobbit

+0

ご返信ありがとうございます。私はXMLを書いていない。私はHUE UI Oozieエディタを介してワークフローを作成しています。 –

答えて

0

manimekalai。

workflow.xmlに一致させてください。

コンフィギュレーションノードの前にこのjob-xml行を置いてください。

<?xml version="1.0" encoding="UTF-8"?> 
<workflow-app xmlns="uri:oozie:workflow:0.2" name="pig-hive-wf"> 

<start to="hive-node" /> 

    <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> 

     <configuration> 
     <property> 
      <name>mapred.job.queue.name</name> 
      <value>${queueName}</value> 
     </property> 
      <property> 
        <name>oozie.hive.defaults</name> 
        <value>/user/cloudera/oozie/pig_hive_data_WF/hive-site.xml</value> 
       </property> 
     </configuration> 
     <script>/user/cloudera/oozie/pig_hive_data_WF/load_data.q</script> 
     <param>LOCATION=/user/${wf:user()}/oozie/pig_hive_data_WF/output/pig_loaded_data</param> 
     <file>hive-conf.xml#hive-conf.xml</file> 
    </hive> 
    <ok to="end"/> 
    <error to="fail"/> 
    </action> 

    <kill name="fail"> 
    <message>Pig Hive job is failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message> 
    </kill> 
    <end name="end" /> 
</workflow-app> 

あなたは/etc/hive/conf/hive-site.xmlからハイブ-site.xmlファイルをコピーして、ワークフローのディレクトリ内に置くことができます。

関連する問題