pyspark.sql.streaming.StreamingQueryManager.removeListener#
- StreamingQueryManager.removeListener(listener)[source]#
Deregister a
StreamingQueryListener
.New in version 3.4.0.
- Parameters
- listener
StreamingQueryListener
A
StreamingQueryListener
to receive up-calls for life cycle events ofStreamingQuery
.
- listener
Examples
>>> from pyspark.sql.streaming import StreamingQueryListener >>> class TestListener(StreamingQueryListener): ... def onQueryStarted(self, event): ... pass ... ... def onQueryProgress(self, event): ... pass ... ... def onQueryIdle(self, event): ... pass ... ... def onQueryTerminated(self, event): ... pass ... >>> test_listener = TestListener()
Register streaming query listener
>>> spark.streams.addListener(test_listener)
Deregister streaming query listener
>>> spark.streams.removeListener(test_listener)