throws IOException, ConfigException, InterruptedException{
MiniAvatarCluster cluster = new MiniAvatarCluster(conf, 1, true, null, null, 2, true);
try {
NameNodeInfo nn1 = cluster.getNameNode(0);
NameNodeInfo nn2 = cluster.getNameNode(1);
AvatarNode nn1zero = nn1.avatars.get(0).avatar;
AvatarNode nn1one = nn1.avatars.get(1).avatar;
AvatarNode nn2zero = nn2.avatars.get(0).avatar;
AvatarNode nn2one = nn2.avatars.get(1).avatar;
assertNotNull("cannot create nn1 avatar 0", nn1zero);
assertNotNull("cannot create nn1 avatar 1", nn1one);
assertNotNull("cannot create nn2 avatar 0", nn2zero);
assertNotNull("cannot create nn2 avatar 1", nn2one);
int ns1zero = nn1zero.getNamespaceID();
int ns1one = nn1one.getNamespaceID();
assertEquals("namespace ids for namenode 1 should be the same",
ns1zero, ns1one);
int ns2zero = nn2zero.getNamespaceID();
int ns2one = nn2one.getNamespaceID();
assertEquals("namespace ids for namenode 2 should be the same",
ns2zero, ns2one);
int lv1zero = nn1zero.getFSImage().getLayoutVersion();
int lv1one = nn1one.getFSImage().getLayoutVersion();
int lv2zero = nn2zero.getFSImage().getLayoutVersion();
int lv2one = nn2one.getFSImage().getLayoutVersion();
assertNotSame("namespace ids should be different", ns1zero, ns2zero);
LOG.info("nn1zero: lv=" + lv1zero + ";uri=" + nn1zero.getNameNodeAddress());
LOG.info("nn1one: lv=" + lv1one + ";uri=" + nn1one.getNameNodeAddress());
LOG.info("nn2zero: lv=" + lv2zero + ";uri=" + nn2zero.getNameNodeAddress());
LOG.info("nn2one: lv=" + lv2one + ";uri=" + nn2one.getNameNodeAddress());
// check number of volumes in fsdataset
AvatarDataNode dn = cluster.getDataNodes().get(0);
for (NamespaceService nsos : dn.getAllNamespaceServices()) {