IncrementalExecution
is a QueryExecution
of a streaming Dataset that StreamExecution creates when incrementally executing the logical query plan (every trigger).
Tip
|
Details on QueryExecution contract can be found in the Mastering Apache Spark 2 gitbook.
|
IncrementalExecution
registers state physical preparation rule with the parent QueryExecution
's preparations
that prepares the streaming physical plan (using batch-specific execution properties).
IncrementalExecution
is created when:
-
StreamExecution
plans a streaming query -
ExplainCommand
is executed (for explain operator)
Name | Description | ||
---|---|---|---|
|
|||
State preparation rule (i.e.
Used when |
|||
Java’s
|
nextStatefulOperationStateInfo(): StatefulOperatorStateInfo
nextStatefulOperationStateInfo
creates a StatefulOperatorStateInfo
with checkpointLocation, runId, the next statefulOperatorId and currentBatchId.
Note
|
All the properties of StatefulOperatorStateInfo are specified when IncrementalExecution is created.
|
Note
|
nextStatefulOperationStateInfo is used exclusively when IncrementalExecution is requested to transform a streaming physical plan using state preparation rule.
|
IncrementalExecution
takes the following when created:
-
Logical query plan (i.e.
LogicalPlan
with the logical plans of the data sources that have new data and new column attributes) -
OutputMode (as specified using outputMode method of
DataStreamWriter
) -
state
checkpoint directory (as specified using checkpointLocation option or spark.sql.streaming.checkpointLocation Spark property withqueryName
option)
IncrementalExecution
initializes the internal registries and counters.