Skip to content

TriggerExecutor

TriggerExecutor is an abstraction of trigger executors.

Contract

Executing Batches

execute(
  batchRunner: () => Boolean): Unit

Executes batches using a batch runner (trigger handler). batchRunner is assumed to return false to indicate to terminate execution

Used when:

Implementations

MultiBatchExecutor

Executes the batch runner until it returns false

Handles AvailableNowTrigger in MicroBatchExecution

Used when:

ProcessingTimeExecutor

Executes the batch runner at regular intervals (as defined using ProcessingTime and DataStreamWriter.trigger method)

Processing terminates when batchRunner returns false.

SingleBatchExecutor

Executes the batch runner exactly once