pyspark.streaming.StreamingContext.stop

StreamingContext.stop(stopSparkContext=True, stopGraceFully=False)[source]

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

Parameters
stopSparkContextbool, optional

Stop the associated SparkContext or not

stopGracefullybool, optional

Stop gracefully by waiting for the processing of all received data to be completed