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 YARN-3655. FairScheduler: potential livelock due to maxAMShare limitation
and container reservation. (Zhihai Xu via kasha) 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 Release 2.7.1 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -622,7 +622,8 @@ public void transition(RMNodeImpl rmNode, RMNodeEvent event) {
rmNode.httpPort = newNode.getHttpPort(); rmNode.httpPort = newNode.getHttpPort();
rmNode.httpAddress = newNode.getHttpAddress(); rmNode.httpAddress = newNode.getHttpAddress();
boolean isCapabilityChanged = false; boolean isCapabilityChanged = false;
if (rmNode.getTotalCapability() != newNode.getTotalCapability()) { if (!rmNode.getTotalCapability().equals(
newNode.getTotalCapability())) {
rmNode.totalCapability = newNode.getTotalCapability(); rmNode.totalCapability = newNode.getTotalCapability();
isCapabilityChanged = true; isCapabilityChanged = true;
} }