private static void applyComponentOverrides(
    Map<ProvisionStep, List<Predicate>> servicePredicatesByStep,
    Predicate serviceNamePredicate,
    Map<ProvisionStep, List<Predicate>> componentPredicatesByStep
  ) {
    Function<Predicate, Predicate> andServiceNameMatches = and(serviceNamePredicate);
    for (Map.Entry<ProvisionStep, List<Predicate>> entry : componentPredicatesByStep.entrySet()) {
      ProvisionStep step = entry.getKey();
      List<Predicate> componentPredicates = entry.getValue();
      anyOf(componentPredicates).map(andServiceNameMatches).ifPresent(predicate ->
        servicePredicatesByStep.computeIfAbsent(step, __ -> new LinkedList<>()).add(predicate)
      );
    }
  }
Creates a service-level predicate for each step in the form of:
<pre>service_name=... AND (component1 predicate OR component2 predicate OR ...)</pre>
The result is appended to the list of predicates corresponding to each step in {@code servicePredicatesByStep}.

@param servicePredicatesByStep step -> service predicates
@param serviceNamePredicate predicate for service_name=...
@param componentPredicatesByStep step -> component predicates
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/ProvisionActionPredicateBuilder.java