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
1 changed files with 5 additions and 0 deletions

View File

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