diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md index 138d8c34..59717148 100644 --- a/doc/XXL-JOB-English-Documentation.md +++ b/doc/XXL-JOB-English-Documentation.md @@ -227,7 +227,7 @@ The concrete contet describe as follows: If you has finished step 1,then you can compile the project in maven and deploy the war package to tomcat. the url to visit is :http://localhost:8080/xxl-job-admin (this address will be used by executor and use it as callback url),the index page after login in is as follow -![index page after login in](https://static.oschina.net/uploads/img/201705/08194505_6yC0.png "index page after login in") +![index page after login in](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_6yC0.png "index page after login in") Now,the “xxl-job-admin” project is deployed success. @@ -321,16 +321,16 @@ Now let’s create a "GLUE模式(Java)" job,if you want to learn more about it , #### Step 1:Create new job Login in xxl-job-admin,click on the"新建任务" button, configure the job params as follows and click "保存" button to save the job info. -![task management](https://static.oschina.net/uploads/img/201704/27205910_o8HQ.png "task management") +![task management](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_o8HQ.png "task management") -![create task](https://static.oschina.net/uploads/img/201704/27210202_SE2u.png "create task") +![create task](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_SE2u.png "create task") #### Step 2:develop “GLUE模式(Java)” job Click “GLUE” button on the right of the job to go to GLUE editor view as shown below。“GLUE模式(Java)” mode task has been inited with default task code for printing Hello World。 ( “GLUE模式(Java)” mode task is a java code fragment implements IJobHandler interface,it will be executed in executor,you can use @Resource/@Autowire to inject other java bean instance,if you want to see more info please go to chapter 3) -![输入图片说明](https://static.oschina.net/uploads/img/201704/27210307_Fgql.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_Fgql.png "在这里输入图片标题") -![输入图片说明](https://static.oschina.net/uploads/img/201704/27210314_dNUJ.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_dNUJ.png "在这里输入图片标题") #### Step 3:trigger task If you want to run the job manually please click "执行" button on the right of the job(usually we trigger job by Cron expression) @@ -338,11 +338,11 @@ If you want to run the job manually please click "执行" button on the right of #### Step 4:view log Click “日志” button on the right side of the task you will go to the task log list ,you will see the schedule history records of the task and the schedule detail info,execution info and execution params.If you click the “执行日志” button on the right side of the task log record,you will go to log console and view the execute log in the course of task execution. -![输入图片说明](https://static.oschina.net/uploads/img/201704/27232850_inc8.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_inc8.png "在这里输入图片标题") On the log console,you can view task execution log on the executor immediately after it dump to log file,so you can monitor the task execution process by Rolling way. -![输入图片说明](https://static.oschina.net/uploads/img/201704/27211631_eYrv.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_eYrv.png "在这里输入图片标题") ## 3. Task details @@ -390,12 +390,12 @@ The task logic exist in the executor project as JobHandler,the develop steps as - 3, add “@JobHandler(value=" customize jobhandler name")” annotation,the value stand for JobHandler name,it will be used as JobHandler property when create a new task in the schedule center. (go and see DemoJobHandler in the xxl-job-executor-example project, as shown below) -![输入图片说明](https://static.oschina.net/uploads/img/201607/23232347_oLlM.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_oLlM.png "在这里输入图片标题") #### Step 2:create task in schedule center If you want learn more about configure item please go and sedd “Description of configuration item”,select "BEAN模式" as run mode,property JobHandler please fill in the value defined by @JobHande. -![输入图片说明](https://static.oschina.net/uploads/img/201704/27225124_yrcO.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_yrcO.png "在这里输入图片标题") ### 3.2 GLUE模式(Java) Task source code is maintained in the schedule center and can be updated by Web IDE online, it will be compiled and effective real-time,didn’t need to assign JobHandler,develop flow shown as below: @@ -403,14 +403,14 @@ Task source code is maintained in the schedule center and can be updated by Web #### Step 1:create task in schedule center If you want learn more about configure item please go and sedd “Description of configuration item”,select "GLUE模式(Java)" as run mode. -![输入图片说明](https://static.oschina.net/uploads/img/201704/27210202_SE2u.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_SE2u.png "在这里输入图片标题") #### Step 2:develop task source code Select the task record and click “GLUE” button on the righe of it,it will go to GLUE task’s WEB IDE page,on this page yo can edit you task code(also can edit in other IDE tools,copy and paste into this page). Version backtrack(support 30 versions while backtrack):on the WEB IDE page of GLUE task,on upper right corner drop down box please select “版本回溯”,it will display GLUE updated history,select the version you want it will display the source code of this version,it will backtrace the version while click save button. -![输入图片说明](https://static.oschina.net/uploads/img/201704/27210314_dNUJ.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_dNUJ.png "在这里输入图片标题") ### 3.3 GLUE模式(Shell) @@ -422,7 +422,7 @@ Select the task record and click “GLUE” button on the righe of it,it will go Actually it is a shell script fragment. -![输入图片说明](https://static.oschina.net/uploads/img/201704/27232259_iUw0.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_iUw0.png "在这里输入图片标题") ### 3.4 GLUE模式(Python) @@ -434,19 +434,19 @@ Select the task record and click “GLUE” button on the righe of it,it will go Actually it is a python script fragment. -![输入图片说明](https://static.oschina.net/uploads/img/201704/27232305_BPLG.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_BPLG.png "在这里输入图片标题") ## 4. Task Management ### 4.0 configure executor click"执行器管理" on the left menu,it will go to the page as shown below: -![输入图片说明](https://static.oschina.net/uploads/img/201703/12223509_Hr2T.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_Hr2T.png "在这里输入图片标题")    1,"调度中心OnLine”:display schedule center machine list,when task is scheduled it will callback schedule center for notify the execution result in failover mode, so that it can avoid a single point scheduler;    2,"执行器列表" :display all nodes under this executor group. If you want to create a new executor,please click "+新增执行器" button: -![输入图片说明](https://static.oschina.net/uploads/img/201703/12223617_g3Im.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_g3Im.png "在这里输入图片标题") ### Description of executor attributes @@ -473,19 +473,19 @@ choose the task you want to edit and click” GLUE”button on the right side of ### 4.4 pause/recover task You can pause or recover task but it just fit to follow up schedule trigger and won’t affect scheduled tasks,if you want to stop tasks which has been triggered,please go and see “4.8 stop the running task” -![输入图片说明](https://static.oschina.net/uploads/img/201607/24130337_ZAhX.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_ZAhX.png "在这里输入图片标题") ### 4.5 manually trigger You can trigger a task manually by Click “执行”button,it won’t affect original scheduling rules. -![输入图片说明](https://static.oschina.net/uploads/img/201607/24133348_Z5wp.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_Z5wp.png "在这里输入图片标题") ### 4.6 view schedule log You can view task’s history schedule log by click “日志” button,on the history schedule log list page you can view every time of task’s schedule result,execution result and so on,click “执行日志” button can view the task’s full execute log. -![输入图片说明](https://static.oschina.net/uploads/img/201607/24133500_9235.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_9235.png "在这里输入图片标题") -![输入图片说明](https://static.oschina.net/uploads/img/201704/27232850_inc8.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_inc8.png "在这里输入图片标题") 调度时间:schedule center trigger time when schedule and send execution signal to executor; 调度结果:schedule center trigger task’s result, 200 represent success,500 or other number stands for fail; @@ -503,12 +503,12 @@ You can view task’s history schedule log by click “日志” button,on the h ### 4.7 view execution log Click the “执行日志” button on the right side of the record,you can go to the execution log page,you can view the full execution log of the logic business code, shown as below: -![输入图片说明](https://static.oschina.net/uploads/img/201703/25124816_tvGI.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_tvGI.png "在这里输入图片标题") ### 4.8 stop running tasks Just fit to running tasks,on the task log list page,click “终止任务” button on the right side of the record, it will send stop command to the executor where the task was executed,finally the task was killed and the task instance execute queue of this task will be clear. -![输入图片说明](https://static.oschina.net/uploads/img/201607/24140048_hIci.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_hIci.png "在这里输入图片标题") It is implemented by interrupt execute thread, it will trigger InterruptedException.so if JobHandler catch this execuption and handle this exception this function is unavailable. @@ -529,14 +529,14 @@ If JobHandler start child thread,child thread also must not catch InterruptedExc ### 4.9 delete execution log On the task log list page, after you select executor and task, you can click"删除" button on the right side and it will pop-up "日志清理" window,on the pop-up window you can choose different log delete policy,choose the policy you want to execute and click "确定" button it will delele relative logs: -![输入图片说明](https://static.oschina.net/uploads/img/201705/08210711_Ypik.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_Ypik.png "在这里输入图片标题") -![输入图片说明](https://static.oschina.net/uploads/img/201705/08211152_EB65.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_EB65.png "在这里输入图片标题") ### 4.10 delete task Click the delete button on the right side of the task,the task will be deteted. -![输入图片说明](https://static.oschina.net/uploads/img/201607/24140641_Z9Qr.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_Z9Qr.png "在这里输入图片标题") ## 5. Overall design ### 5.1 Source directory introduction @@ -551,7 +551,7 @@ XXL-JOB schedule module is implemented based on Quartz cluster,it’s “databas XXL-JOB custom Quartz table structure prefix(XXL_JOB_QRTZ_). -![输入图片说明](https://static.oschina.net/uploads/img/201607/24143957_bNwm.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_bNwm.png "在这里输入图片标题") The added tables as shown below: - XXL_JOB_QRTZ_TRIGGER_GROUP:executor basic table, maintain the info about the executor; @@ -580,7 +580,7 @@ So schedule and task can be decoupled from each other, by the way it can improve #### 5.3.3 Architecture diagram -![输入图片说明](https://static.oschina.net/uploads/img/201707/17190028_aEE2.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_aEE2.png "在这里输入图片标题") ### 5.4 Schedule module analysis #### 5.4.1 Disadvantage of quartz @@ -661,10 +661,10 @@ Executor will execute task when it receive task execute request.it will notify t If executor project was deployed as cluster schedule center will known all online executor nodes,such as:“127.0.0.1:9997, 127.0.0.1:9998, 127.0.0.1:9999”. When "路由策略" select "故障转移(FAILOVER)",it will send heart beat check request in order while schedule center start schedule request. The first alive checked executor node will be selected and send schedule request to it. -![输入图片说明](https://static.oschina.net/uploads/img/201705/11221144_P128.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_P128.png "在这里输入图片标题") “调度备注” can be viewed on the monitor page when schedule success. As shown below: -![输入图片说明](https://static.oschina.net/uploads/img/201703/12230733_jrdI.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_jrdI.png "在这里输入图片标题") “调度备注” will display local schedule route path、executor’s "注册方式"、"地址列表" and task’s "路由策略"。Under "故障转移(FAILOVER)" policy, schedule center take first address to do heartbeat detection, heat beat fail will automatically skip, the second address heart beat fail…… until the third address “127.0.0.1:9999” heart beat success, it was selected as target executor, then send schedule request to target executor, now the schedule process is end wait for the executor’s callback execution result. @@ -675,7 +675,7 @@ Every time when task was scheduled in the schedule center it will record a task - 调度信息:include schedule time、schedule result and schedule log and so on,accord these parameters you can understand some task schedule info of schedule center. - 执行信息:include execute time、execute result and execute log and so on, accord these parameters you can understand the task execution info in the executor. -![输入图片说明](https://static.oschina.net/uploads/img/201703/12221436_c8Ru.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_c8Ru.png "在这里输入图片标题") Schedule log stands fo single task schedule, attribute description is as follows: - 执行器地址:machine addresses on which task will be executed. @@ -696,9 +696,9 @@ When parent task end execute and success, it will match child task dependency ac On the task log page ,you can see matched child task and triggered child task’s log info when you “查看”button of “执行备注”,otherwise the child task didin’t execute, as shown beleow: -![输入图片说明](https://static.oschina.net/uploads/img/201607/24194134_Wb2o.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_Wb2o.png "在这里输入图片标题") -![输入图片说明](https://static.oschina.net/uploads/img/201607/24194212_jOAU.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_jOAU.png "在这里输入图片标题") ### 5.5 Task "run mode" analysis #### 5.5.1 "Bean模式" task @@ -722,7 +722,7 @@ All supported types of scripts as shown beloes: #### 5.5.4 executor Executor is actually an embedded Jetty server with default port 9999, as shown below(parameter:xxl.job.executor.port). -![输入图片说明](https://static.oschina.net/uploads/img/201703/10174923_TgNO.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_TgNO.png "在这里输入图片标题") Executor will identify Bean mode task in spring container through @JobHandler When project start, it will be managed use the value of annotation as key. diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index 012dcea3..08169fd9 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -246,7 +246,7 @@ XXL-JOB是一个轻量级分布式任务调度框架,其核心设计目标是 如果已经正确进行上述配置,可将项目编译打war包并部署到tomcat中。 调度中心访问地址:http://localhost:8080/xxl-job-admin (该地址执行器将会使用到,作为回调地址),登录后运行界面如下图所示 -![输入图片说明](https://static.oschina.net/uploads/img/201705/08194505_6yC0.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_6yC0.png "在这里输入图片标题") 至此“调度中心”项目已经部署成功。 @@ -351,18 +351,18 @@ XXL-JOB是一个轻量级分布式任务调度框架,其核心设计目标是 #### 步骤一:新建任务: 登录调度中心,点击下图所示“新建任务”按钮,新建示例任务。然后,参考下面截图中任务的参数配置,点击保存。 -![输入图片说明](https://static.oschina.net/uploads/img/201704/27205910_o8HQ.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_o8HQ.png "在这里输入图片标题") -![输入图片说明](https://static.oschina.net/uploads/img/201712/25183654_ZAsz.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_ZAsz.png "在这里输入图片标题") #### 步骤二:“GLUE模式(Java)” 任务开发: 请点击任务右侧 “GLUE” 按钮,进入 “GLUE编辑器开发界面” ,见下图。“GLUE模式(Java)” 运行模式的任务默认已经初始化了示例任务代码,即打印Hello World。 ( “GLUE模式(Java)” 运行模式的任务实际上是一段继承自IJobHandler的Java类代码,它在执行器项目中运行,可使用@Resource/@Autowire注入执行器里中的其他服务,详细介绍请查看第三章节) -![输入图片说明](https://static.oschina.net/uploads/img/201704/27210307_Fgql.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_Fgql.png "在这里输入图片标题") -![输入图片说明](https://static.oschina.net/uploads/img/201704/27210314_dNUJ.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_dNUJ.png "在这里输入图片标题") #### 步骤三:触发执行: 请点击任务右侧 “执行” 按钮,可手动触发一次任务执行(通常情况下,通过配置Cron表达式进行任务调度出发)。 @@ -371,11 +371,11 @@ XXL-JOB是一个轻量级分布式任务调度框架,其核心设计目标是 请点击任务右侧 “日志” 按钮,可前往任务日志界面查看任务日志。 在任务日志界面中,可查看该任务的历史调度记录以及每一次调度的任务调度信息、执行参数和执行信息。运行中的任务点击右侧的“执行日志”按钮,可进入日志控制台查看实时执行日志。 -![输入图片说明](https://static.oschina.net/uploads/img/201704/27232850_inc8.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_inc8.png "在这里输入图片标题") 在日志控制台,可以Rolling方式实时查看任务在执行器一侧运行输出的日志信息,实时监控任务进度; -![输入图片说明](https://static.oschina.net/uploads/img/201704/27211631_eYrv.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_eYrv.png "在这里输入图片标题") ## 三、任务详解 @@ -426,12 +426,12 @@ XXL-JOB是一个轻量级分布式任务调度框架,其核心设计目标是 - 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志; (可参考Sample示例执行器中的DemoJobHandler,见下图) -![输入图片说明](https://static.oschina.net/uploads/img/201607/23232347_oLlM.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_oLlM.png "在这里输入图片标题") #### 步骤二:调度中心,新建调度任务 参考上文“配置属性详细说明”对新建的任务进行参数配置,运行模式选中 "BEAN模式",JobHandler属性填写任务注解“@JobHandler”中定义的值; -![输入图片说明](https://static.oschina.net/uploads/img/201712/25183654_ZAsz.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_ZAsz.png "在这里输入图片标题") ### 3.2 GLUE模式(Java) 任务以源码方式维护在调度中心,支持通过Web IDE在线更新,实时编译和生效,因此不需要指定JobHandler。开发流程如下: @@ -439,14 +439,14 @@ XXL-JOB是一个轻量级分布式任务调度框架,其核心设计目标是 #### 步骤一:调度中心,新建调度任务: 参考上文“配置属性详细说明”对新建的任务进行参数配置,运行模式选中 "GLUE模式(Java)"; -![输入图片说明](https://static.oschina.net/uploads/img/201712/25183837_tJOq.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_tJOq.png "在这里输入图片标题") #### 步骤二:开发任务代码: 选中指定任务,点击该任务右侧“GLUE”按钮,将会前往GLUE任务的Web IDE界面,在该界面支持对任务代码进行开发(也可以在IDE中开发完成后,复制粘贴到编辑中)。 版本回溯功能(支持30个版本的版本回溯):在GLUE任务的Web IDE界面,选择右上角下拉框“版本回溯”,会列出该GLUE的更新历史,选择相应版本即可显示该版本代码,保存后GLUE代码即回退到对应的历史版本; -![输入图片说明](https://static.oschina.net/uploads/img/201704/27210314_dNUJ.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_dNUJ.png "在这里输入图片标题") ### 3.3 GLUE模式(Shell) @@ -458,7 +458,7 @@ XXL-JOB是一个轻量级分布式任务调度框架,其核心设计目标是 该模式的任务实际上是一段 "shell" 脚本; -![输入图片说明](https://static.oschina.net/uploads/img/201704/27232259_iUw0.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_iUw0.png "在这里输入图片标题") ### 3.4 GLUE模式(Python) @@ -470,7 +470,7 @@ XXL-JOB是一个轻量级分布式任务调度框架,其核心设计目标是 该模式的任务实际上是一段 "python" 脚本; -![输入图片说明](https://static.oschina.net/uploads/img/201704/27232305_BPLG.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_BPLG.png "在这里输入图片标题") ### 3.5 GLUE模式(NodeJS) @@ -487,14 +487,14 @@ XXL-JOB是一个轻量级分布式任务调度框架,其核心设计目标是 ### 4.0 配置执行器 点击进入"执行器管理"界面, 如下图: -![输入图片说明](https://static.oschina.net/uploads/img/201703/12223509_Hr2T.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_Hr2T.png "在这里输入图片标题") 1、"调度中心OnLine:"右侧显示在线的"调度中心"列表, 任务执行结束后, 将会以failover的模式进行回调调度中心通知执行结果, 避免回调的单点风险; 2、"执行器列表" 中显示在线的执行器列表, 可通过"OnLine 机器"查看对应执行器的集群机器。 点击按钮 "+新增执行器" 弹框如下图, 可新增执行器配置: -![输入图片说明](https://static.oschina.net/uploads/img/201712/25183958_V3vF.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_V3vF.png "在这里输入图片标题") ### 执行器属性说明 @@ -522,19 +522,19 @@ XXL-JOB是一个轻量级分布式任务调度框架,其核心设计目标是 可对任务进行“暂停”和“恢复”操作。 需要注意的是,此处的暂停/恢复仅针对任务的后续调度触发行为,不会影响到已经触发的调度任务,如需终止已经触发的调度任务,可查看“4.8 终止运行中的任务” -![输入图片说明](https://static.oschina.net/uploads/img/201607/24130337_ZAhX.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_ZAhX.png "在这里输入图片标题") ### 4.5 手动触发一次调度 点击“执行”按钮,可手动触发一次任务调度,不影响原有调度规则。 -![输入图片说明](https://static.oschina.net/uploads/img/201607/24133348_Z5wp.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_Z5wp.png "在这里输入图片标题") ### 4.6 查看调度日志 点击“日志”按钮,可以查看任务历史调度日志。在历史调入日志界面可查看每次任务调度的调度结果、执行结果等,点击“执行日志”按钮可查看执行器完整日志。 -![输入图片说明](https://static.oschina.net/uploads/img/201607/24133500_9235.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_9235.png "在这里输入图片标题") -![输入图片说明](https://static.oschina.net/uploads/img/201712/25184206_UDSo.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_UDSo.png "在这里输入图片标题") 调度时间:"调度中心"触发本次调度并向"执行器"发送任务执行信号的时间; 调度结果:"调度中心"触发本次调度的结果,200表示成功,500或其他表示失败; @@ -552,13 +552,13 @@ XXL-JOB是一个轻量级分布式任务调度框架,其核心设计目标是 ### 4.7 查看执行日志 点击执行日志右侧的 “执行日志” 按钮,可跳转至执行日志界面,可以查看业务代码中打印的完整日志,如下图; -![输入图片说明](https://static.oschina.net/uploads/img/201703/25124816_tvGI.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_tvGI.png "在这里输入图片标题") ### 4.8 终止运行中的任务 仅针对执行中的任务。 在任务日志界面,点击右侧的“终止任务”按钮,将会向本次任务对应的执行器发送任务终止请求,将会终止掉本次任务,同时会清空掉整个任务执行队列。 -![输入图片说明](https://static.oschina.net/uploads/img/201607/24140048_hIci.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_hIci.png "在这里输入图片标题") 任务终止时通过 "interrupt" 执行线程的方式实现, 将会触发 "InterruptedException" 异常。因此如果JobHandler内部catch到了该异常并消化掉的话, 任务终止功能将不可用。 @@ -579,14 +579,14 @@ try{ ### 4.9 删除执行日志 在任务日志界面,选中执行器和任务之后,点击右侧的"删除"按钮将会出现"日志清理"弹框,弹框中支持选择不同类型的日志清理策略,选中后点击"确定"按钮即可进行日志清理操作; -![输入图片说明](https://static.oschina.net/uploads/img/201705/08210711_Ypik.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_Ypik.png "在这里输入图片标题") -![输入图片说明](https://static.oschina.net/uploads/img/201705/08211152_EB65.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_EB65.png "在这里输入图片标题") ### 4.10 删除任务 点击删除按钮,可以删除对应任务。 -![输入图片说明](https://static.oschina.net/uploads/img/201607/24140641_Z9Qr.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_Z9Qr.png "在这里输入图片标题") ## 五、总体设计 @@ -602,7 +602,7 @@ XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quar XXL-JOB首先定制了Quartz原生表结构前缀(XXL_JOB_QRTZ_)。 -![输入图片说明](https://static.oschina.net/uploads/img/201607/24143957_bNwm.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_bNwm.png "在这里输入图片标题") 然后,在此基础上新增了几张张扩展表,如下: - XXL_JOB_QRTZ_TRIGGER_GROUP:执行器信息表,维护任务执行器信息; @@ -631,7 +631,7 @@ XXL-JOB首先定制了Quartz原生表结构前缀(XXL_JOB_QRTZ_)。 #### 5.3.3 架构图 -![输入图片说明](https://static.oschina.net/uploads/img/201801/03103007_Qohm.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_Qohm.png "在这里输入图片标题") ### 5.4 调度模块剖析 #### 5.4.1 quartz的不足 @@ -727,7 +727,7 @@ xxl-job-admin#com.xxl.job.admin.controller.JobApiController.callback 当任务"路由策略"选择"故障转移(FAILOVER)"时,当调度中心每次发起调度请求时,会按照顺序对执行器发出心跳检测请求,第一个检测为存活状态的执行器将会被选定并发送调度请求。 调度成功后,可在日志监控界面查看“调度备注”,如下; -![输入图片说明](https://static.oschina.net/uploads/img/201703/12230733_jrdI.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_jrdI.png "在这里输入图片标题") “调度备注”可以看出本地调度运行轨迹,执行器的"注册方式"、"地址列表"和任务的"路由策略"。"故障转移(FAILOVER)"路由策略下,调度中心首先对第一个地址进行心跳检测,心跳失败因此自动跳过,第二个依然心跳检测失败…… 直至心跳检测第三个地址“127.0.0.1:9999”成功,选定为“目标执行器”;然后对“目标执行器”发送调度请求,调度流程结束,等待执行器回调执行结果。 @@ -758,9 +758,9 @@ xxl-job-admin#com.xxl.job.admin.controller.JobApiController.callback 在任务日志界面,点击任务的“执行备注”的“查看”按钮,可以看到匹配子任务以及触发子任务执行的日志信息,如无信息则表示未触发子任务执行,可参考下图。 -![输入图片说明](https://static.oschina.net/uploads/img/201607/24194134_Wb2o.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_Wb2o.png "在这里输入图片标题") -![输入图片说明](https://static.oschina.net/uploads/img/201607/24194212_jOAU.png "在这里输入图片标题") +![输入图片说明](https://raw.githubusercontent.com/xuxueli/xxl-job/master/doc/images/img_jOAU.png "在这里输入图片标题") ### 5.5 任务 "运行模式" 剖析 #### 5.5.1 "Bean模式" 任务 diff --git a/doc/images/img_9235.png b/doc/images/img_9235.png new file mode 100644 index 00000000..867d8136 Binary files /dev/null and b/doc/images/img_9235.png differ diff --git a/doc/images/img_BPLG.png b/doc/images/img_BPLG.png new file mode 100644 index 00000000..c928205f Binary files /dev/null and b/doc/images/img_BPLG.png differ diff --git a/doc/images/img_EB65.png b/doc/images/img_EB65.png new file mode 100644 index 00000000..ccf222d4 Binary files /dev/null and b/doc/images/img_EB65.png differ diff --git a/doc/images/img_Fgql.png b/doc/images/img_Fgql.png new file mode 100644 index 00000000..f8840516 Binary files /dev/null and b/doc/images/img_Fgql.png differ diff --git a/doc/images/img_Hr2T.png b/doc/images/img_Hr2T.png new file mode 100644 index 00000000..4b5a73c2 Binary files /dev/null and b/doc/images/img_Hr2T.png differ diff --git a/doc/images/img_Qohm.png b/doc/images/img_Qohm.png new file mode 100644 index 00000000..e88d4772 Binary files /dev/null and b/doc/images/img_Qohm.png differ diff --git a/doc/images/img_UDSo.png b/doc/images/img_UDSo.png new file mode 100644 index 00000000..a0b81a43 Binary files /dev/null and b/doc/images/img_UDSo.png differ diff --git a/doc/images/img_V3vF.png b/doc/images/img_V3vF.png new file mode 100644 index 00000000..4607c84f Binary files /dev/null and b/doc/images/img_V3vF.png differ diff --git a/doc/images/img_Wb2o.png b/doc/images/img_Wb2o.png new file mode 100644 index 00000000..fec8dcae Binary files /dev/null and b/doc/images/img_Wb2o.png differ diff --git a/doc/images/img_Ypik.png b/doc/images/img_Ypik.png new file mode 100644 index 00000000..6b4a2dd0 Binary files /dev/null and b/doc/images/img_Ypik.png differ diff --git a/doc/images/img_Z5wp.png b/doc/images/img_Z5wp.png new file mode 100644 index 00000000..e5485c67 Binary files /dev/null and b/doc/images/img_Z5wp.png differ diff --git a/doc/images/img_Z9Qr.png b/doc/images/img_Z9Qr.png new file mode 100644 index 00000000..2bfb0440 Binary files /dev/null and b/doc/images/img_Z9Qr.png differ diff --git a/doc/images/img_ZAhX.png b/doc/images/img_ZAhX.png new file mode 100644 index 00000000..47a510e0 Binary files /dev/null and b/doc/images/img_ZAhX.png differ diff --git a/doc/images/img_ZAsz.png b/doc/images/img_ZAsz.png new file mode 100644 index 00000000..ae7d29ec Binary files /dev/null and b/doc/images/img_ZAsz.png differ diff --git a/doc/images/img_bNwm.png b/doc/images/img_bNwm.png new file mode 100644 index 00000000..fa8580e3 Binary files /dev/null and b/doc/images/img_bNwm.png differ diff --git a/doc/images/img_dNUJ.png b/doc/images/img_dNUJ.png new file mode 100644 index 00000000..a1a57a06 Binary files /dev/null and b/doc/images/img_dNUJ.png differ diff --git a/doc/images/img_eYrv.png b/doc/images/img_eYrv.png new file mode 100644 index 00000000..3f9c5e9e Binary files /dev/null and b/doc/images/img_eYrv.png differ diff --git a/doc/images/img_hIci.png b/doc/images/img_hIci.png new file mode 100644 index 00000000..05292095 Binary files /dev/null and b/doc/images/img_hIci.png differ diff --git a/doc/images/img_iUw0.png b/doc/images/img_iUw0.png new file mode 100644 index 00000000..b746000b Binary files /dev/null and b/doc/images/img_iUw0.png differ diff --git a/doc/images/img_inc8.png b/doc/images/img_inc8.png new file mode 100644 index 00000000..e1d38d6f Binary files /dev/null and b/doc/images/img_inc8.png differ diff --git a/doc/images/img_jOAU.png b/doc/images/img_jOAU.png new file mode 100644 index 00000000..beddc97d Binary files /dev/null and b/doc/images/img_jOAU.png differ diff --git a/doc/images/img_jrdI.png b/doc/images/img_jrdI.png new file mode 100644 index 00000000..69b38c06 Binary files /dev/null and b/doc/images/img_jrdI.png differ diff --git a/doc/images/img_o8HQ.png b/doc/images/img_o8HQ.png new file mode 100644 index 00000000..46b5bd0a Binary files /dev/null and b/doc/images/img_o8HQ.png differ diff --git a/doc/images/img_oLlM.png b/doc/images/img_oLlM.png new file mode 100644 index 00000000..f930be47 Binary files /dev/null and b/doc/images/img_oLlM.png differ diff --git a/doc/images/img_tJOq.png b/doc/images/img_tJOq.png new file mode 100644 index 00000000..ff9dcef9 Binary files /dev/null and b/doc/images/img_tJOq.png differ diff --git a/doc/images/img_tvGI.png b/doc/images/img_tvGI.png new file mode 100644 index 00000000..4b2265a7 Binary files /dev/null and b/doc/images/img_tvGI.png differ