Can someone explain how the Thriftserver finds the Hive metastore?
I am running with all non-default values and need to know how to connect to Thrift so it finds Hive with the right metastore.
I am running Derby in server mode on a non-default port. And my metastore name is non-default. And I want to run my Thrift server on a non-default port.
My hive-site looks like this:
<description>JDBC connect string for a JDBC metastore</description>
<description>Driver class name for a JDBC metastore</description>
I start derby up as follows :
nohup $DERBY_HOME/bin/startNetworkServer -h 0.0.0.0 -p 3333 &
I am able to connect from the Hive CLI just fine and able to create, drop, select from tables in the right metastore.
Now I start my Thrift server as follows:
nohup hive --service hiveserver &
Thrift server starts up fine and attaches to port 11000
Now I try to run the Hive server test:
ant test -Dtestcase=TestJdbcDriver -Dstandalone=true
...and of course it says Tests Failed, with no further specific detail.
The Test java program (http://wiki.apache.org/hadoop/Hive/HiveClient) tries to connect as:
DriverManager.getConnection("jdbc:hive://localhost:10000/default", "", "")
My question is besides changing it to
DriverManager.getConnection("jdbc:hive://myhost:11000/default", "", "")
what else do I need to do?
What does the "default" in the connect string signify? Should that be my metastore name? There is also a DATABASE in Hive called "default", so I am not so sure that I should change this.
Bottom line how is the Thrift server supposed to find the metatore, and how should I connect to the Thrift server from a jdbc client.