private Map<String, ? extends Collection<String>> toServiceComponentFilter(List<Component> components) {
      if (components == null) {
        return null;
      }

      return components.stream().collect(groupingBy(Component::getServiceName, mapping(Component::getServiceComponentName, toSet())));
    }
Convert a collection of {@link Component}s to a service/component filter.

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