Esempio n. 1
0
 /// <exception cref="System.IO.IOException"/>
 public ReservationQueue(CapacitySchedulerContext cs, string queueName, PlanQueue
                         parent)
     : base(cs, queueName, parent, null)
 {
     // the following parameters are common to all reservation in the plan
     UpdateQuotas(parent.GetUserLimitForReservation(), parent.GetUserLimitFactor(), parent
                  .GetMaxApplicationsForReservations(), parent.GetMaxApplicationsPerUserForReservation
                      ());
     this.parent = parent;
 }
Esempio n. 2
0
 /// <exception cref="System.IO.IOException"/>
 public override void Reinitialize(CSQueue newlyParsedQueue, Resource clusterResource
                                   )
 {
     lock (this)
     {
         // Sanity check
         if (!(newlyParsedQueue is Org.Apache.Hadoop.Yarn.Server.Resourcemanager.Scheduler.Capacity.ReservationQueue
               ) || !newlyParsedQueue.GetQueuePath().Equals(GetQueuePath()))
         {
             throw new IOException("Trying to reinitialize " + GetQueuePath() + " from " + newlyParsedQueue
                                   .GetQueuePath());
         }
         base.Reinitialize(newlyParsedQueue, clusterResource);
         CSQueueUtils.UpdateQueueStatistics(parent.schedulerContext.GetResourceCalculator(
                                                ), newlyParsedQueue, parent, parent.schedulerContext.GetClusterResource(), parent
                                            .schedulerContext.GetMinimumResourceCapability());
         UpdateQuotas(parent.GetUserLimitForReservation(), parent.GetUserLimitFactor(), parent
                      .GetMaxApplicationsForReservations(), parent.GetMaxApplicationsPerUserForReservation
                          ());
     }
 }