StreamingQueryManager

org.apache.spark.sql.streaming.StreamingQueryManager

Manages all the StreamingQuery instances active in a single SparkSession. Use SparkSession.streams to access this.

Mirrors the public surface of org.apache.spark.sql.streaming.StreamingQueryManager over the Spark Connect protocol. Every method issues a StreamingQueryManagerCommand to the server and reads the typed result back from the response stream.

Value parameters

spark

the session whose streaming queries are managed.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def active: Array[StreamingQuery]

Returns an array of the currently active queries associated with this session.

Returns an array of the currently active queries associated with this session.

Attributes

def addListener(listener: StreamingQueryListener): Unit

Registers a StreamingQueryListener to receive streaming-query lifecycle events. The first registration opens the server's listener-event stream; events are dispatched on the client.

Registers a StreamingQueryListener to receive streaming-query lifecycle events. The first registration opens the server's listener-event stream; events are dispatched on the client.

Attributes

def awaitAnyTermination(): Boolean

Waits until any of the active queries on the associated session terminates, blocking the current thread.

Waits until any of the active queries on the associated session terminates, blocking the current thread.

Attributes

Returns

whether any query has terminated.

def awaitAnyTermination(timeoutMs: Long): Boolean

Waits until any of the active queries on the associated session terminates, blocking the current thread, or until timeoutMs milliseconds have elapsed.

Waits until any of the active queries on the associated session terminates, blocking the current thread, or until timeoutMs milliseconds have elapsed.

Attributes

Returns

whether any query has terminated within the timeout.

def get(id: String): StreamingQuery

Returns the active query identified by id, or null if no active query with that id exists.

Returns the active query identified by id, or null if no active query with that id exists.

Attributes

Returns the listeners currently registered with this session.

Returns the listeners currently registered with this session.

Attributes

def removeListener(listener: StreamingQueryListener): Unit

Deregisters a previously added StreamingQueryListener.

Deregisters a previously added StreamingQueryListener.

Attributes

def resetTerminated(): Unit

Forgets about the past terminated queries so that awaitAnyTermination can be used again to wait for new terminations.

Forgets about the past terminated queries so that awaitAnyTermination can be used again to wait for new terminations.

Attributes