YARN-4250. NPE in AppSchedulingInfo#isRequestLabelChanged. (Brahma Reddy Battula via rohithsharmaks)
(cherry picked from commit d6c8bad869
)
This commit is contained in:
parent
2dd9c475c4
commit
526be695c0
|
@ -888,6 +888,8 @@ Release 2.8.0 - UNRELEASED
|
|||
YARN-4255. container-executor does not clean up docker operation command files.
|
||||
(Sidharta Seethana via vvasudev)
|
||||
|
||||
YARN-4250. NPE in AppSchedulingInfo#isRequestLabelChanged. (Brahma Reddy Battula via rohithsharmaks)
|
||||
|
||||
Release 2.7.2 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -417,7 +417,15 @@ public class AppSchedulingInfo {
|
|||
ResourceRequest requestTwo) {
|
||||
String requestOneLabelExp = requestOne.getNodeLabelExpression();
|
||||
String requestTwoLabelExp = requestTwo.getNodeLabelExpression();
|
||||
return (!(requestOneLabelExp.equals(requestTwoLabelExp)));
|
||||
// First request label expression can be null and second request
|
||||
// is not null then we have to consider it as changed.
|
||||
if ((null == requestOneLabelExp) && (null != requestTwoLabelExp)) {
|
||||
return true;
|
||||
}
|
||||
// If the label is not matching between both request when
|
||||
// requestOneLabelExp is not null.
|
||||
return ((null != requestOneLabelExp) && !(requestOneLabelExp
|
||||
.equals(requestTwoLabelExp)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue