Trigger.once mode recommendation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2021 02:14 PM
When is it recommended to use Trigger.once mode compared to fixed processing intervals with micro batches?
- Labels:
-
Trigger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2021 02:19 PM
With trigger.once mode, only one micro batch will be executed to process the latest data and application stops on its own once the processing is complete. This is helpful in cases where you need to periodically process everything that is available since the last processed data.
Fore more information on this, refer to - https://spark.apache.org/docs/latest/structured-streaming-programming-guide.html#triggers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2021 02:26 PM
Also note, the configurations like maxFilesPerTrigger, maxBytesPerTrigger are ignored with Trigger.Once.
Streaming queries with significantly less throughput can switch to Trigger.Once to avoid the continuous execution of the job checking the availability of the data.