/** * Helper method to handle Schedulabes with fixed fairshares. * Returns the resources taken by fixed fairshare schedulables, * and adds the remaining to the passed nonFixedSchedulables. */ private static int handleFixedFairShares( Collection<? extends Schedulable> schedulables, Collection<Schedulable> nonFixedSchedulables, boolean isSteadyShare, ResourceType type) { int totalResource = 0; for (Schedulable sched : schedulables) { int fixedShare = getFairShareIfFixed(sched, isSteadyShare, type); if (fixedShare < 0) { nonFixedSchedulables.add(sched); } else { setResourceValue(fixedShare, isSteadyShare ? ((FSQueue)sched).getSteadyFairShare() : sched.getFairShare(), type); totalResource = (int) Math.min((long)totalResource + (long)fixedShare, Integer.MAX_VALUE); } } return totalResource; }
/** * Helper method to handle Schedulabes with fixed fairshares. * Returns the resources taken by fixed fairshare schedulables, * and adds the remaining to the passed nonFixedSchedulables. */ private static int handleFixedFairShares( Collection<? extends Schedulable> schedulables, Collection<Schedulable> nonFixedSchedulables, boolean isSteadyShare, String type) { int totalResource = 0; for (Schedulable sched : schedulables) { long fixedShare = getFairShareIfFixed(sched, isSteadyShare, type); if (fixedShare < 0) { nonFixedSchedulables.add(sched); } else { Resource target; if (isSteadyShare) { target = ((FSQueue)sched).getSteadyFairShare(); } else { target = sched.getFairShare(); } target.setResourceValue(type, fixedShare); totalResource = (int) Math.min((long)totalResource + (long)fixedShare, Integer.MAX_VALUE); } } return totalResource; }
/** * Helper method to handle Schedulabes with fixed fairshares. * Returns the resources taken by fixed fairshare schedulables, * and adds the remaining to the passed nonFixedSchedulables. */ private static int handleFixedFairShares( Collection<? extends Schedulable> schedulables, Collection<Schedulable> nonFixedSchedulables, boolean isSteadyShare, ResourceType type) { int totalResource = 0; for (Schedulable sched : schedulables) { int fixedShare = getFairShareIfFixed(sched, isSteadyShare, type); if (fixedShare < 0) { nonFixedSchedulables.add(sched); } else { setResourceValue(fixedShare, isSteadyShare ? ((FSQueue)sched).getSteadyFairShare() : sched.getFairShare(), type); totalResource = (int) Math.min((long)totalResource + (long)fixedShare, Integer.MAX_VALUE); } } return totalResource; }
void recomputeSteadyShares() { readLock.lock(); try { policy.computeSteadyShares(childQueues, getSteadyFairShare()); for (FSQueue childQueue : childQueues) { childQueue.getMetrics() .setSteadyFairShare(childQueue.getSteadyFairShare()); if (childQueue instanceof FSParentQueue) { ((FSParentQueue) childQueue).recomputeSteadyShares(); } } } finally { readLock.unlock(); } }
public void recomputeSteadyShares() { policy.computeSteadyShares(childQueues, getSteadyFairShare()); for (FSQueue childQueue : childQueues) { childQueue.getMetrics().setSteadyFairShare(childQueue.getSteadyFairShare()); if (childQueue instanceof FSParentQueue) { ((FSParentQueue) childQueue).recomputeSteadyShares(); } } }
public void recomputeSteadyShares() { policy.computeSteadyShares(childQueues, getSteadyFairShare()); for (FSQueue childQueue : childQueues) { childQueue.getMetrics().setSteadyFairShare(childQueue.getSteadyFairShare()); if (childQueue instanceof FSParentQueue) { ((FSParentQueue) childQueue).recomputeSteadyShares(); } } }
target = ((FSQueue) sched).getSteadyFairShare(); } else { target = sched.getFairShare();
if (isSteadyShare) { setResourceValue(computeShare(sched, right, type), ((FSQueue) sched).getSteadyFairShare(), type); } else { setResourceValue(
if (isSteadyShare) { setResourceValue(computeShare(sched, right, type), ((FSQueue) sched).getSteadyFairShare(), type); } else { setResourceValue(
clusterResources.getMemory(); steadyFairResources = new ResourceInfo(queue.getSteadyFairShare()); fairResources = new ResourceInfo(queue.getFairShare()); minResources = new ResourceInfo(queue.getMinShare());
clusterResources.getMemory(); steadyFairResources = new ResourceInfo(queue.getSteadyFairShare()); fairResources = new ResourceInfo(queue.getFairShare()); minResources = new ResourceInfo(queue.getMinShare());
clusterResources.getMemorySize(); steadyFairResources = new ResourceInfo(queue.getSteadyFairShare()); fairResources = new ResourceInfo(queue.getFairShare()); minResources = new ResourceInfo(queue.getMinShare());