Interface for listening to events related to
The methods are not thread-safe as they may be called from different threads. The events received are identical with Scala API. Refer to its documentation.
This API is evolving.
>>> class MyListener(StreamingQueryListener): ... def onQueryStarted(self, event: QueryStartedEvent) -> None: ... # Do something with event. ... pass ... ... def onQueryProgress(self, event: QueryProgressEvent) -> None: ... # Do something with event. ... pass ... ... def onQueryTerminated(self, event: QueryTerminatedEvent) -> None: ... # Do something with event. ... pass ... >>> spark.streams.addListener(MyListener())
Called when there is some status update (ingestion rate updated, etc.)
Called when a query is started.
Called when a query is stopped, with or without error.