spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhan Zhang <>
Subject Re: Unable to create hive table using HiveContext
Date Wed, 23 Dec 2015 20:43:37 GMT
You are using embedded mode, which will create the db locally (in your case, maybe the db has
been created, but you do not have right permission?).

To connect to remote metastore, hive-site.xml has to be correctly configured.


Zhan Zhang

On Dec 23, 2015, at 7:24 AM, Soni spark <<>>

Hi friends,

I am trying to create hive table through spark with Java code in Eclipse using below code.

HiveContext sqlContext = new org.apache.spark.sql.hive.HiveContext(<>());
   sqlContext.sql("CREATE TABLE IF NOT EXISTS src (key INT, value STRING)");

but i am getting error

RROR XBM0J: Directory /home/workspace4/Test/metastore_db already exists.

I am not sure why metastore creating in workspace. Please help me.


View raw message