From 5ae12fdb1ae6864d225cc6443a4d5803b76829cf Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Sat, 28 Apr 2018 20:08:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=97=A5=E5=BF=97=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E9=80=9F=E5=BA=A6=E4=BC=98=E5=8C=96=EF=BC=8C=E7=99=BE?= =?UTF-8?q?=E4=B8=87=E7=BA=A7=E5=88=AB=E6=97=A5=E5=BF=97=E9=87=8F=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E9=80=9F=E5=BA=A6=E6=8F=90=E5=8D=871000=E5=80=8D?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/XXL-JOB官方文档.md | 8 ++++---- doc/db/tables_xxl_job.sql | 3 ++- .../xxl/job/admin/service/impl/XxlJobServiceImpl.java | 9 ++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index 4418c9ae..ddc76cbb 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -1194,6 +1194,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段 - 6、Glue(Shell) 等脚本任务支持失败重试; - 7、告警邮箱支持SSL配置; - 8、Window机器下File.separator不兼容问题修复; +- 9、任务日志查询速度优化,百万级别日志量搜索速度提升1000倍; ### TODO LIST @@ -1218,10 +1219,9 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段 - 19、提供多版本执行器:不依赖容器版本、不内嵌Jetty版本(通过配置executoraddress替换jetty通讯)等; - 20、注册中心支持扩展,除默认基于DB之外,支持扩展接入第三方注册中心如zk、eureka等; - 21、依赖Core内部国际化处理; -- 22、大数据量下任务日志分页优化,时间选择组件支持清空功能可提升速度; -- 23、故障转移、失败重试等策略,规范化合并归类; -- 24、流程任务,支持参数传递; -- 25、SimpleTrigger 支持; +- 22、故障转移、失败重试等策略,规范化合并归类; +- 23、流程任务,支持参数传递; +- 24、SimpleTrigger 支持; ## 七、其他 diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql index 85cb5f90..33bed25f 100644 --- a/doc/db/tables_xxl_job.sql +++ b/doc/db/tables_xxl_job.sql @@ -185,7 +185,8 @@ CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` ( `handle_time` datetime DEFAULT NULL COMMENT '执行-时间', `handle_code` int(11) NOT NULL COMMENT '执行-状态', `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志', - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + KEY `I_trigger_time` (`trigger_time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` ( diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java index 406c74b0..3873157f 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java @@ -6,7 +6,6 @@ import com.xxl.job.admin.core.model.XxlJobInfo; import com.xxl.job.admin.core.route.ExecutorRouteStrategyEnum; import com.xxl.job.admin.core.schedule.XxlJobDynamicScheduler; import com.xxl.job.admin.core.util.I18nUtil; -import com.xxl.job.admin.core.util.LocalCacheUtil; import com.xxl.job.admin.dao.XxlJobGroupDao; import com.xxl.job.admin.dao.XxlJobInfoDao; import com.xxl.job.admin.dao.XxlJobLogDao; @@ -324,12 +323,12 @@ public class XxlJobServiceImpl implements XxlJobService { private static final String TRIGGER_CHART_DATA_CACHE = "trigger_chart_data_cache"; @Override public ReturnT> chartInfo(Date startDate, Date endDate) { - // get cache + /*// get cache String cacheKey = TRIGGER_CHART_DATA_CACHE + "_" + startDate.getTime() + "_" + endDate.getTime(); Map chartInfo = (Map) LocalCacheUtil.get(cacheKey); if (chartInfo != null) { return new ReturnT>(chartInfo); - } + }*/ // process List triggerDayList = new ArrayList(); @@ -376,8 +375,8 @@ public class XxlJobServiceImpl implements XxlJobService { result.put("triggerCountSucTotal", triggerCountSucTotal); result.put("triggerCountFailTotal", triggerCountFailTotal); - // set cache - LocalCacheUtil.set(cacheKey, result, 60*1000); // cache 60s + /*// set cache + LocalCacheUtil.set(cacheKey, result, 60*1000); // cache 60s*/ return new ReturnT>(result); }