Can you paste the hive-site.xml? Most of times I meet this exception, because 
the JDBC driver for hive metastore are not correct set or wrong driver classes 
are included in the assembly jar.

As default, the assembly jar contains the derby.jar, which is the embedded 
derby JDBC driver.

From: Jacob Chacko - Catalyst Consulting 
[mailto:jacob.cha...@catalystconsulting.be]
Sent: Sunday, October 26, 2014 3:37 PM
To: u...@spark.incubator.apache.org; user@spark.apache.org
Subject: Create table error from Hive in spark-assembly-1.0.2.jar

Hi All

We are trying to create a table in Hive from spark-assembly-1.0.2.jar file.


CREATE TABLE IF NOT EXISTS src (key INT, value STRING)

  JavaSparkContext sc = CC2SparkManager.sharedInstance().getSparkContext();
  JavaHiveContext sqlContext = new JavaHiveContext(sc);
  sqlContext.sql("CREATE TABLE  srcd (key INT, value STRING)");

On Spark 1.1 we get the following error:

FAILED: Execution Error, return code 1 from 
org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException: Unable to 
instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient

On Spark 1.0.2 we get the following error:

 failure: ``UNCACHE'' expected but identifier CREATE found


Could you help understand why we get this error

Thanks
Jacob

Reply via email to