@Evolving
public class Trigger
extends Object
Constructor and Description |
---|
Trigger() |
Modifier and Type | Method and Description |
---|---|
static Trigger |
AvailableNow()
A trigger that processes all available data at the start of the query in one or multiple
batches, then terminates the query.
|
static Trigger |
Continuous(scala.concurrent.duration.Duration interval)
(Scala-friendly)
A trigger that continuously processes streaming data, asynchronously checkpointing at
the specified interval.
|
static Trigger |
Continuous(long intervalMs)
A trigger that continuously processes streaming data, asynchronously checkpointing at
the specified interval.
|
static Trigger |
Continuous(long interval,
java.util.concurrent.TimeUnit timeUnit)
A trigger that continuously processes streaming data, asynchronously checkpointing at
the specified interval.
|
static Trigger |
Continuous(String interval)
A trigger that continuously processes streaming data, asynchronously checkpointing at
the specified interval.
|
static Trigger |
Once()
Deprecated.
This is deprecated as of Spark 3.4.0. Use
AvailableNow() to leverage
better guarantee of processing, fine-grained scale of batches, and better gradual
processing of watermark advancement including no-data batch.
See the NOTES in AvailableNow() for details. |
static Trigger |
ProcessingTime(scala.concurrent.duration.Duration interval)
(Scala-friendly)
A trigger policy that runs a query periodically based on an interval in processing time.
|
static Trigger |
ProcessingTime(long intervalMs)
A trigger policy that runs a query periodically based on an interval in processing time.
|
static Trigger |
ProcessingTime(long interval,
java.util.concurrent.TimeUnit timeUnit)
(Java-friendly)
A trigger policy that runs a query periodically based on an interval in processing time.
|
static Trigger |
ProcessingTime(String interval)
A trigger policy that runs a query periodically based on an interval in processing time.
|
public static Trigger ProcessingTime(long intervalMs)
public static Trigger ProcessingTime(long interval, java.util.concurrent.TimeUnit timeUnit)
public static Trigger ProcessingTime(scala.concurrent.duration.Duration interval)
public static Trigger ProcessingTime(String interval)
@Deprecated public static Trigger Once()
AvailableNow()
to leverage
better guarantee of processing, fine-grained scale of batches, and better gradual
processing of watermark advancement including no-data batch.
See the NOTES in AvailableNow()
for details.public static Trigger AvailableNow()
ProcessingTime(long)
trigger.
NOTES:
- This trigger provides a strong guarantee of processing: regardless of how many batches were
left over in previous run, it ensures all available data at the time of execution gets
processed before termination. All uncommitted batches will be processed first.
- Watermark gets advanced per each batch, and no-data batch gets executed before termination
if the last batch advances the watermark. This helps to maintain smaller and predictable
state size and smaller latency on the output of stateful operators.public static Trigger Continuous(long intervalMs)
public static Trigger Continuous(long interval, java.util.concurrent.TimeUnit timeUnit)
public static Trigger Continuous(scala.concurrent.duration.Duration interval)
public static Trigger Continuous(String interval)