| title | Scheduler Configuration |
|---|---|
| summary | Learn how to configure Scheduler. |
Currently, Gravity supports only one Scheduler plugin:
batch-table-scheduler: Guarantees that update operations on the data in the same row defined by the primary key are performed in order.
#
# `batch-table-scheduler` configuration
# Optional
#
[scheduler]
type = "batch-table-scheduler"
[scheduler.config]
# "100" by default
nr-worker = 100
# "1" by default
batch-size = 1
# "1024" by default
queue-size = 1024
# "10240" by default
sliding-window-size = 10240In the above configuration:
-
batch-table-scheduleruses the worker pool method to call the interface defined by Output.nr-workeris the number of workers.
-
batch-table-scheduleruses Output in the unit of batch and guarantees that one batch has the samecore.Msg.Table.batch-sizeis the size of a batch.
-
batch-table-scheduleruses the sliding window to guarantee the positions in Input are saved in order.sliding-window-sizeis the size of a sliding window.