Support Questions
Find answers, ask questions, and share your expertise

Error in hive-action of Oozie : org.apache.oozie.action.hadoop.HiveCompatibilityMain

Error in hive-action of Oozie : org.apache.oozie.action.hadoop.HiveCompatibilityMain

Contributor

 

Hi All,
I am using HDP 3.0.1. I want to execute only hive-action for Oozie. Following is my workflow and other configuration files. But I am facing issues regarding the "HiveCompatibilityMain". I am unable to solve the ERROR. Please help me out for the same.

 

workflow.xml

<?xml version="1.0" encoding="UTF-8"?>
<workflow-app name="hive-wf" xmlns="uri:oozie:workflow:0.2" >
<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>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<script>${appPath}/hive.hql</script>
</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>

 

job.properties

nameNode=hdfs://sandbox-hdp.hortonworks.com:8020
jobTracker=sandbox-hdp.hortonworks.com:8050
queueName=default
oozie.use.system.libpath=true
oozie.wf.application.path=${nameNode}/user/root/demoanalysis/oozie/hive
appPath=${oozie.wf.application.path}

 

hive.hql

CREATE DATABASE IF NOT EXISTS dbtemp;
DROP TABLE IF EXISTS dbtemp.demo;

CREATE TABLE IF NOT EXISTS dbtemp.demo(id int, name string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
STORED AS TEXTFILE;

Error:

2019-10-11 11:05:43,840 INFO CallbackServlet:520 - SERVER[sandbox-hdp.hortonworks.com] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[0000001-191011075519153-oozie-oozi-W@hive-node] callback for action [0000001-191011075519153-oozie-oozi-W@hive-node]
2019-10-11 11:05:50,050 INFO CoordMaterializeTriggerService$CoordMaterializeTriggerRunnable:520 - SERVER[sandbox-hdp.hortonworks.com] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] CoordMaterializeTriggerService - Curr Date= 2019-10-11T11:10Z, Num jobs to materialize = 0
2019-10-11 11:05:50,052 INFO CoordMaterializeTriggerService$CoordMaterializeTriggerRunnable:520 - SERVER[sandbox-hdp.hortonworks.com] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Released lock for [org.apache.oozie.service.CoordMaterializeTriggerService]
2019-10-11 11:06:03,627 INFO HiveCompatibilityActionExecutor:520 - SERVER[sandbox-hdp.hortonworks.com] USER[root] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[0000001-191011075519153-oozie-oozi-W@hive-node] Trying to get job [job_1570780157818_0003], attempt [1]
2019-10-11 11:06:05,045 INFO HiveCompatibilityActionExecutor:520 - SERVER[sandbox-hdp.hortonworks.com] USER[root] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[0000001-191011075519153-oozie-oozi-W@hive-node] action completed, external ID [job_1570780157818_0003]
2019-10-11 11:06:05,185 WARN HiveCompatibilityActionExecutor:523 - SERVER[sandbox-hdp.hortonworks.com] USER[root] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[0000001-191011075519153-oozie-oozi-W@hive-node] Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.HiveCompatibilityMain], exit code [2]
2019-10-11 11:06:05,281 INFO HiveCompatibilityActionExecutor:520 - SERVER[sandbox-hdp.hortonworks.com] USER[root] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[0000001-191011075519153-oozie-oozi-W@hive-node] Action ended with external status [FAILED/KILLED]
2019-10-11 11:06:05,306 INFO ActionEndXCommand:520 - SERVER[sandbox-hdp.hortonworks.com] USER[root] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[0000001-191011075519153-oozie-oozi-W@hive-node] ERROR is considered as FAILED for SLA
2019-10-11 11:06:05,381 INFO JPAService:520 - SERVER[sandbox-hdp.hortonworks.com] USER[root] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[0000001-191011075519153-oozie-oozi-W@hive-node] No results found
2019-10-11 11:06:05,528 INFO ActionStartXCommand:520 - SERVER[sandbox-hdp.hortonworks.com] USER[root] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[0000001-191011075519153-oozie-oozi-W@fail] Start action [0000001-191011075519153-oozie-oozi-W@fail] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10]
2019-10-11 11:06:05,541 INFO KillActionExecutor:520 - SERVER[sandbox-hdp.hortonworks.com] USER[root] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[0000001-191011075519153-oozie-oozi-W@fail] Starting action
2019-10-11 11:06:05,553 INFO ActionStartXCommand:520 - SERVER[sandbox-hdp.hortonworks.com] USER[root] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[0000001-191011075519153-oozie-oozi-W@fail] [***0000001-191011075519153-oozie-oozi-W@fail***]Action status=DONE
2019-10-11 11:06:05,561 INFO ActionStartXCommand:520 - SERVER[sandbox-hdp.hortonworks.com] USER[root] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[0000001-191011075519153-oozie-oozi-W@fail] [***0000001-191011075519153-oozie-oozi-W@fail***]Action updated in DB!
2019-10-11 11:06:05,648 INFO KillActionExecutor:520 - SERVER[sandbox-hdp.hortonworks.com] USER[root] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[0000001-191011075519153-oozie-oozi-W@fail] Action ended with external status [OK]
2019-10-11 11:06:05,914 INFO WorkflowNotificationXCommand:520 - SERVER[sandbox-hdp.hortonworks.com] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[0000001-191011075519153-oozie-oozi-W@fail] No Notification URL is defined. Therefore nothing to notify for job 0000001-191011075519153-oozie-oozi-W@fail
2019-10-11 11:06:05,914 INFO WorkflowNotificationXCommand:520 - SERVER[sandbox-hdp.hortonworks.com] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[] No Notification URL is defined. Therefore nothing to notify for job 0000001-191011075519153-oozie-oozi-W
2019-10-11 11:06:05,915 INFO WorkflowNotificationXCommand:520 - SERVER[sandbox-hdp.hortonworks.com] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000001-191011075519153-oozie-oozi-W] ACTION[0000001-191011075519153-oozie-oozi-W@hive-node] No Notification URL is defined. Therefore nothing to notify for job 0000001-191011075519153-oozie-oozi-W@hive-node

 

Regards,

Jay Patel.