Hi everyone,

I'm answering my question, hope it could be useful to someone.

When logs became available it showed that it was a problem of missed jar with 
mysql jdbc driver in /user/oozie/share/lib/hive.
Also it was required to restart oozie to make it work.

To tell the truth, original message in workflow log was confusing.

Thank you,
  Eugene.

-----Original Message-----
From: Kravtsov, Eugene [mailto:[email protected]]
Sent: Wednesday, March 13, 2013 9:18 PM
To: [email protected]
Subject: How to troubleshoot failed Hive action?

Hello everyone,

Right now I'm exploring Oozie and how it integrates with Hive. Today I wrote 
sample hive action which always fail and I can't figure out how to troubleshoot 
it.
When I run my workflow I'm getting error (details at the end of this message).

Couple of things looks strange to me (hope it could be helpful):

Hive run from Oozie fails - it's the main problem.
On the same host, I can execute commands successfully from command line client.
If I comment content of my hive-data-load.hql script, then action finishes 
successfully.
Content of /user/oozie/share/lib should be correct.

Could you please point me where to start troubleshooting.


Thank you,
   Eugene.



Log records (last part, other seems OK):

>>> Invoking Hive command line now >>>
Intercepting System.exit(1)
<<< Invocation of Main class completed <<< Failing Oozie Launcher, Main class 
[org.apache.oozie.action.hadoop.HiveMain], exit code [1] Oozie Launcher failed, 
finishing Hadoop job gracefully Oozie Launcher ends

stderr logs

Logging initialized using configuration in 
jar:file:/opt/datapool/dfs/c0d12/mapred/taskTracker/distcache/6603627636936172446_-715525354_493338427/mycluster.com/user/oozie/share/lib/hive/hive-common-0.9.0-cdh4.1.3.jar!/hive-log4j.properties
Hive history file=/tmp/mapred/hive_job_log_mapred_201303131250_936474339.txt
FAILED: Error in metadata: javax.jdo.JDOFatalInternalException: Error creating 
transactional connection factory
NestedThrowables:
java.lang.reflect.InvocationTargetException
FAILED: Execution Error, return code 1 from 
org.apache.hadoop.hive.ql.exec.DDLTask
Intercepting System.exit(1)
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.HiveMain], 
exit code [1]


Action definition:
    <action name="hive-load">
        <hive xmlns="uri:oozie:hive-action:0.2">
            <job-tracker>${jobTracker}</job-tracker>
           <name-node>${nameNode}</name-node>
            <job-xml>${nameNode}/${workflowPath}/hive-site.xml</job-xml>
            <configuration>
                <property>
                    <name>oozie.hive.defaults</name>
                    <value>${nameNode}/${workflowPath}/hive-site.xml</value>
                </property>
            </configuration>
            <script>${nameNode}/${workflowPath}/hive/hive-data-load.hql</script>
        </hive>
        <ok to="workflow-end"/>
        <error to="kill"/>
    </action>


Content of hive-data-load.hql :
CREATE DATABASE IF NOT EXISTS my_database;

________________________________
This e-mail and any attachment(s) are intended only for the recipient(s) named 
above and others who have been specifically authorized to receive them. They 
may contain confidential information. If you are not the intended recipient, 
please do not read this email or its attachment(s). Furthermore, you are hereby 
notified that any dissemination, distribution or copying of this e-mail and any 
attachment(s) is strictly prohibited. If you have received this e-mail in 
error, please immediately notify the sender by replying to this e-mail and then 
delete this e-mail and any attachment(s) or copies thereof from your system. 
Thank you.

This e-mail and any attachment(s) are intended only for the recipient(s) named 
above and others who have been specifically authorized to receive them. They 
may contain confidential information. If you are not the intended recipient, 
please do not read this email or its attachment(s). Furthermore, you are hereby 
notified that any dissemination, distribution or copying of this e-mail and any 
attachment(s) is strictly prohibited. If you have received this e-mail in 
error, please immediately notify the sender by replying to this e-mail and then 
delete this e-mail and any attachment(s) or copies thereof from your system. 
Thank you.

Reply via email to