private void initializeNewPlans(Configuration conf) { LOG.info("Refreshing Reservation system"); writeLock.lock(); try { // Create a plan corresponding to every new reservable queue Set<String> planQueueNames = scheduler.getPlanQueues(); for (String planQueueName : planQueueNames) { if (!plans.containsKey(planQueueName)) { Plan plan = initializePlan(planQueueName); plans.put(planQueueName, plan); } else { LOG.warn("Plan based on reservation queue {0} already exists.", planQueueName); } } // Update the plan follower with the active plans if (planFollower != null) { planFollower.setPlans(plans.values()); } } catch (YarnException e) { LOG.warn("Exception while trying to refresh reservable queues", e); } finally { writeLock.unlock(); } }
private void initializeNewPlans(Configuration conf) { LOG.info("Refreshing Reservation system"); writeLock.lock(); try { // Create a plan corresponding to every new reservable queue Set<String> planQueueNames = scheduler.getPlanQueues(); for (String planQueueName : planQueueNames) { if (!plans.containsKey(planQueueName)) { Plan plan = initializePlan(planQueueName); plans.put(planQueueName, plan); } else { LOG.warn("Plan based on reservation queue {} already exists.", planQueueName); } } // Update the plan follower with the active plans if (planFollower != null) { planFollower.setPlans(plans.values()); } } catch (YarnException e) { LOG.warn("Exception while trying to refresh reservable queues", e); } finally { writeLock.unlock(); } }
private void initializeNewPlans(Configuration conf) { LOG.info("Refreshing Reservation system"); writeLock.lock(); try { // Create a plan corresponding to every new reservable queue Set<String> planQueueNames = scheduler.getPlanQueues(); for (String planQueueName : planQueueNames) { if (!plans.containsKey(planQueueName)) { Plan plan = initializePlan(planQueueName); plans.put(planQueueName, plan); } else { LOG.warn("Plan based on reservation queue {0} already exists.", planQueueName); } } // Update the plan follower with the active plans if (planFollower != null) { planFollower.setPlans(plans.values()); } } catch (YarnException e) { LOG.warn("Exception while trying to refresh reservable queues", e); } finally { writeLock.unlock(); } }
private void initialize(Configuration conf) throws YarnException { LOG.info("Initializing Reservation system"); this.conf = conf; scheduler = rmContext.getScheduler(); // Get the plan step size planStepSize = conf.getTimeDuration( YarnConfiguration.RM_RESERVATION_SYSTEM_PLAN_FOLLOWER_TIME_STEP, YarnConfiguration.DEFAULT_RM_RESERVATION_SYSTEM_PLAN_FOLLOWER_TIME_STEP, TimeUnit.MILLISECONDS); if (planStepSize < 0) { planStepSize = YarnConfiguration.DEFAULT_RM_RESERVATION_SYSTEM_PLAN_FOLLOWER_TIME_STEP; } // Create a plan corresponding to every reservable queue Set<String> planQueueNames = scheduler.getPlanQueues(); for (String planQueueName : planQueueNames) { Plan plan = initializePlan(planQueueName); plans.put(planQueueName, plan); } }
private void initialize(Configuration conf) throws YarnException { LOG.info("Initializing Reservation system"); this.conf = conf; scheduler = rmContext.getScheduler(); // Get the plan step size planStepSize = conf.getTimeDuration( YarnConfiguration.RM_RESERVATION_SYSTEM_PLAN_FOLLOWER_TIME_STEP, YarnConfiguration.DEFAULT_RM_RESERVATION_SYSTEM_PLAN_FOLLOWER_TIME_STEP, TimeUnit.MILLISECONDS); if (planStepSize < 0) { planStepSize = YarnConfiguration.DEFAULT_RM_RESERVATION_SYSTEM_PLAN_FOLLOWER_TIME_STEP; } // Create a plan corresponding to every reservable queue Set<String> planQueueNames = scheduler.getPlanQueues(); for (String planQueueName : planQueueNames) { Plan plan = initializePlan(planQueueName); plans.put(planQueueName, plan); } }
Plan plan = initializePlan(planQueueName); plans.put(planQueueName, plan);