private static Predicate predicateForComponentHosts(String componentName, Set<String> hosts) {
    Preconditions.checkNotNull(hosts);
    Preconditions.checkArgument(!hosts.isEmpty());
    Set<Predicate> hostPredicates = hosts.stream().map(ProvisionActionPredicateBuilder::hostnameIs).collect(toSet());
    return anyOf(hostPredicates).map(and(componentNameIs(componentName))).get();
  }
Creates a predicate in the form of:
<pre>component_name=... AND (host_name=... OR host_name=... OR ...)</pre>

@param componentName component name
@param hosts set of host names
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/ProvisionActionPredicateBuilder.java