YARN-10466.Fix NullPointerException in yarn-services Component.java. Contributed by D M Murali Krishna Reddy

(cherry picked from commit 413a4c3c05)
This commit is contained in:
Brahma Reddy Battula 2021-03-30 13:52:07 +05:30
parent bac1326e4e
commit 5358313f97

View File

@ -833,6 +833,11 @@ public void requestContainers(long count) {
targetExpressions.toArray(new TargetExpression[0])).build(); targetExpressions.toArray(new TargetExpression[0])).build();
break; break;
} }
if (constraint == null) {
LOG.info("[COMPONENT {}] Placement constraint: null ",
componentSpec.getName());
continue;
}
// The default AND-ed final composite constraint // The default AND-ed final composite constraint
if (finalConstraint != null) { if (finalConstraint != null) {
finalConstraint = PlacementConstraints finalConstraint = PlacementConstraints