Support Questions

Find answers, ask questions, and share your expertise

Hive query failed over JDBC.

avatar
Contributor

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
Contributor

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 Contributor

When you did hive.execution.engine=tez

After that, you restarted your cluster?

avatar

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

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