I am having some trouble with compiling Spark standalone application that
uses new Spark SQL feature.
I have used the exact same code from "RDDRelation.scala" that is included in
Spark's examples.

I set my build.sbt file like as follows:

name := "spark-sql"

version := "1.0"

scalaVersion := "2.10.4"

libraryDependencies += "org.apache.spark" %% "spark-core" % "1.0.0"

resolvers += "Akka Repository" at "http://repo.akka.io/releases/";

When I try to compile, I get the following error:

[error]
/home/shlee0605/shlee_test/spark-sample-project/src/main/scala/spark/example/Main.scala:5:
object sql is not a member of package org.apache.spark
[error] import org.apache.spark.sql.SQLContext
[error]                         ^
[error]
/home/shlee0605/shlee_test/spark-sample-project/src/main/scala/spark/example/Main.scala:20:
not found: type SQLContext
[error]     val sqlContext = new SQLContext(sc)
[error]                          ^
...

By the way, when I ran the same code line by line from the spark-shell, it
worked well.
How can I fix this? 

Thanks,
Seunghyun Lee



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/Spark-SQL-standalone-application-compile-error-tp7298.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

Reply via email to