YARN-3160. Fix non-atomic operation on nodeUpdateQueue in RMNodeImpl. (Contributed by Chengbing Liu)
This commit is contained in:
parent
a4ceea60f5
commit
c541a374d8
@ -537,6 +537,9 @@ Release 2.7.0 - UNRELEASED
|
||||
http(s)://proxy addr:port/proxy/<appId> 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
|
||||
|
@ -842,8 +842,9 @@ public NodeState transition(RMNodeImpl rmNode, RMNodeEvent event) {
|
||||
public List<UpdatedContainerInfo> pullContainerUpdates() {
|
||||
List<UpdatedContainerInfo> latestContainerInfoList =
|
||||
new ArrayList<UpdatedContainerInfo>();
|
||||
while(nodeUpdateQueue.peek() != null){
|
||||
latestContainerInfoList.add(nodeUpdateQueue.poll());
|
||||
UpdatedContainerInfo containerInfo;
|
||||
while ((containerInfo = nodeUpdateQueue.poll()) != null) {
|
||||
latestContainerInfoList.add(containerInfo);
|
||||
}
|
||||
this.nextHeartBeat = true;
|
||||
return latestContainerInfoList;
|
||||
|
Loading…
x
Reference in New Issue
Block a user