Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Hive query failed over JDBC.

avatar
New Member

I am working on hive JDBC client.I am able to run normal queries like select * from table, show database etc. But when I am trying to run queries like insert into ,select count(*) it simply fails with following exception.

java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:282) at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:378) at TablePerformance.countItems(TablePerformance.java:51) at TablePerformance.main(TablePerformance.java:63)

I have checked hive server logs and it also shows same error message as above. Is there any way I can set hive.execution.engine over jdbc connectivity ?

Any kind of help would be greatly appreciated.

1 ACCEPTED SOLUTION

avatar
New Member

I solved it by passing the below connection objects with my user name.

con = DriverManager.getConnection("jdbc:hive2://host:10000/default?hive.execution.engine=tez", "<user-name>","");

Thanks you all of you for your help and advice.

View solution in original post

12 REPLIES 12

avatar
New Member

When you did hive.execution.engine=tez

After that, you restarted your cluster?

avatar
New Member

HI Guys I had the same problem but in my case the tez.queue.name was missing in the JDBC URL and that prevented the writes.

avatar
Frequent Visitor

Hi Team,

I am facing the same issue and not able to fix.

java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask