long archivalTime = tick - policy.getValidWindow(); ReservationInterval searchInterval = new ReservationInterval(archivalTime, archivalTime);
@Override public SharingPolicy getInitializedPolicy() { String reservationQ = ReservationSystemTestUtil.getFullReservationQueueName(); conf = new CapacitySchedulerConfiguration(); SharingPolicy policy = new NoOverCommitPolicy(); policy.init(reservationQ, conf); return policy; }
policy.validate(this, inMemReservation);
netAvailable = getSharingPolicy().availableResources(netAvailable, this, user, oldId, start, end); return netAvailable;
protected Plan initializePlan(String planQueueName) throws YarnException { String planQueuePath = getPlanQueuePath(planQueueName); SharingPolicy adPolicy = getAdmissionPolicy(planQueuePath); adPolicy.init(planQueuePath, getReservationSchedulerConfiguration()); // Calculate the max plan capacity Resource minAllocation = getMinAllocation(); Resource maxAllocation = getMaxAllocation(); ResourceCalculator rescCalc = getResourceCalculator(); Resource totCap = getPlanQueueCapacity(planQueueName); Plan plan = new InMemoryPlan(getRootQueueMetrics(), adPolicy, getAgent(planQueuePath), totCap, planStepSize, rescCalc, minAllocation, maxAllocation, planQueueName, getReplanner(planQueuePath), getReservationSchedulerConfiguration().getMoveOnExpiry(planQueuePath), maxPeriodicity, rmContext); LOG.info("Initialized plan {} based on reservable queue {}", plan.toString(), planQueueName); return plan; }
long archivalTime = tick - policy.getValidWindow(); ReservationInterval searchInterval = new ReservationInterval(archivalTime, archivalTime);
policy.validate(this, inMemReservation);
protected Plan initializePlan(String planQueueName) throws YarnException { String planQueuePath = getPlanQueuePath(planQueueName); SharingPolicy adPolicy = getAdmissionPolicy(planQueuePath); adPolicy.init(planQueuePath, getReservationSchedulerConfiguration()); // Calculate the max plan capacity Resource minAllocation = getMinAllocation(); Resource maxAllocation = getMaxAllocation(); ResourceCalculator rescCalc = getResourceCalculator(); Resource totCap = getPlanQueueCapacity(planQueueName); Plan plan = new InMemoryPlan(getRootQueueMetrics(), adPolicy, getAgent(planQueuePath), totCap, planStepSize, rescCalc, minAllocation, maxAllocation, planQueueName, getReplanner(planQueuePath), getReservationSchedulerConfiguration() .getMoveOnExpiry(planQueuePath)); LOG.info("Intialized plan {0} based on reservable queue {1}", plan.toString(), planQueueName); return plan; }
long archivalTime = tick - policy.getValidWindow(); ReservationInterval searchInterval = new ReservationInterval(archivalTime, archivalTime);
policy.validate(this, reservation); if (!removeReservation(currReservation)) { LOG.error("Unable to replace reservation: {} from plan.",
protected Plan initializePlan(String planQueueName) throws YarnException { String planQueuePath = getPlanQueuePath(planQueueName); SharingPolicy adPolicy = getAdmissionPolicy(planQueuePath); adPolicy.init(planQueuePath, getReservationSchedulerConfiguration()); // Calculate the max plan capacity Resource minAllocation = getMinAllocation(); Resource maxAllocation = getMaxAllocation(); ResourceCalculator rescCalc = getResourceCalculator(); Resource totCap = getPlanQueueCapacity(planQueueName); Plan plan = new InMemoryPlan(getRootQueueMetrics(), adPolicy, getAgent(planQueuePath), totCap, planStepSize, rescCalc, minAllocation, maxAllocation, planQueueName, getReplanner(planQueuePath), getReservationSchedulerConfiguration() .getMoveOnExpiry(planQueuePath)); LOG.info("Intialized plan {0} based on reservable queue {1}", plan.toString(), planQueueName); return plan; }
when(sharingPolicy.getValidWindow()).thenReturn(1L); try {
policy.validate(this, reservation); if (!removeReservation(currReservation)) { LOG.error("Unable to replace reservation: {} from plan.",
policy.init("root.dedicated", null);
when(policy.getValidWindow()).thenReturn(1L); try {
policy.validate(this, reservation); if (!removeReservation(currReservation)) { LOG.error("Unable to replace reservation: {} from plan.",
policy.init("root.dedicated", null);
policy.validate(this, inMemReservation);
instConstraint, avgConstraint); plan.getSharingPolicy().init(plan.getQueueName(), conf);