protected Long getClusterResourceId(Long clusterId) throws AmbariException {
    Cluster cluster = (clusterId == null) ? null : managementController.getClusters().getClusterById(clusterId);
    return (cluster == null) ? null : cluster.getResourceId();
  }
Gets the resource id for the cluster with the specified id

@param clusterId the id of the relevant cluster
@return the resource id or null if not found
@throws AmbariException if the cluster does not exist
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java