这是我的build.sbt文件:
name := "words"
version := "1.0"
scalaVersion := "2.10.4"
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % "1.3.0",
"org.apache.spark" %% "spark-sql" % "1.3.0"
)
sbt.version = 0.13.8-RC1
编译程序时,出现以下错误:
[error] D:\projects\bd\words\src\main\scala\test.scala:8:
type SqlContext is not a member of package org.apache.spark.sql
[error] val sqlContext = new org.apache.spark.sql.SqlContext(sc)
[error] ^
[error] one error found
[error] (compile:compileIncremental) Compilation failed
答案 0 :(得分:2)
SQLContext
而非SqlContext
。