After adding all the jar files I tried to wrote a sample program to connect to Hive using Java. When I debug the code, as soon as it hit the below line.
Connection con = DriverManager.getConnection("jdbc:hive://lvsaishdc3in0001.lvs.host.com:10000/ default","", "");
I always get this exception. Not sure why is it happening. Can anyone help me how to fix this problem?
java.sql.SQLException: Could not establish connection to lvsaishdc3in0001.lvs.host.com:10000/default: java.net.ConnectException: Connection timed out: connect
I started my Hive sever by logging into Putty and passing the hostname.
$ bash bash-3.00$ cd /usr/local/bin bash-3.00$ hive --service hiveserver Starting Hive Thrift Server 12/07/03 08:07:11 INFO service.HiveServer: Starting hive server on port 10000