SqlContext不是包org.apache.spark.sql的成员

时间:2015-04-21 06:58:28

标签: scala apache-spark sbt apache-spark-sql

这是我的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

1 个答案:

答案 0 :(得分:2)

SQLContext而非SqlContext