I am working on twitter connector. I want to stop streaming after one minute. Can anyone give idea ho to do this? I tried ssc.awaitTermination(60000). but it didn't work.
Note that awaitTermination with a timeout is deprecated:
https://github.com/apache/spark/blob/master/streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala#L633
However with either awaitTermination or awaitTerminationOrTimeout you should follow it with ssc.stop to stop the context once the timeout is reached.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With