// throws Exception
public static void setupCluster(String uniqClusterName, String zkAddr, int numResources,
int numPartitionsPerResource, int numInstances, int replica, boolean doRebalance)
throws Exception
{
ZkClient zkClient = new ZkClient(zkAddr);
zkClient.setZkSerializer(new ZNRecordSerializer());
// String clusterName = CLUSTER_PREFIX + "_" + uniqClusterName;
String clusterName = uniqClusterName;
if (zkClient.exists("/" + clusterName))
{
LOG.warn("test cluster already exists:" + clusterName + ", test name:" + uniqClusterName
+ " is not unique or test has been run without cleaning up zk; deleting it");
zkClient.deleteRecursive("/" + clusterName);
}
if (_testInfoMap.containsKey(uniqClusterName))
{
LOG.warn("test info already exists:" + uniqClusterName