Using Spark 1.5 Streaming with an Actor receiver.
val conf = new SparkConf()
.setMaster("local[4]")
.setAppName("ModelTest")
val ssc = new StreamingContext(conf, Seconds(2))
val models = ssc.actorStream[Model](Props(...), "ModelReceiver")
models.foreachRDD { rdd => ... }
ssc.start()
ssc.awaitTermination()
// NEVER GETS HERE!
When the generated Actor is shutdown the code will not progress beyond ssc.awaitTermination()
If I kill SBT with Ctrl+C
a println
after the ssc.awaitTermination()
line will complete.
How should Spark be terminated?