lundi 1 juin 2015

Not able to connect to hive on AWS EMR using java

I have setup AWS EMR cluster with hive. I want to connect to hive thrift server from my local machine using java. I tried following code-

Class.forName("com.amazon.hive.jdbc3.HS2Driver");
con = DriverManager.getConnection("jdbc:hive2://ec2XXXX.compute-1.amazonaws.com:10000/default","hadoop", "");

http://ift.tt/1JlRnXu mentioned in the developer guide, added jars related with hive jdbc driver to class path. But I am getting exception when trying to get connection. I was able to connect to hive server on simple hadoop cluster using above code (with different jdbc driver). Can someone please suggest if I am missing something? Is it possible to connect to hive server on AWS EMR from local machine using hive jdbc?




Aucun commentaire:

Enregistrer un commentaire