Through which developers can quickly and clearly understand the functions provided by ElasticJob.
This chapter is a configuration manual for ElasticJob, which can also be referred to as a dictionary if necessary.
ElasticJob has provided 3 kinds of configuration methods for different situations.
|ZooKeeper server IP list
|The initial value of milliseconds for the retry interval
|The maximum value of milliseconds for the retry interval
|Maximum number of retries
|Session timeout in milliseconds
|Connection timeout in milliseconds
|Permission token to connect to ZooKeeper
Include IP and port, multiple addresses are separated by commas, such as:
|Sharding total count
|CRON expression, control the job trigger time
|time zone of CRON
|Sharding item parameters
|Monitor job execution status
|Enable or disable job failover
|Enable or disable the missed task to re-execute
|The maximum value for time difference between server and registry center in seconds
|Service scheduling interval in minutes for repairing job server inconsistent state
|Job sharding strategy type
|Job thread pool handler type
|Job error handler type
|Enable or disable start the job
|Enable or disable local configuration override registry center configuration
The sequence numbers and parameters of the Sharding items are separated by equal sign, and multiple key-value pairs are separated by commas.
The Sharding sequence number starts from
0 and can’t be greater than or equal to the total number of job fragments.
With this parameter, user can pass parameters for the business method of job scheduling, which is used to implement the job with parameters.
Amount of data acquired each time,
Primary key of the job instance read from the database, etc.
When the execution time and interval of each job are very short, it is recommended not to monitor the running status of the job to improve efficiency. There is no need to monitor because it is a transient state. User can add data accumulation monitoring by self. And there is no guarantee that the data will be selected repeatedly, idempotency should be achieved in the job. If the job execution time and interval time are longer, it is recommended to monitor the job status, and it can guarantee that the data will not be selected repeatedly.
If the time error exceeds the configured seconds, an exception will be thrown when the job starts.
In a distributed system, due to network, clock and other reasons, ZooKeeper may be inconsistent with the actual running job. This inconsistency cannot be completely avoided through positive verification. It is necessary to start another thread to periodically calibrate the consistency between the registry center and the job status, that is, to maintain the final consistency of ElasticJob.
1 means no repair is performed.
For details, seeJob Sharding Strategy。
For details, seeThread Pool Strategy。
For details, seeError Handler Strategy。
For details, seeJob Properties。
It can be used for deployment, forbid jobs to start, and then start them uniformly after the deployment is completed.
If the value is
true, local configuration override registry center configuration every time the job is started.
|The timeout in milliseconds before the last job is executed
|The timeout in milliseconds after the last job is executed
|The type of event tracing storage adapter
|The object of event tracing storage adapter