elasticjob-autodeploy elasticjob automated deployment project

Basic introduction to elasticjob-autodeploy

automatic deploy elasticjob’s job from definition in database , include deploy job implemented by spring bean, current only support simpleJob

According to the definition of the database, the elasticjob job is automatically deployed, and the job of the spring bean mode is supported automatically, without the need to develop and configure the JobConfig class for each spring bean.
Support three kinds of jobs: simple, dataflow and shell.

Mainly applicable to the following scenarios

  • Relying on jobParameter to realize the execution of different tasks, and needs to be changed frequently, such as report job
  • Need to categorize and control the job operating environment, such as deploying jobs with different application types to different machines, and separately deploying jobs connected to different data sources, etc.
  • Graceful offline job process
  • Need to record job change history
  • There are a large number of spring bean jobs

The code is modified and extended based on elasticjob-lite 2.1.4/2.1.5.

In order to support automatic deployment, an attribute is extended for simple job: job group, job group value defaults to default, and the original elastic job deployed without this software will automatically belong to the default group.

At the same time, in order to better track the job status, a status node is added under the job root path to record the status. The status definition is the same as that of the elasticjob native. The details are as follows:

public final static String Shutdown="SHUTDOWN";
public final static String Disabled="DISABLED";
public final static String Removed="REMOVED";
public final static String Enabled="ENABLED";

The difference is that the native elasticjob state is defined on the server/worker or instances.

Each instance process that runs a job is called a worker, and only runs on the worker

1. The job belongs to the worker support group. A worker can support multiple groups at the same time. The configuration attribute is autodeploy.elasticjob.supportGroups, which is only default by default.
2. When autodeploy.elasticjob.syncFromDB=true, run the regular synchronization job from the database to zookeeper. It is recommended that no more than 3 processes have autodeploy.elasticjob.syncFromDB=true in the same group of applications/namespace.

For details, please refer to the readme of the project.

GITHUB connection https://github.com/robert-guangzhou/elasticjob-autodeploy/

Guess you like

Origin blog.csdn.net/weixin_40455124/article/details/113749590