17

I installed spark. pre-compiled and standalone. But both are unable to run val conf = new SparkConf(). The error is error: not found: type SparkConf:

scala> val conf = new SparkConf()
<console>:10: error: not found: type SparkConf

The pre-compiled is spark 0.9.1 and Scala 2.10.3 The standalone is Spark 1.0.1 and Scala 2.10.4 For the standalone, i compiled it with scala 2.10.4 Your help will be much appreciated

om-nom-nom
  • 62,329
  • 13
  • 183
  • 228
del
  • 199
  • 1
  • 1
  • 7
  • 1
    Have you imported it to the scope: `import org.apache.spark.SparkConf`? If yes, do you have Spark on classpath? – om-nom-nom Jul 29 '14 at 10:42

1 Answers1

20

As we pointed out in comments, your code lacks appropriate import statement:

import org.apache.spark.SparkConf
om-nom-nom
  • 62,329
  • 13
  • 183
  • 228