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); }
public FairSchedulerInfo(FairScheduler fs) { // JAXB needs this scheduler = fs; rootQueue = new FairSchedulerQueueInfo(scheduler.GetQueueManager().GetRootQueue() , scheduler); }
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); }
protected internal override Org.Apache.Hadoop.Yarn.Api.Records.Resource GetPlanQueueCapacity (string planQueueName) { return(fairScheduler.GetQueueManager().GetParentQueue(planQueueName, false).GetSteadyFairShare ()); }