0
votes

I am trying to execute a sqoop import from oracle to hive, but the job fails with error

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. I have all the jar files in place
  2. hive-site.xml is also in place with hive metastore configuration

<property> <name>hive.metastore.uris</name> <value>thrift://sv2lxgsed01.xxxx.com:9083</value> </property>

  • I am able to run a sqoop import(using oozie) to HDFS successfully.
  • I am also able to execute a hive script(using oozie) successfully
  • I can also execute sqoop-hive import from commandline , but the same command fails when I execute it using oozie

My workflow.xml is as below


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

I can also find the data being loaded in HDFS.

1

1 Answers

0
votes

You need to do 2 things

1) Copy hive-site.xml in the oozie workflow directory 2) In your Hive action tell oozie that use my hive-site.xml