private boolean isComponentSupported(String serviceName, String componentName, String stackName, String stackVersion) throws AmbariException {
    try {
      ComponentInfo component = metaInfo.get().getComponent(stackName, stackVersion, serviceName, componentName);
      return !component.isDeleted();
    } catch (StackAccessException e) {
      return false;
    }
  }
Collects the ServiceComponents from the cluster which are not supported (component doesn't exist or was deleted) in the given stack.
Non versionAdvertised components are ignored.
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentSupport.java