使用Spark测试基础时Spark单元测试编译错误

时间:2016-06-13 20:29:36

标签: scala unit-testing apache-spark

我收到以下错误

Error:scalac: bad symbolic reference. A signature in DataFrameSuiteBaseLike.class refers to term hive
in package org.apache.spark.sql which is not available.
It may be completely missing from the current classpath, or the version on
the classpath might be incompatible with the version used when compiling  
DataFrameSuiteBaseLike.class

1 个答案:

答案 0 :(得分:0)

您应该将Spark Hive库添加到依赖项中。 例如在SBT中:

libraryDependencies += "org.apache.spark" % "spark-hive_2.10" % "1.6.1"

项目中提到了这一点 https://github.com/holdenk/spark-testing-base/issues/93