@SuppressWarnings("deprecation") private void triggerSchedulingAttempt() throws InterruptedException { Thread.sleep( 2 * scheduler.getConf().getContinuousSchedulingSleepMs()); } }
@SuppressWarnings("deprecation") FSPreemptionThread(FairScheduler scheduler) { setDaemon(true); setName("FSPreemptionThread"); this.scheduler = scheduler; this.context = scheduler.getContext(); FairSchedulerConfiguration fsConf = scheduler.getConf(); context.setPreemptionEnabled(); context.setPreemptionUtilizationThreshold( fsConf.getPreemptionUtilizationThreshold()); preemptionTimer = new Timer("Preemption Timer", true); warnTimeBeforeKill = fsConf.getWaitTimeBeforeKill(); long allocDelay = (fsConf.isContinuousSchedulingEnabled() ? 10 * fsConf.getContinuousSchedulingSleepMs() // 10 runs : 4 * scheduler.getNMHeartbeatInterval()); // 4 heartbeats delayBeforeNextStarvationCheck = warnTimeBeforeKill + allocDelay + fsConf.getWaitTimeBeforeNextStarvationCheck(); schedulerReadLock = scheduler.getSchedulerReadLock(); }
updateReservationThreshold(); continuousSchedulingEnabled = this.conf.isContinuousSchedulingEnabled(); continuousSchedulingSleepMs = this.conf.getContinuousSchedulingSleepMs(); nodeLocalityThreshold = this.conf.getLocalityThresholdNode(); rackLocalityThreshold = this.conf.getLocalityThresholdRack();
continuousSchedulingEnabled = this.conf.isContinuousSchedulingEnabled(); continuousSchedulingSleepMs = this.conf.getContinuousSchedulingSleepMs(); nodeLocalityThreshold = this.conf.getLocalityThresholdNode(); rackLocalityThreshold = this.conf.getLocalityThresholdRack();
continuousSchedulingEnabled = this.conf.isContinuousSchedulingEnabled(); continuousSchedulingSleepMs = this.conf.getContinuousSchedulingSleepMs(); nodeLocalityThreshold = this.conf.getLocalityThresholdNode(); rackLocalityThreshold = this.conf.getLocalityThresholdRack();
Thread.sleep(scheduler.getConf().getContinuousSchedulingSleepMs() + 500);