TriggerExecutor¶
TriggerExecutor
is an abstraction of trigger executors.
Contract¶
Executing Batches¶
execute(
batchRunner: () => Boolean): Unit
Executes batches (triggers) using a batch runner (trigger handler).
batchRunner
is assumed to return false
to indicate execution termination
Used when:
MicroBatchExecution
is requested to run an activated streaming query
Implementations¶
MultiBatchExecutor¶
Executes the batch runner until it returns false
Handles AvailableNowTrigger in MicroBatchExecution
Used when:
MicroBatchExecution
is requested for the analyzed logical plan (and extracting unique streaming sources)
SingleBatchExecutor¶
Executes the batch runner exactly once