Do you put hive-site.xml on the classpath ? On Tue, Dec 15, 2015 at 11:14 AM, Gokula Krishnan D <email2...@gmail.com> wrote:
> Hello All - > > > I tried to execute a Spark-Scala Program in order to create a table in > HIVE and faced couple of error so I just tried to execute the "show tables" > and "show databases" > > And I have already created a database named "test_db".But I have > encountered the error "Database does not exist" > > *Note: I do see couple of posts related to this error but nothing was > helpful for me.* > > ============================================================ > ===================================== > name := "ExploreSBT_V1" > > version := "1.0" > > scalaVersion := "2.11.5" > > libraryDependencies > ++=Seq("org.apache.spark"%%"spark-core"%"1.3.0","org.apache.spark"%%"spark-sql"%"1.3.0") > libraryDependencies += "org.apache.spark"%%"spark-hive"%"1.3.0" > > ================================================================================================= > [image: Inline image 1] > > Error: Encountered the following exceptions > :org.apache.spark.sql.execution.QueryExecutionException: FAILED: Execution > Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Database > does not exist: test_db > 15/12/14 18:49:57 ERROR HiveContext: > ====================== > HIVE FAILURE OUTPUT > ====================== > > > > > OK > FAILED: Execution Error, return code 1 from > org.apache.hadoop.hive.ql.exec.DDLTask. Database does not exist: test_db > > ====================== > END HIVE FAILURE OUTPUT > ====================== > > > Process finished with exit code 0 > > Thanks & Regards, > Gokula Krishnan* (Gokul)* > -- Best Regards Jeff Zhang