Have a look at StreamingListener
<http://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.streaming.scheduler.StreamingListener>,
Here's an example
<http://stackoverflow.com/questions/20950268/how-to-stop-spark-streaming-context-when-the-network-connection-tcp-ip-is-clos>
on how to use it.

Thanks
Best Regards

On Mon, Jan 5, 2015 at 3:15 PM, Hafiz Mujadid <[email protected]>
wrote:

> Hi experts!
>
> Please is there anyway to stop spark streaming context when 5 batches are
> completed ?
>
>
> Thanks
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/stopping-streaming-context-tp20970.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to