Hi,
I'm using CDH 5.16.0. and I'm trying to execute a simple Oozie workflow for inserting data from one hive table to other. Hive script (hive -f script.hql) ran through CLI is working fine. But the same hql script got hung only while executing "insert into table prod1 select * from prod" hive command through Oozie workflow. Oozie job scheduler always appear in a RUNNING state at the Workflow Manager console with no progress. I finally have to kill the job. This Oozie job hung 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=test
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>