Hello Hive Community, I am trying to run the JDBC (from cwiki.apache.org), using HiveServer2. Everything in the Java code (attached above) runs well except for the last query: sql = "select * from " + tableName;
Attached is the complete log file of several runs. I have noticed the following error: ERROR mr.ExecDriver (MapRedTask.java:execute(304)) - Exception: Cannot run program "/usr/local/bin/hadoop-2.2.0\bin\hadoop.cmd" (in directory "C:\cygwin64\usr\local\bin\hive-0.12.0-bin\bin"): CreateProcess error=2, The system cannot find the file specified I have tried to navigate to the following path and manually add the path along with the hadoop.cmd script but this did not work. So I had { C:\cygwin64\usr\local\bin\hive-0.12.0-bin\bin\usr\local\bin\hadoop-2.2.0\bin\hadoop.cmd) as a path but still it failed to find it. I have tried to debug the Apache Java code to try and figure out the problem. I have noticed that TStatusCode.fingByValue returns ERROR_STATUS which was only the case in the last query mentioned earlier. This flag is eventually checked and results in throwing the exception below: Exception in thread "main" java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:165) at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:153) at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:198) at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:300) at murex.pop.hadoop.connector.HiveJdbcClient.main(HiveJdbcClient.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) My questions are: 1- Why isn't my Hiveserver2 finding the hadoop.cmd script? In general everything during the installation was set to default and no extra configuration is done 2- Why is the exception thrown specifically when trying this query? Do you have any ideas about what might the glitch be? Any help would be much appreciated Abdallah Chebaro ******************************* This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.
HiveJdbcClient .java
Description: HiveJdbcClient .java
hive.log
Description: hive.log