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.
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.
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