private Set<String> toHostFilter(List<Component> components) {
      if (components == null) {
        return null;
      }

      return components.stream().map(Component::getHostName).collect(toSet());
    }
Convert a collection of {@link Component}s to a host filter.

@param components the collection of relevant {@link Component}s
@return a set of hostnames of hosts to include in an operation
ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java