throws AmbariException {
checkLoaded();
w.lock();
try {
Cluster cluster = getCluster(clusterName);
if (!cluster.canBeRemoved()) {
throw new AmbariException("Could not delete cluster"
+ ", clusterName=" + clusterName);
}
LOG.info("Deleting cluster " + cluster.getClusterName());
cluster.delete();