Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
211a0923
authored
Feb 24, 2017
by
xueli.xue
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
注册逻辑梳理
parent
859207d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
README.md
xxl-job-core/src/main/java/com/xxl/job/core/registry/impl/DbRegistHelper.java
README.md
View file @
211a0923
...
...
@@ -584,7 +584,7 @@ XXL-JOB会为每次调度请求生成一个单独的日志文件,通过重写L
AppName: 每个执行器机器集群的唯一标示, 任务注册以 "执行器" 为最小粒度进行注册; 每个任务通过其绑定的执行器可感知对应的执行器机器列表;
Beat: 任务注册心跳周期, 默认15s; 执行器以一倍Beat进行执行器注册, 调度中心以一倍Beat进行动态任务发现; 注册信息的失效时间被两倍Beat;
注册表: 见"XXL_JOB_QRTZ_TRIGGER_REGISTRY"表, "执行器"
的进行任务注册时,将会周期性维护一条注册记录; "调度中心" 从而可以动态感知在线的 "执行器" 机器
;
注册表: 见"XXL_JOB_QRTZ_TRIGGER_REGISTRY"表, "执行器"
在进行任务注册时将会周期性维护一条注册记录,即机器地址和AppName的绑定关系; "调度中心" 从而可以动态感知每个AppName在线的机器列表
;
为保证系统"轻量级"并且降低学习部署成本,没有采用Zookeeper作为注册中心,采用DB方式进行任务注册发现;
...
...
@@ -709,7 +709,6 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
-
2、执行器、调度中心,均支持自定义注册IP地址;解决机器多网卡时错误网卡注册的情况;
-
3、任务跨天执行时生成多份日志文件的问题修复;
-
4、底层日志底层日志调整,非敏感日志level调整为debug;
-
5、执行器AppName必须在调度中心配置才允许注册,一个AppName可以配置多个执行器,将会同时注册到对应执行器上;
#### 规划中
...
...
xxl-job-core/src/main/java/com/xxl/job/core/registry/impl/DbRegistHelper.java
View file @
211a0923
...
...
@@ -21,7 +21,7 @@ public class DbRegistHelper implements RegistHelper {
String
insertSql
=
"INSERT INTO XXL_JOB_QRTZ_TRIGGER_REGISTRY( `registry_group` , `registry_key` , `registry_value`, `update_time`) VALUES(? , ? , ?, NOW())"
;
int
ret
=
DBUtil
.
update
(
dataSource
,
updateSql
,
new
Object
[]{
registGroup
,
registryKey
,
registryValue
});
if
(
ret
<
1
)
{
//
ret = DBUtil.update(dataSource, insertSql, new Object[]{registGroup, registryKey, registryValue});
ret
=
DBUtil
.
update
(
dataSource
,
insertSql
,
new
Object
[]{
registGroup
,
registryKey
,
registryValue
});
}
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment