We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31e4260 commit c40c0efCopy full SHA for c40c0ef
python/pyspark/streaming/context.py
@@ -121,3 +121,15 @@ def textFileStream(self, directory):
121
file system. FIle names starting with . are ignored.
122
"""
123
return DStream(self._jssc.textFileStream(directory), self, UTF8Deserializer())
124
+
125
+ def stop(self, stopSparkContext=True):
126
+ """
127
+ Stop the execution of the streams immediately (does not wait for all received data
128
+ to be processed).
129
130
131
+ try:
132
+ self._jssc.stop(stopSparkContext)
133
+ finally:
134
+ # Stop Callback server
135
+ SparkContext._gateway.shutdown()
0 commit comments