When developing ElasticJob-Cloud jobs, developers can leave the Mesos environment to run and debug jobs locally. The local operating mode can be used to fully debug business functions and unit tests, and then deploy to the Mesos cluster after completion.
There is no need to install the Mesos environment to run jobs locally.
// Create job configuration
JobConfiguration jobConfig = JobConfiguration.newBuilder("myJob", 3).cron("0/5 * * * * ?").build();
// Configure the fragmentation item of the currently running job
int shardingItem = 0;
// Create a local executor
new LocalTaskExecutor(new MyJob(), jobConfig, shardingItem).execute();
当前内容版权归 ElasticJob 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ElasticJob .