[英]Does trigger API in quartz clustered scheduler triggers job in the same local machine or any machine in the cluster?
当我在集群设置中的Quartz中触发作业时,是否仅在同一台计算机上或集群设置中的任何计算机上触发该作业?
Quartz documentation on Clustering says (emphasis mine): 关于集群的 Quartz文档说(重点是我):
Only one node will fire the job for each firing.
每次触发时,只有一个节点将触发该作业。 For example, if the job has a repeating trigger that tells it to fire every 10 seconds, then at 12:00:00 exactly one node will run the job, and at 12:00:10 exactly one node will run the job, etc. It won't necessarily be the same node each time - it will more or less be random which node runs it .
例如,如果作业具有重复的触发器,告诉它每10秒触发一次,则在12:00:00恰好一个节点将运行该作业,而在12:00:10恰好一个节点将运行该作业,依此类推不一定每次都是相同的节点-哪个节点运行它或多或少是随机的 。 The load balancing mechanism is near-random for busy schedulers (lots of triggers) but favors the same node that just was just active for non-busy (eg one or two triggers) schedulers.
对于繁忙的调度程序(大量触发器),负载平衡机制几乎是随机的,但偏向于对于非繁忙的调度程序(例如,一个或两个触发器)刚刚处于活动状态的同一节点。
Basically, once a job is scheduled to run, this information is written to the database. 基本上,一旦安排了作业运行,就将该信息写入数据库。 Any node from the cluster can read from this database and run the job.
群集中的任何节点都可以从该数据库读取并运行作业。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.