LTS流程
2019-09-17 10:14:32 0 举报
LTS轻量级调度工具
作者其他创作
大纲/内容
任务拉取
job run
bizLogger.info
客户端限流:JobSubmitProtector
HttpCmd
push
1.实时任务2.周期任务:job.setRepeatInterval(50 * 1000L)3.cron任务:job.setCronExpression(\"0 0/1 * * * ?\
TaskTracker 周期性定时pull:JobPullMachine.sendRequest(),携待可执行线程数相关信息发送到jobTracker运行线程管理:RunnerPool->CachedThreadPool->SynchronousQueue(可以保障有序性,非公平模式)
任务接收
扩展WaitingJobQueueChecker.normalProcess(),监听task完成事件->TaskExecuteFinishListener等
JobCompletedProcessor.processRequest()->JobProcBiz.doBiz()->ClientNotifier.send()PushNewJobBiz:推送new job ->taskTracker
限流 jobClient:JobSubmitProtector 500 job.submit.maxQPSjobTracker:RemotingDispatcher 5000 remoting.req.limit.maxQPS
直接通过http命令提交,与jobclient提交最终都是调用:JobReceiver.receive()jobtracker: com.github.ltsopensource.jobtracker.cmd.*启动相关,core:com.github.ltsopensource.cmd.*HttpCmd指令提交:基于socket通信HttpCmdServer->HttpCmdAcceptor->AddJobHttpCmd netty/mina通信,性能更好jobClient.submitJob()->asyncSubmit()->RemotingClientDelegate.invokeAsync()->AbstractRemoting.invokeAsyncImpl()->channel.writeAndFlush(request)...
to client
任务推送:JobPullProcessor.process()处理 TaskTracker的 Job pull 请求.
0 条评论
下一页