I want to create/access the hive tables from spark.

I have placed the hive-site.xml inside the spark/conf directory. Even
though it creates a local metastore in the directory where I run the spark
shell and exists with an error.

I am getting this error when I try to create a new hive table. Even on
querying a existing table error appears.

sqlContext.sql("CREATE TABLE IF NOT EXISTS src (key INT, value STRING)")

Please suggest what wrong I am doing and a way to resolve this.

15/02/12 10:35:58 ERROR RetryingHMSHandler:
MetaException(message:file:/user/hive/warehouse/src is not a directory
or unable to create one)
    at 
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1239)
    at 
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1294)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)

Reply via email to