scala - Missing HiveContext Dependency -
i trying :
val hivecontext = new org.apache.spark.sql.hive.hivecontext(sc)
this build.sbt file :
name := "spark-sql" version := "1.0" scalaversion := "2.11.8" librarydependencies += "org.apache.spark" % "spark-core_2.11" % "2.0.0-preview" librarydependencies += "org.apache.spark" % "spark-sql_2.11" % "2.0.0-preview" librarydependencies += "org.apache.spark" % "spark-hive-thriftserver_2.10" % "1.6.2"
the error getting :
error:scalac: missing or invalid dependency detected while loading class file 'hivecontext.class'.
to work org.apache.spark.sql.hive.hivecontext
, need have following configuration combination in build.sbt or pom.xml , switch scala 2.10.6 because of compatibility issue of spark-hive_2.10:
<dependency> <groupid>org.apache.spark</groupid> <artifactid>spark-core_2.10</artifactid> <version>2.0.0</version> </dependency> <dependency> <groupid>org.apache.spark</groupid> <artifactid>spark-hive_2.10</artifactid> <version>2.0.0</version> </dependency>
Comments
Post a Comment