wiki:QuartzScheduler

Quartz Scheduler

Date 2012/04/27
Contact(s) Jesse Eichar
Last edited
Status done
Assigned to release 2.8
Resources R&D Camptocamp
Code will be announced soon
Ticket #876

Overview

Replace the custom code for scheduling tasks, Lucene and harvesting to use the Quartz framework.

Proposal Type

  • Type: Modification
  • App: GeoNetwork
  • Module:

  • Email discussions:
  • IRC discussions:

Voting History

  • None as yet

Motivations

Geonetwork uses custom code for scheduling harvesting tasks as well as for 'Schedule' tasks. I have experienced very difficult to debug cases where tasks are not executed correctly. In addition the Quartz framework has many more features and allows more advanced scheduling features like cron style scheduling, thread pooling, multiple schedules for a single task. Listeners for notification when tasks are executed. There are also options for distribution of tasks which could be useful when clustering Geonetwork.

Right now there are 3 different implementations and all have fairly limited functionality.

Proposal

The existing API will be unchanged for Schedule, Lucene and Harvesters, only the implementation will change.

Components of interest:

  • web/src/main/webapp/WEB-INF/classes/quartz.properties
    • properties for the default scheduler. This scheduler will be used if the tasks specific scheduler configurations do not exist
  • web/src/main/webapp/WEB-INF/classes/quartz-scheduleManager.properties.disabled
    • if the .disabled is removed then the scheduleManager will have a dedicated scheduler configured with the configuration in this file. Otherwise the default scheduler will be used
  • web/src/main/webapp/WEB-INF/classes/quartz-luceneOptimize.properties.disabled
    • if the .disabled is removed then the LuceneOptimization tasks will have a dedicated scheduler configured with the configuration in this file. Otherwise the default scheduler will be used
  • web/src/main/webapp/WEB-INF/classes/quartz-abstractHarvester.properties
    • The Harvester scheduler configuration file. If this file is deleted or renamed harvesting will use the default scheduler
  • jeeves/.../QuartzSchedulerUtils.java
    • Contains a method for obtaining a Scheduler. It takes an id and option to start the scheduler. This has the code to look for the specialized configuration file or fail-over to the default if it is not found.
  • jeeves/.../ScheduleJob.java
    • An adapter between the Quartz Job API and the Geonetwork Schedule API
  • jeeves/.../ScheduleListener.java
    • A listener that listens for Job to be executed and if the job is a ScheduleJob the Schedule object and the ScheduleContext will be set on the ScheduleJob for the execution.
  • web/.../HarvesterJob.java
    • An adapter between the Quartz Job API and the Geonetwork Harvester API
  • web/.../HarversterJobListener.java
    • A listener that listens for Job to be executed and if the job is a HarvesterJob the Harvest object will be set on the HarvesterJob for the execution.

Backwards Compatibility Issues

No compatibility issues

Risks

Nothing notable

Participants

  • As above
Last modified 13 years ago Last modified on 05/16/12 05:22:38
Note: See TracWiki for help on using the wiki.