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 while we were looking for errors in Hive log4j logs and the Hadoop log4j logs. I found this strange.
2. The error log showed a Java "no such method" exception in the Thrift gateway classes. A bit of Googling lead us to people with similar issues (http://getsatisfaction.com/cloudera/topics/hive_thrift_connector_fails_with_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.
From: Kirk True
Sent: Monday, November 01, 2010 8:58 AM
Cc: Regunath Balasubramanian
Subject: Re: Java client hangs when executing Hive query using JDBC interface
If you run `pkill -3 java` on the client and server machines, do you see anything interesting?
On 10/31/10 5:06 AM, Regunath Balasubramanian wrote:
We use the following Hadoop stack distribution:
HDFS - Cloudera 0.20.1+19.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 creating the statement using it.
The same code works on another similar environment. We are able to telnet to the Thrift port i.e. 10000 from the machine where the client is running.
Any help or pointers?