Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Tez error: org.apache.hive.service.cli.HiveSQLException: java.lang.NoClassDefFoundError: org/apache/tez/runtime/api/Event: org.apache.tez.runtime.api.Event

avatar
New Contributor

Hi All,

I am trying to connect to hive using jdbc connection string and modified the execution engine to tez.

I get below error:

org.apache.hive.service.cli.HiveSQLException: java.lang.NoClassDefFoundError: org/apache/tez/runtime/api/Event:
org.apache.tez.runtime.api.Event

Connection string is:

jdbc:hive2://XXX.XX.XXX.XX:10001/dbname;transportMode=http;httpPath=cliservice?hive.execution.engine=tez;tez.queue.name=q1;

Can you help me how I can solve this error? Also please let me know if I need additional jar files for this to work?

This works fine when execution engine is map reduce. However, I have to make it working with Tez for better performance.

Thanks in advance for your advise.

Regards,
Tushar

1 ACCEPTED SOLUTION

avatar
New Contributor

We managed to resolve this issue by installing Tez client on hive server2 and setting up HADOOP_CLASSPATH accordingly. Hive server needs to be restarted after making all the changes and then we are able to run queries using Tez.

View solution in original post

3 REPLIES 3

avatar
New Contributor

We managed to resolve this issue by installing Tez client on hive server2 and setting up HADOOP_CLASSPATH accordingly. Hive server needs to be restarted after making all the changes and then we are able to run queries using Tez.

avatar
New Contributor

Can you elaborate about setting up the HADOOP_CLASSPATH? What needs to be added to the classpath?

avatar
New Contributor

Hi Anthony,

We have HADOOP_CLASSPATH setup in Ambari. Mainly you need tez client on Hive server and Tez libraries should be setup in HADOOP_CLASSPATH. This is what we have:
========================
export HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}:${MAPREDUCE_LIBS}

if [ -d "/usr/lib/tez" ];
then export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:/usr/lib/tez/*:/usr/lib/tez/lib/*:/etc/tez/conf
fi
========================

Please let me know if this helps you.