Oozie Hive to HDFS

I am trying to run oozie for copying table from Hive to HDFS. The job ends with an error although I am able to copy the table to HDFS manually.

Following is the error that I am getting:

Script [hive_testing.hql] content:

use sq;
insert overwrite directory ‘/user/alokdeosingh1995/alok_hive_table’ select * from employees;


Beeline command arguments :
-u
jdbc:hive2://ip-172-31-38-146.ec2.internal:10000
-n
alokdeosingh1995
-p
********
-d
org.apache.hive.jdbc.HiveDriver
-f
hive_testing.hql
-a
delegationToken
–hiveconf
mapreduce.job.tags=oozie-b30f90fa5d4c094a2cf364a17efad652
–hiveconf
oozie.action.id=0000027-190118144148298-oozie-oozi-W@hive2-0a71
–hiveconf
oozie.child.mapreduce.job.tags=oozie-b30f90fa5d4c094a2cf364a17efad652
–hiveconf
oozie.action.rootlogger.log.level=INFO
–hiveconf
oozie.job.id=0000027-190118144148298-oozie-oozi-W
–hiveconf
oozie.HadoopAccessorService.created=true
Fetching child yarn jobs
tag id : oozie-b30f90fa5d4c094a2cf364a17efad652
Child yarn jobs are found -

Invoking Beeline command line now >>>

<<< Invocation of Beeline command completed <<<

No child hadoop job is executed.
Intercepting System.exit(2)

<<< Invocation of Main class completed <<<

Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.Hive2Main], exit code [2]

Oozie Launcher failed, finishing Hadoop job gracefully

Oozie Launcher, uploading action data to HDFS sequence file: hdfs://ip-172-31-35-141.ec2.internal:8020/user/alokdeosingh1995/oozie-oozi/0000027-190118144148298-oozie-oozi-W/hive2-0a71–hive2/action-data.seq
Successfully reset security manager from org.apache.oozie.action.hadoop.LauncherSecurityManager@847f3e7 to null

Oozie Launcher ends

This is resolved. It was issue with the script. Thanks for the help over emails.

Hi Alok,

Can u plz post the solution here.