Dear all,

I pull  zeppelin from github, and  build. I run the following Spark
streaming code in a paragraph, but got the NoClassDefFoundError. Could
anybody help? thanks!

import org.apache.spark._
import org.apache.spark.streaming._
import org.apache.spark.streaming.StreamingContext._


case class Loc(lat: Double, lon: Double)
case class message(info: String, loc: Loc)

val ssc = new StreamingContext(sc, Seconds(5))
val input = ssc.socketTextStream("localhost", 12397)


input.foreachRDD(rdd => {
    val df = rdd.map(s => message(
                          s.info,
                          Loc(s.lat, s.lon)
                      )
                    )

    var items = df.collect
    z.angularBind("locations", items)
})

ssc.start()


import org.apache.spark._
import org.apache.spark.streaming._
import org.apache.spark.streaming.StreamingContext._
defined class Loc
defined class message
ssc: org.apache.spark.streaming.StreamingContext =
org.apache.spark.streaming.StreamingContext@657c0ac3
java.lang.NoClassDefFoundError: Could not initialize class
org.apache.spark.rdd.RDDOperationScope$
at
org.apache.spark.streaming.StreamingContext.withNamedScope(StreamingContext.scala:273)
at
org.apache.spark.streaming.StreamingContext.socketTextStream(StreamingContext.scala:301)
... 100 elided

Reply via email to