我是处理非常基本的火花流scala代码。代码如下
import org.apache.spark.streaming._
import org.apache.spark.streaming.StreamingContext
import org.apache.spark.streaming.StreamingContext._
import org.apache.spark.storage.StorageLevel
import org.apache.spark.SparkConf
object TestStreamProcessor {
def main(args: Array [String]) {
val batchInterval = 5
val sparkConfig = new SparkConf().setAppName("TestKinesisConsumer")
val ssc = new StreamingContext(sparkConfig, batchInterval)
ssc.start()
ssc.awaitTerminationOrTimeout(batchIntervalSeconds * 5 * 1000)
}
}
但是在使用maven构建代码时出现以下错误。
error: org.apache.spark.streaming.StreamingContext does not have a constructor
[INFO] val ssc = new StreamingContext(sparkConfig, batchInterval)
以前有人面对过吗?