Created 01-21-2019 10:52 AM
Hi, I'm using CDH 5.16.0. and I'm trying to define a simple Oozie workflow for inserting data from one hive table to other. Hive script ran through CLI is working fine. The same hql scripts do not work on Oozie workflow. They always appear in a RUNNING state at the Workflow Manager console for a very long time and I finally have to kill them. This error is coming only for executing "insert into" Hive command. Job.Properties file is given below: nameNode=hdfs://quickstart.cloudera:8020 jobTracker=quickstart.cloudera:8032 queueName=default oozie.use.system.libpath=true oozie.libpath=/user/oozie/share/lib oozie.wf.application.path=${nameNode}/user/hadoop/poc dbName=t4 inputPath=hdfs:///user/hadoop/input.txt script.hql file is given below: use ${DB_NAME}; create table prod (productid int, productname string, price float, category string) row format delimited fields terminated by ','; create table prod1 (productid int, productname string, price float, category string) row format delimited fields terminated by ','; load data inpath '${INPUT_PATH}' into table prod; insert into table prod1 select * from prod; input.txt file is given below: 1,hive,25,sql 2,mongodb,30,nosql
Workflow.xml file is given below: <workflow-app xmlns="uri:oozie:workflow:0.4" name="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> </configuration> <script>script.hql</script> <param>DB_NAME=${dbName}</param> <param>INPUT_PATH=${inputPath}</param> </hive> <ok to="end"/> <error to="fail"/> </action> <kill name="fail"> <message>Hive failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message> </kill> <end name="end"/> </workflow-app>
Created 01-21-2019 11:07 AM
Created 01-21-2019 11:23 AM
Hi subhash parise,
The link shared by you only talk about when you hit "Error"/"Killed" output while running Oozie job. For me Oozie job output is always in "Running" state.