StreamingQuery
is the contract for a streaming query that is executed continuously and concurrently (i.e. on a separate thread).
Note
|
StreamingQuery is called continuous query or streaming query.
|
Note
|
StreamingQuery is a Scala trait with the only implementation being StreamExecution (and less importanly StreamingQueryWrapper for serializing a non-serializable StreamExecution ).
|
StreamingQuery
can be in two states:
-
active (started)
-
inactive (stopped)
If inactive, StreamingQuery
may have transitioned into the state due to an StreamingQueryException
(that is available under exception
).
StreamingQuery
tracks current state of all the sources, i.e. SourceStatus
, as sourceStatuses
.
StreamingQuery
can be stopped by stop
or an exception.
Method | Description |
---|---|
|
awaitTermination(): Unit
awaitTermination(timeoutMs: Long): Boolean Used when…FIXME |
|
exception: Option[StreamingQueryException]
Used when…FIXME |
|
explain(): Unit
explain(extended: Boolean): Unit Used when…FIXME |
|
id: UUID The unique identifier of the streaming query Used when…FIXME |
|
isActive: Boolean Used when…FIXME |
|
lastProgress: StreamingQueryProgress The last StreamingQueryProgress of the streaming query Used when…FIXME |
|
name: String The name of the query that is unique across all active queries Used when…FIXME |
|
processAllAvailable(): Unit Waits the streaming query until there are no data available in sources or the query has been terminated. Used when…FIXME |
|
recentProgress: Array[StreamingQueryProgress] Collection of the recent StreamingQueryProgress updates. Used when…FIXME |
|
runId: UUID The unique identifier of the current execution of the streaming query Used when…FIXME |
|
sparkSession: SparkSession Used when…FIXME |
|
status: StreamingQueryStatus The Used when…FIXME |
|
stop(): Unit Stops the execution of the streaming query Used exclusively when |