Index: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java =================================================================== --- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java (revision 1464613) +++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java (working copy) @@ -124,7 +124,7 @@ private final ActiveUsersManager activeUsersManager; - private final int nodeLocalityDelay; + private int nodeLocalityDelay; public LeafQueue(CapacitySchedulerContext cs, String queueName, CSQueue parent, @@ -189,9 +189,6 @@ Map acls = cs.getConfiguration().getAcls(getQueuePath()); - - this.nodeLocalityDelay = - cs.getConfiguration().getNodeLocalityDelay(); setupQueueConfigs( cs.getClusterResources(), @@ -200,7 +197,7 @@ userLimit, userLimitFactor, maxApplications, maxApplicationsPerUser, maxActiveApplications, maxActiveApplicationsPerUser, - state, acls); + state, acls, cs.getConfiguration().getNodeLocalityDelay()); if(LOG.isDebugEnabled()) { LOG.debug("LeafQueue:" + " name=" + queueName @@ -219,7 +216,8 @@ int userLimit, float userLimitFactor, int maxApplications, int maxApplicationsPerUser, int maxActiveApplications, int maxActiveApplicationsPerUser, - QueueState state, Map acls) + QueueState state, Map acls, + int nodeLocalityDelay) { // Sanity check CSQueueUtils.checkMaxCapacity(getQueueName(), capacity, maximumCapacity); @@ -248,6 +246,8 @@ this.queueInfo.setCapacity(this.capacity); this.queueInfo.setMaximumCapacity(this.maximumCapacity); this.queueInfo.setQueueState(this.state); + + this.nodeLocalityDelay = nodeLocalityDelay; StringBuilder aclsString = new StringBuilder(); for (Map.Entry e : acls.entrySet()) { @@ -310,7 +310,8 @@ "state = " + state + " [= configuredState ]" + "\n" + "acls = " + aclsString + - " [= configuredAcls ]" + "\n"); + " [= configuredAcls ]" + "\n" + + "nodeLocalityDelay = " + nodeLocalityDelay + "\n"); } @Override @@ -596,7 +597,8 @@ newlyParsedLeafQueue.getMaxApplicationsPerUser(), newlyParsedLeafQueue.getMaximumActiveApplications(), newlyParsedLeafQueue.getMaximumActiveApplicationsPerUser(), - newlyParsedLeafQueue.state, newlyParsedLeafQueue.acls); + newlyParsedLeafQueue.state, newlyParsedLeafQueue.acls, + newlyParsedLeafQueue.getNodeLocalityDelay()); } @Override