/** * Schedule the failure window * @param resources the resource tree * @throws BadConfigException if the window is out of range */ private void scheduleFailureWindowResets(ConfTree resources) throws BadConfigException { ResetFailureWindow reset = new ResetFailureWindow(rmOperationHandler); ConfTreeOperations ops = new ConfTreeOperations(resources); MapOperations globals = ops.getGlobalOptions(); long seconds = globals.getTimeRange(ResourceKeys.CONTAINER_FAILURE_WINDOW, ResourceKeys.DEFAULT_CONTAINER_FAILURE_WINDOW_DAYS, ResourceKeys.DEFAULT_CONTAINER_FAILURE_WINDOW_HOURS, ResourceKeys.DEFAULT_CONTAINER_FAILURE_WINDOW_MINUTES, 0); if (seconds > 0) { log.info( "Scheduling the failure window reset interval to every {} seconds", seconds); RenewingAction<ResetFailureWindow> renew = new RenewingAction<>( reset, seconds, seconds, TimeUnit.SECONDS, 0); actionQueues.renewing("failures", renew); } else { log.info("Failure window reset interval is not set"); } }
/** * Schedule the failure window * @param resources the resource tree * @throws BadConfigException if the window is out of range */ private void scheduleFailureWindowResets(ConfTree resources) throws BadConfigException { ResetFailureWindow reset = new ResetFailureWindow(rmOperationHandler); ConfTreeOperations ops = new ConfTreeOperations(resources); MapOperations globals = ops.getGlobalOptions(); long seconds = globals.getTimeRange(ResourceKeys.CONTAINER_FAILURE_WINDOW, ResourceKeys.DEFAULT_CONTAINER_FAILURE_WINDOW_DAYS, ResourceKeys.DEFAULT_CONTAINER_FAILURE_WINDOW_HOURS, ResourceKeys.DEFAULT_CONTAINER_FAILURE_WINDOW_MINUTES, 0); if (seconds > 0) { log.info( "Scheduling the failure window reset interval to every {} seconds", seconds); RenewingAction<ResetFailureWindow> renew = new RenewingAction<>( reset, seconds, seconds, TimeUnit.SECONDS, 0); actionQueues.renewing("failures", renew); } else { log.info("Failure window reset interval is not set"); } }
long monkeyInterval = internals.getTimeRange( InternalKeys.CHAOS_MONKEY_INTERVAL, InternalKeys.DEFAULT_CHAOS_MONKEY_INTERVAL_DAYS, long monkeyDelay = internals.getTimeRange( InternalKeys.CHAOS_MONKEY_DELAY, 0,
long monkeyInterval = internals.getTimeRange( InternalKeys.CHAOS_MONKEY_INTERVAL, InternalKeys.DEFAULT_CHAOS_MONKEY_INTERVAL_DAYS, long monkeyDelay = internals.getTimeRange( InternalKeys.CHAOS_MONKEY_DELAY, 0,