private Cluster getCluster(final ServiceComponentRequest request, final Clusters clusters) throws AmbariException {
    Validate.notEmpty(request.getClusterName(), "cluster name should be non-empty");

    try {
      return clusters.getCluster(request.getClusterName());
    } catch (ObjectNotFoundException e) {
      throw new ParentObjectNotFoundException("Parent Cluster resource doesn't exist", e);
    }

  }
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