Exemplo n.º 1
0
        protected internal override void AssertReservationQueueExists(ReservationId r, double
                                                                      expectedCapacity, double expectedMaxCapacity)
        {
            FSLeafQueue q = fs.GetQueueManager().GetLeafQueue(plan.GetQueueName() + string.Empty
                                                              + "." + r, false);

            NUnit.Framework.Assert.IsNotNull(q);
            // For now we are setting both to same weight
            NUnit.Framework.Assert.AreEqual(expectedCapacity, q.GetWeights().GetWeight(ResourceType
                                                                                       .Memory), 0.01);
        }
Exemplo n.º 2
0
 public FairSchedulerInfo(FairScheduler fs)
 {
     // JAXB needs this
     scheduler = fs;
     rootQueue = new FairSchedulerQueueInfo(scheduler.GetQueueManager().GetRootQueue()
                                            , scheduler);
 }
Exemplo n.º 3
0
        protected internal override Queue GetPlanQueue(string planQueueName)
        {
            Queue planQueue = fs.GetQueueManager().GetParentQueue(planQueueName, false);

            if (planQueue == null)
            {
                Log.Error("The queue " + planQueueName + " cannot be found or is not a " + "ParentQueue"
                          );
            }
            return(planQueue);
        }
Exemplo n.º 4
0
 protected internal override Org.Apache.Hadoop.Yarn.Api.Records.Resource GetPlanQueueCapacity
     (string planQueueName)
 {
     return(fairScheduler.GetQueueManager().GetParentQueue(planQueueName, false).GetSteadyFairShare
                ());
 }