Class RRMScheduler


  • public class RRMScheduler
    extends Object
    RRM scheduler, implemented using Quartz.
    • Method Detail

      • parseIntoQuartzCron

        public static String[] parseIntoQuartzCron​(String linuxCron)
        Parses Linux cron spec (with seconds) into Quartz compatible cron spec. Quartz does not allow setting both day of week and day of month. If valid Quartz cron already we don't need to do anything. Otherwise we can't use Quartz to even parse out the components as it will just throw a parse error.
        Parameters:
        linuxCron - Linux cron with seconds (seconds minutes hours day_of_month month day_of_week [year])
        Returns:
        String[] an array of length 1 or 2 of Quartz supported cron that's equivalent to the original linux cron
        Throws:
        IllegalArgumentException - when a linux cron cannot be parsed into a valid Quartz spec
      • start

        public boolean start​(ConfigManager configManager,
                             Modeler modeler)
        Start the scheduler, returning true if newly started.
      • shutdown

        public void shutdown()
        Shut down the scheduler.
      • syncTriggers

        public void syncTriggers()
        Synchronize triggers to the current topology, adding/updating/deleting them as necessary. This updates scheduledJobKeys.
      • performRRM

        protected void performRRM​(String zone)
        Run RRM algorithms for the given zone.