diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 92e1803d22b..41927d7dcc4 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -537,6 +537,9 @@ Release 2.7.0 - UNRELEASED http(s)://proxy addr:port/proxy/ to avoid duplicate sections. (Devaraj K via zjshen) + YARN-3160. Fix non-atomic operation on nodeUpdateQueue in RMNodeImpl. + (Chengbing Liu via junping_du) + Release 2.6.0 - 2014-11-18 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNodeImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNodeImpl.java index b3020b7677b..1bc98b28202 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNodeImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNodeImpl.java @@ -842,8 +842,9 @@ public class RMNodeImpl implements RMNode, EventHandler { public List pullContainerUpdates() { List latestContainerInfoList = new ArrayList(); - while(nodeUpdateQueue.peek() != null){ - latestContainerInfoList.add(nodeUpdateQueue.poll()); + UpdatedContainerInfo containerInfo; + while ((containerInfo = nodeUpdateQueue.poll()) != null) { + latestContainerInfoList.add(containerInfo); } this.nextHeartBeat = true; return latestContainerInfoList;