Package org.apache.hadoop.hdfs

Examples of org.apache.hadoop.hdfs.MiniAvatarCluster.addNameNode()


    try {
      cluster = new MiniAvatarCluster(conf, 1, true, null, null, 1, true);
      DataNode dn = cluster.getDataNodes().get(0);
      assertEquals(dn.getAllNamespaceServices().length, 1);
     
      cluster.addNameNode(conf);
      assertEquals(dn.getAllNamespaceServices().length, 2);
     
      cluster.addNameNode(conf);
      assertEquals(dn.getAllNamespaceServices().length, 3);
     
View Full Code Here


      assertEquals(dn.getAllNamespaceServices().length, 1);
     
      cluster.addNameNode(conf);
      assertEquals(dn.getAllNamespaceServices().length, 2);
     
      cluster.addNameNode(conf);
      assertEquals(dn.getAllNamespaceServices().length, 3);
     
      cluster.addNameNode(conf);
      assertEquals(dn.getAllNamespaceServices().length, 4);
      int[] nns = null;
View Full Code Here

      assertEquals(dn.getAllNamespaceServices().length, 2);
     
      cluster.addNameNode(conf);
      assertEquals(dn.getAllNamespaceServices().length, 3);
     
      cluster.addNameNode(conf);
      assertEquals(dn.getAllNamespaceServices().length, 4);
      int[] nns = null;
      nns = new int[]{0, 1, 2, 3};
      compareAddress(cluster, dn, nns);
      nns = new int[]{0, 1};
View Full Code Here

      new MiniAvatarCluster(conf, 1, true, null, null, 1, true);
    try {
      DataNode dn = cluster.getDataNodes().get(0);
      assertEquals(dn.getAllNamespaceServices().length, 1);
     
      cluster.addNameNode(conf);
      assertEquals(dn.getAllNamespaceServices().length, 2);
     
      cluster.addNameNode(conf);
      assertEquals(dn.getAllNamespaceServices().length, 3);
     
View Full Code Here

      assertEquals(dn.getAllNamespaceServices().length, 1);
     
      cluster.addNameNode(conf);
      assertEquals(dn.getAllNamespaceServices().length, 2);
     
      cluster.addNameNode(conf);
      assertEquals(dn.getAllNamespaceServices().length, 3);
     
      cluster.addNameNode(conf);
      assertEquals(dn.getAllNamespaceServices().length, 4);
      int[] nns = null;
View Full Code Here

      assertEquals(dn.getAllNamespaceServices().length, 2);
     
      cluster.addNameNode(conf);
      assertEquals(dn.getAllNamespaceServices().length, 3);
     
      cluster.addNameNode(conf);
      assertEquals(dn.getAllNamespaceServices().length, 4);
      int[] nns = null;
      nns = new int[]{0, 1, 2, 3};
      compareAddress(cluster, dn, nns);
      nns = new int[]{0, 1};
View Full Code Here

    MiniAvatarCluster cluster = new MiniAvatarCluster(conf, 1, true, null, null, 2, true);
    Assert.assertNotNull(cluster);
    Assert.assertEquals("(1)Should be 2 namenodes", 2, cluster.getNumNameNodes());
   
    // add a node
    cluster.addNameNode(conf);
    Assert.assertEquals("(1)Should be 3 namenodes", 3, cluster.getNumNameNodes());
    cluster.shutDown();
       
    // 2. start with Federation flag set
    conf = new Configuration();
View Full Code Here

    cluster = new MiniAvatarCluster(conf, 1, true, null, null, 1, true);
    Assert.assertNotNull(cluster);
    Assert.assertEquals("(2)Should be 1 namenodes", 1, cluster.getNumNameNodes());
   
    // add a node
    cluster.addNameNode(conf);  
    Assert.assertEquals("(2)Should be 2 namenodes", 2, cluster.getNumNameNodes());
    cluster.shutDown();

    // 3. start non-federated
    conf = new Configuration();
View Full Code Here

    Assert.assertNotNull(cluster);
    Assert.assertEquals("(2)Should be 1 namenodes", 1, cluster.getNumNameNodes());
   
    // add a node
    try {
      cluster.addNameNode(conf);
      Assert.fail("shouldn't be able to add another NN to non federated cluster");
    } catch (IOException e) {
      // correct
      Assert.assertTrue(e.getMessage().startsWith("cannot add namenode"));
      Assert.assertEquals("(3)Should be 1 namenodes", 1, cluster.getNumNameNodes());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.