Sqoop - 使用Oozie导入Hive失败

时间:2015-01-29 11:36:16

标签: hadoop import hive sqoop oozie

我正在尝试执行从oracle到hive的sqoop导入,但作业失败并出现错误

WARN [main] conf.HiveConf (HiveConf.java:initialize(2472)) - HiveConf of name hive.auto.convert.sortmerge.join.noconditionaltask does not exist Intercepting System.exit(1) <<< Invocation of Main class completed <<< Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.SqoopMain], exit code [1] Oozie Launcher failed, finishing Hadoop job gracefully

  1. 我已准备好所有jar文件
  2. hive-site.xml也适用于hive Metorore配置
  3. <property> <name>hive.metastore.uris</name> <value>thrift://sv2lxgsed01.xxxx.com:9083</value> </property>

    • 我能够成功运行sqoop导入(使用oozie)到HDFS。
    • 我也能够成功执行配置单元脚本(使用oozie)
    • 我也可以从命令行执行sqoop-hive导入,但是相同 使用oozie执行它时命令失败

    我的workflow.xml如下


    <workflow-app name="WorkflowWithSqoopAction" xmlns="uri:oozie:workflow:0.1"> <start to="sqoopAction"/> <action name="sqoopAction"> <sqoop xmlns="uri:oozie:sqoop-action:0.2"> <job-tracker>${jobTracker}</job-tracker> <name-node>${nameNode}</name-node> <command>import --connect jdbc:oracle:thin:@//sv2axcrmdbdi301.xxx.com:1521/DI3CRM --username xxxxxxx --password xxxxxx--table SIEBEL.S_ORG_EXT --hive-table eg.EQX_EG_CRM_S_ORG_EXT --hive-import -m1</command> <file>/user/oozie/oozieProject/workflowSqoopAction/hive-site.xml</file> </sqoop> <ok to="end"/> <error to="killJob"/> </action> <kill name="killJob"> <message>"Killed job due to error: ${wf:errorMessage(wf:lastErrorNode())}"</message> </kill> <end name="end" /> </workflow-app>

    我也可以在HDFS中找到加载的数据。

1 个答案:

答案 0 :(得分:0)

你需要做两件事

1)在oozie工作流目录中复制hive-site.xml 2)在你的Hive动作中告诉oozie使用我的hive-site.xml