diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java index 39c8e13..60f701b 100644 --- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java +++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java @@ -18,12 +18,10 @@ package org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair; -import java.io.Serializable; import java.text.DecimalFormat; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collection; -import java.util.Comparator; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -81,7 +79,6 @@ private FairScheduler scheduler; private FSQueue fsQueue; private Resource fairShare = Resources.createResource(0, 0); - private RMContainerComparator comparator = new RMContainerComparator(); // Preemption related variables private Resource fairshareStarvation = Resources.none(); @@ -121,7 +118,7 @@ public FSAppAttempt(FairScheduler scheduler, this.resourceWeights = new ResourceWeights(); } - public ResourceWeights getResourceWeights() { + ResourceWeights getResourceWeights() { return resourceWeights; } @@ -132,7 +129,7 @@ public QueueMetrics getMetrics() { return queue.getMetrics(); } - public void containerCompleted(RMContainer rmContainer, + void containerCompleted(RMContainer rmContainer, ContainerStatus containerStatus, RMContainerEventType event) { try { writeLock.lock(); @@ -461,7 +458,7 @@ public RMContainer allocate(NodeType type, FSSchedulerNode node, * @param schedulerKey Scheduler Key * @param level NodeType */ - public void resetAllowedLocalityLevel( + void resetAllowedLocalityLevel( SchedulerRequestKey schedulerKey, NodeType level) { NodeType old; try { @@ -483,45 +480,45 @@ public FSLeafQueue getQueue() { } // Preemption related methods - public Resource getStarvation() { + Resource getStarvation() { return Resources.add(fairshareStarvation, minshareStarvation); } - public void setMinshareStarvation(Resource starvation) { + void setMinshareStarvation(Resource starvation) { this.minshareStarvation = starvation; } - public void resetMinshareStarvation() { + void resetMinshareStarvation() { this.minshareStarvation = Resources.none(); } - public void addPreemption(RMContainer container) { + void addPreemption(RMContainer container) { containersToPreempt.add(container); Resources.addTo(preemptedResources, container.getAllocatedResource()); } - public Set getPreemptionContainers() { + Set getPreemptionContainers() { return containersToPreempt; } - public Resource getPreemptedResources() { + private Resource getPreemptedResources() { return preemptedResources; } - public void resetPreemptedResources() { + void resetPreemptedResources() { preemptedResources = Resources.createResource(0); for (RMContainer container : getPreemptionContainers()) { Resources.addTo(preemptedResources, container.getAllocatedResource()); } } - public void clearPreemptedResources() { + void clearPreemptedResources() { preemptedResources.setMemorySize(0); preemptedResources.setVirtualCores(0); } - public boolean canContainerBePreempted(RMContainer container) { + boolean canContainerBePreempted(RMContainer container) { // Sanity check that the app owns this container if (!getLiveContainersMap().containsKey(container.getContainerId()) && !newlyAllocatedContainers.contains(container)) { @@ -555,7 +552,7 @@ public boolean canContainerBePreempted(RMContainer container) { * @param schedulerKey Scheduler Key * @return Container */ - public Container createContainer(FSSchedulerNode node, Resource capability, + private Container createContainer(FSSchedulerNode node, Resource capability, SchedulerRequestKey schedulerKey) { NodeId nodeId = node.getRMNode().getNodeID(); @@ -563,12 +560,10 @@ public Container createContainer(FSSchedulerNode node, Resource capability, getApplicationAttemptId(), getNewContainerId()); // Create the container - Container container = BuilderUtils.newContainer(containerId, nodeId, + return BuilderUtils.newContainer(containerId, nodeId, node.getRMNode().getHttpAddress(), capability, schedulerKey.getPriority(), null, schedulerKey.getAllocationRequestId()); - - return container; } /** @@ -813,7 +808,8 @@ private Resource assignContainer(FSSchedulerNode node, boolean reserved) { } Collection keysToTry = (reserved) ? - Arrays.asList(node.getReservedContainer().getReservedSchedulerKey()) : + Collections.singletonList( + node.getReservedContainer().getReservedSchedulerKey()) : getSchedulerKeys(); // For each priority, see if we can schedule a node local, rack local @@ -938,7 +934,7 @@ private boolean isValidReservation(FSSchedulerNode node) { * Node that the application has an existing reservation on * @return whether the reservation on the given node is valid. */ - public boolean assignReservedContainer(FSSchedulerNode node) { + boolean assignReservedContainer(FSSchedulerNode node) { RMContainer rmContainer = node.getReservedContainer(); SchedulerRequestKey reservedSchedulerKey = rmContainer.getReservedSchedulerKey(); @@ -967,19 +963,6 @@ public boolean assignReservedContainer(FSSchedulerNode node) { return true; } - static class RMContainerComparator implements Comparator, - Serializable { - @Override - public int compare(RMContainer c1, RMContainer c2) { - int ret = c1.getContainer().getPriority().compareTo( - c2.getContainer().getPriority()); - if (ret == 0) { - return c2.getContainerId().compareTo(c1.getContainerId()); - } - return ret; - } - } - /** * Helper method that computes the extent of fairshare fairshareStarvation. */ @@ -1006,7 +989,7 @@ Resource fairShareStarvation() { return this.fairshareStarvation; } - public ResourceRequest getNextResourceRequest() { + ResourceRequest getNextResourceRequest() { return appSchedulingInfo.getNextResourceRequest(); } @@ -1103,25 +1086,4 @@ public Resource assignContainer(FSSchedulerNode node) { } return assignContainer(node, false); } - - /** - * Preempt a running container according to the priority - */ - @Override - public RMContainer preemptContainer() { - if (LOG.isDebugEnabled()) { - LOG.debug("App " + getName() + " is going to preempt a running " + - "container"); - } - - RMContainer toBePreempted = null; - for (RMContainer container : getLiveContainers()) { - if (!getPreemptionContainers().contains(container) && - (toBePreempted == null || - comparator.compare(toBePreempted, container) > 0)) { - toBePreempted = container; - } - } - return toBePreempted; - } } diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSLeafQueue.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSLeafQueue.java index e63616b..37d14c1 100644 --- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSLeafQueue.java +++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSLeafQueue.java @@ -21,7 +21,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import java.util.Comparator; import java.util.List; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; @@ -72,7 +71,7 @@ private Resource amResourceUsage; private final ActiveUsersManager activeUsersManager; - public static final List EMPTY_LIST = Collections.emptyList(); + private static final List EMPTY_LIST = Collections.emptyList(); public FSLeafQueue(String name, FairScheduler scheduler, FSParentQueue parent) { @@ -84,7 +83,7 @@ public FSLeafQueue(String name, FairScheduler scheduler, amResourceUsage = Resource.newInstance(0, 0); } - public void addApp(FSAppAttempt app, boolean runnable) { + void addApp(FSAppAttempt app, boolean runnable) { writeLock.lock(); try { if (runnable) { @@ -111,7 +110,7 @@ void addAppSchedulable(FSAppAttempt appSched) { * Removes the given app from this queue. * @return whether or not the app was runnable */ - public boolean removeApp(FSAppAttempt app) { + boolean removeApp(FSAppAttempt app) { boolean runnable = false; // Remove app from runnable/nonRunnable list while holding the write lock @@ -142,7 +141,7 @@ public boolean removeApp(FSAppAttempt app) { * Removes the given app if it is non-runnable and belongs to this queue * @return true if the app is removed, false otherwise */ - public boolean removeNonRunnableApp(FSAppAttempt app) { + boolean removeNonRunnableApp(FSAppAttempt app) { writeLock.lock(); try { return nonRunnableApps.remove(app); @@ -151,7 +150,7 @@ public boolean removeNonRunnableApp(FSAppAttempt app) { } } - public boolean isRunnableApp(FSAppAttempt attempt) { + boolean isRunnableApp(FSAppAttempt attempt) { readLock.lock(); try { return runnableApps.contains(attempt); @@ -160,7 +159,7 @@ public boolean isRunnableApp(FSAppAttempt attempt) { } } - public boolean isNonRunnableApp(FSAppAttempt attempt) { + boolean isNonRunnableApp(FSAppAttempt attempt) { readLock.lock(); try { return nonRunnableApps.contains(attempt); @@ -169,30 +168,8 @@ public boolean isNonRunnableApp(FSAppAttempt attempt) { } } - public void resetPreemptedResources() { - readLock.lock(); - try { - for (FSAppAttempt attempt : runnableApps) { - attempt.resetPreemptedResources(); - } - } finally { - readLock.unlock(); - } - } - - public void clearPreemptedResources() { - readLock.lock(); - try { - for (FSAppAttempt attempt : runnableApps) { - attempt.clearPreemptedResources(); - } - } finally { - readLock.unlock(); - } - } - - public List getCopyOfNonRunnableAppSchedulables() { - List appsToReturn = new ArrayList(); + List getCopyOfNonRunnableAppSchedulables() { + List appsToReturn = new ArrayList<>(); readLock.lock(); try { appsToReturn.addAll(nonRunnableApps); @@ -320,7 +297,7 @@ public Resource getResourceUsage() { return usage; } - public Resource getAmResourceUsage() { + Resource getAmResourceUsage() { return amResourceUsage; } @@ -412,42 +389,6 @@ public Resource assignContainer(FSSchedulerNode node) { } @Override - public RMContainer preemptContainer() { - RMContainer toBePreempted = null; - - // If this queue is not over its fair share, reject - if (!preemptContainerPreCheck()) { - return toBePreempted; - } - - if (LOG.isDebugEnabled()) { - LOG.debug("Queue " + getName() + " is going to preempt a container " + - "from its applications."); - } - - // Choose the app that is most over fair share - Comparator comparator = policy.getComparator(); - FSAppAttempt candidateSched = null; - readLock.lock(); - try { - for (FSAppAttempt sched : runnableApps) { - if (candidateSched == null || - comparator.compare(sched, candidateSched) > 0) { - candidateSched = sched; - } - } - } finally { - readLock.unlock(); - } - - // Preempt from the selected app - if (candidateSched != null) { - toBePreempted = candidateSched.preemptContainer(); - } - return toBePreempted; - } - - @Override public List getChildQueues() { return EMPTY_LIST; } @@ -456,7 +397,7 @@ public RMContainer preemptContainer() { public List getQueueUserAclInfo(UserGroupInformation user) { QueueUserACLInfo userAclInfo = recordFactory.newRecordInstance(QueueUserACLInfo.class); - List operations = new ArrayList(); + List operations = new ArrayList<>(); for (QueueACL operation : QueueACL.values()) { if (hasAccess(operation, user)) { operations.add(operation); @@ -468,10 +409,6 @@ public RMContainer preemptContainer() { return Collections.singletonList(userAclInfo); } - public long getLastTimeAtMinShare() { - return lastTimeAtMinShare; - } - private void setLastTimeAtMinShare(long lastTimeAtMinShare) { this.lastTimeAtMinShare = lastTimeAtMinShare; } @@ -486,7 +423,7 @@ public int getNumRunnableApps() { } } - public int getNumNonRunnableApps() { + int getNumNonRunnableApps() { readLock.lock(); try { return nonRunnableApps.size(); @@ -538,10 +475,11 @@ public ActiveUsersManager getActiveUsersManager() { /** * Check whether this queue can run this application master under the * maxAMShare limit. - * @param amResource + * + * @param amResource resources required to run the AM * @return true if this queue can run */ - public boolean canRunAppAM(Resource amResource) { + boolean canRunAppAM(Resource amResource) { if (Math.abs(maxAMShare - -1.0f) < 0.0001) { return true; } @@ -566,7 +504,7 @@ public boolean canRunAppAM(Resource amResource) { return Resources.fitsIn(ifRunAMResource, maxAMResource); } - public void addAMResourceUsage(Resource amResource) { + void addAMResourceUsage(Resource amResource) { if (amResource != null) { Resources.addTo(amResourceUsage, amResource); } @@ -588,16 +526,6 @@ public void setWeights(float weight) { } /** - * Helper method to check if the queue should preempt containers - * - * @return true if check passes (can preempt) or false otherwise - */ - private boolean preemptContainerPreCheck() { - return parent.getPolicy().checkIfUsageOverFairShare(getResourceUsage(), - getFairShare()); - } - - /** * Helper method to compute the amount of minshare starvation. * * @return the extent of minshare starvation diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSParentQueue.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSParentQueue.java index 01ff582..ff8a002 100644 --- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSParentQueue.java +++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSParentQueue.java @@ -21,7 +21,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import java.util.Comparator; import java.util.List; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; @@ -61,7 +60,7 @@ public FSParentQueue(String name, FairScheduler scheduler, super(name, scheduler, parent); } - public void addChildQueue(FSQueue child) { + void addChildQueue(FSQueue child) { writeLock.lock(); try { childQueues.add(child); @@ -70,7 +69,7 @@ public void addChildQueue(FSQueue child) { } } - public void removeChildQueue(FSQueue child) { + void removeChildQueue(FSQueue child) { writeLock.lock(); try { childQueues.remove(child); @@ -93,7 +92,7 @@ public void updateInternal(boolean checkStarvation) { } } - public void recomputeSteadyShares() { + void recomputeSteadyShares() { readLock.lock(); try { policy.computeSteadyShares(childQueues, getSteadyFairShare()); @@ -190,7 +189,7 @@ private QueueUserACLInfo getUserAclInfo(UserGroupInformation user) { @Override public List getQueueUserAclInfo(UserGroupInformation user) { - List userAcls = new ArrayList(); + List userAcls = new ArrayList<>(); // Add queue acls userAcls.add(getUserAclInfo(user)); @@ -248,39 +247,6 @@ public Resource assignContainer(FSSchedulerNode node) { } @Override - public RMContainer preemptContainer() { - RMContainer toBePreempted = null; - - // Find the childQueue which is most over fair share - FSQueue candidateQueue = null; - Comparator comparator = policy.getComparator(); - - readLock.lock(); - try { - for (FSQueue queue : childQueues) { - // Skip selection for non-preemptable queue - if (!queue.isPreemptable()) { - if (LOG.isDebugEnabled()) { - LOG.debug("skipping from queue=" + getName() - + " because it's a non-preemptable queue"); - } - } else if (candidateQueue == null || - comparator.compare(queue, candidateQueue) > 0) { - candidateQueue = queue; - } - } - } finally { - readLock.unlock(); - } - - // Let the selected queue choose which of its container to preempt - if (candidateQueue != null) { - toBePreempted = candidateQueue.preemptContainer(); - } - return toBePreempted; - } - - @Override public List getChildQueues() { readLock.lock(); try { @@ -303,7 +269,7 @@ public void setPolicy(SchedulingPolicy policy) super.policy = policy; } - public void incrementRunnableApps() { + void incrementRunnableApps() { writeLock.lock(); try { runnableApps++; @@ -312,7 +278,7 @@ public void incrementRunnableApps() { } } - public void decrementRunnableApps() { + void decrementRunnableApps() { writeLock.lock(); try { runnableApps--; diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSQueue.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSQueue.java index e1e528e..572b5f9 100644 --- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSQueue.java +++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSQueue.java @@ -253,7 +253,7 @@ public Resource getSteadyFairShare() { return steadyFairShare; } - public void setSteadyFairShare(Resource steadyFairShare) { + void setSteadyFairShare(Resource steadyFairShare) { this.steadyFairShare = steadyFairShare; metrics.setSteadyFairShare(steadyFairShare); } @@ -262,27 +262,27 @@ public boolean hasAccess(QueueACL acl, UserGroupInformation user) { return scheduler.getAllocationConfiguration().hasAccess(name, acl, user); } - public long getFairSharePreemptionTimeout() { + long getFairSharePreemptionTimeout() { return fairSharePreemptionTimeout; } - public void setFairSharePreemptionTimeout(long fairSharePreemptionTimeout) { + void setFairSharePreemptionTimeout(long fairSharePreemptionTimeout) { this.fairSharePreemptionTimeout = fairSharePreemptionTimeout; } - public long getMinSharePreemptionTimeout() { + long getMinSharePreemptionTimeout() { return minSharePreemptionTimeout; } - public void setMinSharePreemptionTimeout(long minSharePreemptionTimeout) { + void setMinSharePreemptionTimeout(long minSharePreemptionTimeout) { this.minSharePreemptionTimeout = minSharePreemptionTimeout; } - public float getFairSharePreemptionThreshold() { + float getFairSharePreemptionThreshold() { return fairSharePreemptionThreshold; } - public void setFairSharePreemptionThreshold(float fairSharePreemptionThreshold) { + void setFairSharePreemptionThreshold(float fairSharePreemptionThreshold) { this.fairSharePreemptionThreshold = fairSharePreemptionThreshold; } @@ -297,7 +297,7 @@ public boolean isPreemptable() { * @param checkStarvation whether to check for fairshare or minshare * starvation on update */ - public abstract void updateInternal(boolean checkStarvation); + abstract void updateInternal(boolean checkStarvation); public void update(Resource fairShare, boolean checkStarvation) { setFairShare(fairShare); @@ -355,7 +355,7 @@ public abstract void collectSchedulerApplications( * * @return true if check passes (can assign) or false otherwise */ - protected boolean assignContainerPreCheck(FSSchedulerNode node) { + boolean assignContainerPreCheck(FSSchedulerNode node) { if (!Resources.fitsIn(getResourceUsage(), maxShare) || node.getReservedContainer() != null) { return false; @@ -411,7 +411,7 @@ public Priority getDefaultApplicationPriority() { return null; } - public boolean fitsInMaxShare(Resource additionalResource) { + boolean fitsInMaxShare(Resource additionalResource) { Resource usagePlusAddition = Resources.add(getResourceUsage(), additionalResource); diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/Schedulable.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/Schedulable.java index 289887f..cf78405 100644 --- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/Schedulable.java +++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/Schedulable.java @@ -55,50 +55,45 @@ * Name of job/queue, used for debugging as well as for breaking ties in * scheduling order deterministically. */ - public String getName(); + String getName(); /** * Maximum number of resources required by this Schedulable. This is defined as * number of currently utilized resources + number of unlaunched resources (that * are either not yet launched or need to be speculated). */ - public Resource getDemand(); + Resource getDemand(); /** Get the aggregate amount of resources consumed by the schedulable. */ - public Resource getResourceUsage(); + Resource getResourceUsage(); /** Minimum Resource share assigned to the schedulable. */ - public Resource getMinShare(); + Resource getMinShare(); /** Maximum Resource share assigned to the schedulable. */ - public Resource getMaxShare(); + Resource getMaxShare(); /** Job/queue weight in fair sharing. */ - public ResourceWeights getWeights(); + ResourceWeights getWeights(); /** Start time for jobs in FIFO queues; meaningless for QueueSchedulables.*/ - public long getStartTime(); + long getStartTime(); /** Job priority for jobs in FIFO queues; meaningless for QueueSchedulables. */ - public Priority getPriority(); + Priority getPriority(); /** Refresh the Schedulable's demand and those of its children if any. */ - public void updateDemand(); + void updateDemand(); /** * Assign a container on this node if possible, and return the amount of * resources assigned. */ - public Resource assignContainer(FSSchedulerNode node); - - /** - * Preempt a container from this Schedulable if possible. - */ - public RMContainer preemptContainer(); + Resource assignContainer(FSSchedulerNode node); /** Get the fair share assigned to this Schedulable. */ - public Resource getFairShare(); + Resource getFairShare(); /** Assign a fair share to this Schedulable. */ - public void setFairShare(Resource fairShare); + void setFairShare(Resource fairShare); } diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FakeSchedulable.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FakeSchedulable.java index 5a170cf..e802f42 100644 --- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FakeSchedulable.java +++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FakeSchedulable.java @@ -86,11 +86,6 @@ public Resource assignContainer(FSSchedulerNode node) { } @Override - public RMContainer preemptContainer() { - return null; - } - - @Override public Resource getFairShare() { return this.fairShare; }