NodeGroupCreate[] ngs = new NodeGroupCreate[] { ng0, ng1, ng2 };
spec.setNodeGroups(ngs);
spec = ClusterSpecFactory.getCustomizedSpec(spec, null);
clusterConfigMgr.createClusterConfig(spec);
ClusterEntity cluster = clusterEntityMgr.findClusterById(1l);
List<ClusterEntity> cs = clusterEntityMgr.findAllClusters();
for (ClusterEntity c : cs) {
System.out.println(c.getId());
}
cluster = clusterEntityMgr.findByName("my-cluster-external-hdfs-failure");