Christoph Körner created OOZIE-2772:
---------------------------------------
Summary: Oozie job with Hive 2 action finishes with SUCCEEDED
despite beeline error
Key: OOZIE-2772
URL: https://issues.apache.org/jira/browse/OOZIE-2772
Project: Oozie
Issue Type: Bug
Affects Versions: 4.2.0
Environment: HDP 2.4, Beeline version 1.2.1000.2.4.0.0-169
Reporter: Christoph Körner
Running a simple Oozie Job with a Hive 2 action and a missing init script will
cause an error in beeline. However, the Oozie job is not picking up the error
and reporting status SUCCEEDED in the web UI. Interestingly the launcher MR job
creates a log file in the local appcache directory; however this error log is
not visible in the yarn logs neither and gets deleted with the appcache
automatically.
I tested it with the following statement (the complete workflow can be found on
Github:
https://github.com/chaosmail/oozie-bugs/tree/master/simple-hive-init/simple-hive-init-wf).
Init Script:
{code:title=init.hive|borderStyle=solid}
CREATE TEMPORARY MACRO ADD_NUMBERS(a INT, b INT) a + b;
{code}
Query Script:
{code:title=query.hive|borderStyle=solid}
SELECT ADD_NUMBERS(1,2) FROM tbl LIMIT 1;
{code}
The hive error log in the local appcache directory.
{code:borderStyle=solid}
$ more
appcache/application_1480609892100_0276/container_e55_1480609892100_0276_01_000002/hive2-oozie-job_1480609892100_0276.log
Connecting to jdbc:hive2://localhost:10000/default
Connected to: Apache Hive (version 1.2.1000.2.4.0.0-169)
Driver: Hive JDBC (version 1.2.1000.2.4.0.0-169)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Running init script init.hive
init.hive (No such file or directory)
Closing: 0: jdbc:hive2://localhost:10000/default
{code}
Oozie reports job succedded.
{code:borderStyle=solid}
$ oozie job -oozie http://localhost:11000/oozie -info
0000039-170111125800146-oozie-oozi-W
Job ID : 0000039-170111125800146-oozie-oozi-W
------------------------------------------------------------------------------------------------------------------------------------
Workflow Name : test-wf
App Path : /user/koernerc/apps/simple-hive-init-wf
Status : SUCCEEDED
Run : 0
User : root
Group : -
Created : 2017-01-13 09:56 GMT
Started : 2017-01-13 09:56 GMT
Last Modified : 2017-01-13 09:56 GMT
Ended : 2017-01-13 09:56 GMT
CoordAction ID: -
Actions
------------------------------------------------------------------------------------------------------------------------------------
ID
Status Ext ID Ext Status Err Code
------------------------------------------------------------------------------------------------------------------------------------
0000039-170111125800146-oozie-oozi-W@:start:
OK - OK -
------------------------------------------------------------------------------------------------------------------------------------
0000039-170111125800146-oozie-oozi-W@test-action
OK job_1480609892100_0276 SUCCEEDED -
------------------------------------------------------------------------------------------------------------------------------------
0000039-170111125800146-oozie-oozi-W@end
OK - OK -
------------------------------------------------------------------------------------------------------------------------------------
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)