private static boolean isComponentExcluded(Service service, ComponentExclude componentExclude, ServiceComponent component) {
    return component.getServiceComponentHosts().isEmpty()
      || componentExclude.shouldExclude(service.getName(), component.getName(), component.getServiceComponentHosts().values());
  }
Get all identities of the installed services and components. Skip service or component that is excluded.
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/UsedIdentities.java