YARN-3780. Should use equals when compare Resource in

RMNodeImpl#ReconnectNodeTransition. Contributed by zhihai xu.
This commit is contained in:
Devaraj K 2015-06-08 11:54:55 +05:30
parent a6cb4894b4
commit c7ee6c151c
2 changed files with 5 additions and 1 deletions

View File

@ -501,6 +501,9 @@ Release 2.8.0 - UNRELEASED
YARN-3655. FairScheduler: potential livelock due to maxAMShare limitation
and container reservation. (Zhihai Xu via kasha)
YARN-3780. Should use equals when compare Resource in RMNodeImpl#ReconnectNodeTransition.
(zhihai xu via devaraj)
Release 2.7.1 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -622,7 +622,8 @@ public class RMNodeImpl implements RMNode, EventHandler<RMNodeEvent> {
rmNode.httpPort = newNode.getHttpPort();
rmNode.httpAddress = newNode.getHttpAddress();
boolean isCapabilityChanged = false;
if (rmNode.getTotalCapability() != newNode.getTotalCapability()) {
if (!rmNode.getTotalCapability().equals(
newNode.getTotalCapability())) {
rmNode.totalCapability = newNode.getTotalCapability();
isCapabilityChanged = true;
}