执行器,server启动、销毁和注册逻辑调整;

This commit is contained in:
xueli.xue 2017-05-08 10:45:59 +08:00
parent 14767e30e6
commit 882d7a43e9
2 changed files with 15 additions and 16 deletions

View File

@ -809,20 +809,19 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
#### 6.15 版本 V1.7.1 特性Coding
- 1、运行日志读写编码统一解决windows环境下日志乱码问题
- 2、通讯超时时间设置为10s避免异常情况下调度线程占用
- 3、JettyServer关闭逻辑优化修复执行器无法正常关闭的问题
- 4、JobHandler中开启子线程时支持子线程输出执行日志并通过Rolling查看。
- 2、通讯超时时间限定为10s避免异常情况下调度线程占用
- 3、执行器server启动、销毁和注册逻辑调整
- 4、JettyServer关闭逻辑优化修复执行器无法正常关闭导致端口占用和频繁打印c3p0日志的问题
- 5、JobHandler中开启子线程时支持子线程输出执行日志并通过Rolling查看。
#### TODO LIST
- 1、任务并行触发处理规则单机串行队列默认、单机并行、串行忽略、单机覆盖
- 2、任务权限管理
- 3、执行器server启动注册逻辑调整
- 4、调度失败重试机制
- 5、JobHandler开启多线程时支持记录执行日志
- 6、执行器与数据库解耦只需配置调度中心集群地址即可与当前通过JDBC注册自动发现方式相冲突待考虑
- 7、任务日志定期清理功能支持设置日志上限
- 8、任务分片一个任务被拆分成N个独立的任务单元然后由分布式部署的执行器分别执行某一个或几个分片单元
- 9、任务分片路由分片采用一致性Hash算法计算出尽量稳定的分片顺序即使注册机器存在波动也不会引起分批分片顺序大的波动
- 3、调度失败重试机制
- 4、执行器与数据库解耦只需配置调度中心集群地址即可与当前通过JDBC注册自动发现方式相冲突待考虑
- 5、任务日志定期清理功能支持设置日志上限
- 6、任务分片一个任务被拆分成N个独立的任务单元然后由分布式部署的执行器分别执行某一个或几个分片单元
- 7、任务分片路由分片采用一致性Hash算法计算出尽量稳定的分片顺序即使注册机器存在波动也不会引起分批分片顺序大的波动
## 七、其他

View File

@ -60,10 +60,13 @@ public class XxlJobExecutor implements ApplicationContextAware, ApplicationListe
TriggerCallbackThread.getInstance().start();
}
public void destroy(){
// executor stop
// 1executor registry thread stop
ExecutorRegistryThread.getInstance().toStop();
// 2executor stop
serverFactory.destroy();
// job thread repository destory
// 3job thread repository destory
if (JobThreadRepository.size() > 0) {
for (Map.Entry<Integer, JobThread> item: JobThreadRepository.entrySet()) {
JobThread jobThread = item.getValue();
@ -74,11 +77,8 @@ public class XxlJobExecutor implements ApplicationContextAware, ApplicationListe
JobThreadRepository.clear();
}
// trigger callback thread stop
// 4trigger callback thread stop
TriggerCallbackThread.getInstance().toStop();
// executor registry thread stop
ExecutorRegistryThread.getInstance().toStop();
}
// ---------------------------------- init job handler ------------------------------------