ResourceInstance createComponentResource(String clusterName, String serviceName, String componentName) {
    Map<Resource.Type,String> mapIds = new HashMap<>();
    mapIds.put(Resource.Type.Cluster, clusterName);
    mapIds.put(Resource.Type.Service, serviceName);
    mapIds.put(Resource.Type.Component, componentName);

    return createResource(Resource.Type.Component, mapIds);
  }
Create a component resource instance.


@param clusterName   cluster name
@param serviceName   service name
@param componentName component name

@return a component resource instance
ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java