Hello,

  I'm trying to connect to hive using the JDBC driver in embedded mode. I can 
load the driver successfully & connect to it via:

hiveConnection = DriverManager.getConnection( "jdbc:hive://", "", "" )

But when I query a table that I know exists - I can query it via a hive command 
line running on the same machine - I get a "table does not exist" error. When I 
go ahead and create the table in my java program, and then query it, I get: 

ERROR: hive.log java.io.FileNotFoundException: File 
file:/user/hive/warehouse/[table_name]
        at 
org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:361)
...

So it looks like it's trying to use the local filesystem for the warehouse dir. 
I tried setting the warehouse dir variable in the hive-default.xml file to:

hdfs://user/hive/warehouse/

But I get the same errors.

Any idea what's happening? 

Am I confused on what an embedded hive server can do - I was under the 
impression that the cli used an embedded hive server, and could connect to my 
hdfs store, but... it would seem my java program can't this.

I guess my next stop is going through the hive cli source code ?

Take care,
  -stu


      

Reply via email to