@Override public void reinitialize(Configuration conf, RMContext rmContext) throws YarnException { // Validate if the scheduler is fair scheduler ResourceScheduler scheduler = rmContext.getScheduler(); if (!(scheduler instanceof FairScheduler)) { throw new YarnRuntimeException("Class " + scheduler.getClass().getCanonicalName() + " not instance of " + FairScheduler.class.getCanonicalName()); } fairScheduler = (FairScheduler) scheduler; this.conf = conf; super.reinitialize(conf, rmContext); }
@Override public void reinitialize(Configuration conf, RMContext rmContext) throws YarnException { // Validate if the scheduler is capacity based ResourceScheduler scheduler = rmContext.getScheduler(); if (!(scheduler instanceof CapacityScheduler)) { throw new YarnRuntimeException("Class " + scheduler.getClass().getCanonicalName() + " not instance of " + CapacityScheduler.class.getCanonicalName()); } capScheduler = (CapacityScheduler) scheduler; this.conf = conf; super.reinitialize(conf, rmContext); }
@Override public void reinitialize(Configuration conf, RMContext rmContext) throws YarnException { // Validate if the scheduler is fair scheduler ResourceScheduler scheduler = rmContext.getScheduler(); if (!(scheduler instanceof FairScheduler)) { throw new YarnRuntimeException("Class " + scheduler.getClass().getCanonicalName() + " not instance of " + FairScheduler.class.getCanonicalName()); } fairScheduler = (FairScheduler) scheduler; this.conf = conf; super.reinitialize(conf, rmContext); }
@Override public void reinitialize(Configuration conf, RMContext rmContext) throws YarnException { // Validate if the scheduler is capacity based ResourceScheduler scheduler = rmContext.getScheduler(); if (!(scheduler instanceof CapacityScheduler)) { throw new YarnRuntimeException("Class " + scheduler.getClass().getCanonicalName() + " not instance of " + CapacityScheduler.class.getCanonicalName()); } capScheduler = (CapacityScheduler) scheduler; this.conf = conf; super.reinitialize(conf, rmContext); }
@Override public void reinitialize(Configuration conf, RMContext rmContext) throws YarnException { // Validate if the scheduler is fair scheduler ResourceScheduler scheduler = rmContext.getScheduler(); if (!(scheduler instanceof FairScheduler)) { throw new YarnRuntimeException("Class " + scheduler.getClass().getCanonicalName() + " not instance of " + FairScheduler.class.getCanonicalName()); } fairScheduler = (FairScheduler) scheduler; this.conf = conf; super.reinitialize(conf, rmContext); }
@Override public void reinitialize(Configuration conf, RMContext rmContext) throws YarnException { // Validate if the scheduler is capacity based ResourceScheduler scheduler = rmContext.getScheduler(); if (!(scheduler instanceof CapacityScheduler)) { throw new YarnRuntimeException("Class " + scheduler.getClass().getCanonicalName() + " not instance of " + CapacityScheduler.class.getCanonicalName()); } capScheduler = (CapacityScheduler) scheduler; this.conf = conf; super.reinitialize(conf, rmContext); }
@Override public void serviceInit(Configuration conf) throws Exception { Configuration configuration = new Configuration(conf); reinitialize(configuration, rmContext); // Create the plan follower with the active plans planFollower = createPlanFollower(); if (planFollower != null) { planFollower.init(clock, scheduler, plans.values()); } super.serviceInit(conf); }
@Override public void serviceInit(Configuration conf) throws Exception { Configuration configuration = new Configuration(conf); reinitialize(configuration, rmContext); // Create the plan follower with the active plans planFollower = createPlanFollower(); if (planFollower != null) { planFollower.init(clock, scheduler, plans.values()); } super.serviceInit(conf); }
@Override public void serviceInit(Configuration conf) throws Exception { Configuration configuration = new Configuration(conf); reinitialize(configuration, rmContext); // Create the plan follower with the active plans planFollower = createPlanFollower(); if (planFollower != null) { planFollower.init(clock, scheduler, plans.values()); } super.serviceInit(conf); }
@Test public void testInitialize() throws IOException { try { reservationSystem.reinitialize(scheduler.getConfig(), rmContext); } catch (YarnException e) { Assert.fail(e.getMessage()); } if (getSchedulerType().equals(SchedulerType.CAPACITY)) { ReservationSystemTestUtil.validateReservationQueue(reservationSystem, ReservationSystemTestUtil.getReservationQueueName()); } else { ReservationSystemTestUtil.validateReservationQueue(reservationSystem, ReservationSystemTestUtil.getFullReservationQueueName()); } }
conf = scheduler.getConfig(); try { reservationSystem.reinitialize(conf, rmContext); } catch (YarnException e) { Assert.fail(e.getMessage()); reservationSystem.reinitialize(conf, rmContext); } catch (YarnException e) { Assert.fail(e.getMessage());