Stopping StreamingContext

Stopping the StreamingContext stops all processing and you will have to recreate a new StreamingContext and invoke start() on it to restart the application. There are two APIs useful to stop a stream processing application.

Stop the execution of the streams immediately (do not wait for all received data to be processed):

def stop(stopSparkContext: Boolean)
scala> ssc.stop(false)

Stop the execution of the streams, with the option of ensuring that all received data has been processed:

def stop(stopSparkContext: Boolean, stopGracefully: Boolean)
scala> ssc.stop(true, true)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.75.59