We use the following Hadoop stack distribution:
HDFS - Cloudera 0.20.1+169.89 Hive - Cloudera 0.5.1 OS - RHEL 4
Hive server(Thrift server) has been started using:
nohup hive --service hiveserver &
We are able to issue Hive queries using the CLI client. However our code hangs when we use the Hive JDBC interface. The code hangs = at statement.executeQuery("show tables;") after opening a connection and cr= eating the statement using it.
The same code works on another similar environment. We are able to telnet t= o the Thrift port i.e. 10000 from the machine where the client is running. Any help or pointers?
Thanks Regu
________________________________
http://www.mindtree.com/email/disclaimer.html
Regunath Balasubramanian's gravatar image asked Oct 31 2010 at 12:06 in Hive-User by Regunath Balasubramanian

1 Answers

Kirk,
Thanks for the response. The issue is resolved now. The problem and resolution was as follows:
1. Hive logs errors to System.err. In our case it went to nohup.out w= hile we were looking for errors in Hive log4j logs and the Hadoop log4j log= s. I found this strange.
2. The error log showed a Java "no such method" exception in the Thri= ft gateway classes. A bit of Googling lead us to people with similar issues= (http://getsatisfaction.com/cloudera/topics/hive_thrift_connector_fails_wi= th_java_lang_nosuchmethoderror). The fix was to replace the libfb303.jar in= the Hadoop cluster (name and data nodes) with the one that comes with the = Hive distribution. This again was surprising as we deployed Hadoop and Hive= from Cloudera CDH2. Btw the Hive distribution was 0.4.x(released Feb '10) = and not 0.5.1 as mentioned in my mail.
Cheers! Regu
From: Kirk True Sent: Monday, November 01, 2010 8:58 AM To: Cc: Regunath Balasubramanian Subject: Re: Java client hangs when executing Hive query using JDBC interfa= ce
If you run `pkill -3 java` on the client and server machines, do you see an= ything interesting?
Kirk
Regunath Balasubramanian's gravatar image answered Nov 2 2010 at 05:29 by Regunath Balasubramanian