protected RequestStatusResponse deleteComponents(Set<ServiceComponentRequest> requests) throws AmbariException, AuthorizationException {
    Clusters clusters = getManagementController().getClusters();
    AmbariMetaInfo ambariMetaInfo = getManagementController().getAmbariMetaInfo();
    DeleteHostComponentStatusMetaData deleteMetaData = new DeleteHostComponentStatusMetaData();

    for (ServiceComponentRequest request : requests) {
      Validate.notEmpty(request.getComponentName(), "component name should be non-empty");
      Cluster cluster = getClusterForRequest(request, clusters);

      setServiceNameIfAbsent(request, cluster, ambariMetaInfo);

      Service s = getServiceFromCluster(request, cluster);

      ServiceComponent sc = s.getServiceComponent(request.getComponentName());

      if (sc != null) {
        deleteHostComponentsForServiceComponent(sc, request, deleteMetaData);
        STOMPComponentsDeleteHandler.processDeleteByMetaDataException(deleteMetaData);
        sc.setDesiredState(State.DISABLED);
        s.deleteServiceComponent(request.getComponentName(), deleteMetaData);
        STOMPComponentsDeleteHandler.processDeleteByMetaDataException(deleteMetaData);
      }
    }
    STOMPComponentsDeleteHandler.processDeleteByMetaData(deleteMetaData);
    return null;
  }
Get a component request object from a map of property values.

@param properties  the predicate

@return the component request object
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ComponentResourceProvider.java