Skip to content

Latest commit

 

History

History
17 lines (9 loc) · 845 Bytes

spark-sql-StreamingQuery.adoc

File metadata and controls

17 lines (9 loc) · 845 Bytes

StreamingQuery

StreamingQuery provides an interface for interacting with a query that executes continually in background.

Note
StreamingQuery is called continuous query or stream query.

A StreamingQuery has a name. It belongs to a single SQLContext.

Note
StreamingQuery is a Scala trait with the only implementation being StreamExecution

It can be in two states: active (started) or inactive (stopped). If inactive, it may have transitioned into the state due to an StreamingQueryException (that is available under exception).

It tracks current state of all the sources, i.e. SourceStatus, as sourceStatuses.

There could only be a single Sink for a StreamingQuery with many `Source’s.

StreamingQuery can be stopped by stop or an exception.