diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index e942e6689a..d60ceb467b 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -25,6 +25,9 @@ Release 2.5.0 - UNRELEASED YARN-1479. Invalid NaN values in Hadoop REST API JSON response (Chen He via jeagles) + YARN-1736. FS: AppSchedulable.assignContainer's priority argument is + redundant. (Naren Koneru via kasha) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AppSchedulable.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AppSchedulable.java index 146994b4f7..ac31fb5761 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AppSchedulable.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AppSchedulable.java @@ -203,7 +203,7 @@ public void unreserve(Priority priority, FSSchedulerNode node) { * sure the particular request should be facilitated by this node. */ private Resource assignContainer(FSSchedulerNode node, - Priority priority, ResourceRequest request, NodeType type, + ResourceRequest request, NodeType type, boolean reserved) { // How much does this request need? @@ -216,25 +216,25 @@ private Resource assignContainer(FSSchedulerNode node, if (reserved) { container = node.getReservedContainer().getContainer(); } else { - container = createContainer(app, node, capability, priority); + container = createContainer(app, node, capability, request.getPriority()); } // Can we allocate a container on this node? if (Resources.fitsIn(capability, available)) { // Inform the application of the new container for this request RMContainer allocatedContainer = - app.allocate(type, node, priority, request, container); + app.allocate(type, node, request.getPriority(), request, container); if (allocatedContainer == null) { // Did the application need this resource? if (reserved) { - unreserve(priority, node); + unreserve(request.getPriority(), node); } return Resources.none(); } // If we had previously made a reservation, delete it if (reserved) { - unreserve(priority, node); + unreserve(request.getPriority(), node); } // Inform the node @@ -244,7 +244,7 @@ private Resource assignContainer(FSSchedulerNode node, return container.getResource(); } else { // The desired container won't fit here, so reserve - reserve(priority, node, container, reserved); + reserve(request.getPriority(), node, container, reserved); return FairScheduler.CONTAINER_RESERVED; } @@ -307,8 +307,8 @@ private Resource assignContainer(FSSchedulerNode node, boolean reserved) { if (rackLocalRequest != null && rackLocalRequest.getNumContainers() != 0 && localRequest != null && localRequest.getNumContainers() != 0) { - return assignContainer(node, priority, - localRequest, NodeType.NODE_LOCAL, reserved); + return assignContainer(node, localRequest, + NodeType.NODE_LOCAL, reserved); } if (rackLocalRequest != null && !rackLocalRequest.getRelaxLocality()) { @@ -318,7 +318,7 @@ private Resource assignContainer(FSSchedulerNode node, boolean reserved) { if (rackLocalRequest != null && rackLocalRequest.getNumContainers() != 0 && (allowedLocality.equals(NodeType.RACK_LOCAL) || allowedLocality.equals(NodeType.OFF_SWITCH))) { - return assignContainer(node, priority, rackLocalRequest, + return assignContainer(node, rackLocalRequest, NodeType.RACK_LOCAL, reserved); } @@ -330,7 +330,7 @@ private Resource assignContainer(FSSchedulerNode node, boolean reserved) { if (offSwitchRequest != null && offSwitchRequest.getNumContainers() != 0 && allowedLocality.equals(NodeType.OFF_SWITCH)) { - return assignContainer(node, priority, offSwitchRequest, + return assignContainer(node, offSwitchRequest, NodeType.OFF_SWITCH, reserved); } }