zoukankan      html  css  js  c++  java
  • 【原创】大数据基础之Quartz(1)简介、源代码解析

    一简介

    官网

    http://www.quartz-scheduler.org/

    What is the Quartz Job Scheduling Library?

    Quartz is a richly featured, open source job scheduling library that can be integrated within virtually any Java application - from the smallest stand-alone application to the largest e-commerce system. Quartz can be used to create simple or complex schedules for executing tens, hundreds, or even tens-of-thousands of jobs; jobs whose tasks are defined as standard Java components that may execute virtually anything you may program them to do. The Quartz Scheduler includes many enterprise-class features, such as support for JTA transactions and clustering.

    二 代码解析

    开启分布式

    org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX

    org.quartz.jobStore.isClustered=true

    启动过程

    QuartzScheduler.start

             QuartzSchedulerResources.getJobStore

                      StdSchedulerFactory.instantiate (org.quartz.jobStore.class)

                              JobStoreSupport.setLockHandler (org.quartz.jobStore.lockHandler.class)

                              JobStoreSupport.initialize

                                       setLockHandler (StdRowLockSemaphore)

             JobStoreSupport.schedulerStarted

                      ClusterManager.initialize

                              run

                                       manage

                                                doCheckin

                                                         clusterCheckIn

                                                         Semaphore.obtainLock

                                                                 StdRowLockSemaphore.executeSQL (select for update and insert)

                                                         clusterRecover

                              signalSchedulingChangeImmediately

                                       SchedulerSignaler.signalSchedulingChange

                                                QuartzSchedulerThread.signalSchedulingChange

     

    QuartzSchedulerThread.run

             JobStore.acquireNextTriggers

             JobStore.triggersFired

    各种建表语句地址:https://gitlab.com/quartz-scheduler/quartz/-/tree/master/quartz-core/src/main/resources/org/quartz/impl/jdbcjobstore

  • 相关阅读:
    设置debian6源
    debian7编译安装tengine添加lua和ldap模块
    elasticsearch5使用snapshot接口备份索引
    logstash5生成init脚本后台启动
    Xpack集成LDAP
    debian安装filebeat5.5收集nginx日志
    kibana5画图
    安装Xtrabackup,设置定时备份msyql数据库
    编译安装nrpe,配置监控mysql端口和主从状态
    编译安装keepalived,实现双主mysql高可用
  • 原文地址:https://www.cnblogs.com/barneywill/p/9895225.html
Copyright © 2011-2022 走看看