SQL can't not create Hive database

2015-04-09 Thread Hao Ren
Hi,

I am working on the local mode.

The following code 

hiveContext.setConf(hive.metastore.warehouse.dir,
/home/spark/hive/warehouse)
hiveContext.sql(create database if not exists db1)

 throws

15/04/09 13:53:16 ERROR RetryingHMSHandler: MetaException(message:Unable to
create database path file:/user/hive/warehouse/db1.db, failed to create
database db1)

It seems that it uses hdfs path, not the local one specified in hiveContext.

Any idea ? Thank you.

Hao




--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/SQL-can-t-not-create-Hive-database-tp22435.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org



Re: SQL can't not create Hive database

2015-04-09 Thread Denny Lee
Can you create the database directly within Hive?  If you're getting the
same error within Hive, it sounds like a permissions issue as per Bojan.
More info can be found at:
http://stackoverflow.com/questions/15898211/unable-to-create-database-path-file-user-hive-warehouse-error


On Thu, Apr 9, 2015 at 7:31 AM Bojan Kostic blood9ra...@gmail.com wrote:

 I think it uses local dir, hdfs dir path starts with hdfs://

 Check permissions on folders, and also check logs. There should be more
 info
 about exception.

 Best
 Bojan



 --
 View this message in context: http://apache-spark-user-list.
 1001560.n3.nabble.com/SQL-can-t-not-create-Hive-database-
 tp22435p22439.html
 Sent from the Apache Spark User List mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
 For additional commands, e-mail: user-h...@spark.apache.org




Re: SQL can't not create Hive database

2015-04-09 Thread Bojan Kostic
I think it uses local dir, hdfs dir path starts with hdfs://

Check permissions on folders, and also check logs. There should be more info
about exception.

Best
Bojan



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/SQL-can-t-not-create-Hive-database-tp22435p22439.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org