Examples of addNameNode()


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

      BPOfferService [] bposs = dn.getAllBpOs();
      LOG.info("dn bpos len (should be 2):" + bposs.length);
      Assert.assertEquals("should've registered with two namenodes", bposs.length,2);
     
      // add another namenode
      cluster.addNameNode(conf, 9938);
      bposs = dn.getAllBpOs();
      LOG.info("dn bpos len (should be 3):" + bposs.length);
      Assert.assertEquals("should've registered with three namenodes", bposs.length,3);
     
      // change cluster id and another Namenode
View Full Code Here

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

      LOG.info("dn bpos len (should be 3):" + bposs.length);
      Assert.assertEquals("should've registered with three namenodes", bposs.length,3);
     
      // change cluster id and another Namenode
      StartupOption.FORMAT.setClusterId("DifferentCID");
      cluster.addNameNode(conf, 9948);
      NameNode nn4 = cluster.getNameNode(3);
      assertNotNull("cannot create nn4", nn4);
     
      bposs = dn.getAllBpOs();
      LOG.info("dn bpos len (still should be 3):" + bposs.length);
View Full Code Here

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

    try {
      Assert.assertNotNull(cluster);
      cluster.waitActive();
      Assert.assertEquals("(1)Should be 2 namenodes", 2, cluster.getNumNameNodes());

      cluster.addNameNode(conf, 0);
      Assert.assertEquals("(1)Should be 3 namenodes", 3, cluster.getNumNameNodes());
    } catch (IOException ioe) {
      Assert.fail("Failed to add NN to cluster:" + StringUtils.stringifyException(ioe));
    } finally {
      cluster.shutdown();
View Full Code Here

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

      Assert.assertNotNull(cluster);
      cluster.waitActive();
      Assert.assertEquals("(2)Should be 1 namenodes", 1, cluster.getNumNameNodes());
   
      // add a node
      cluster.addNameNode(conf, 0);
      Assert.assertEquals("(2)Should be 2 namenodes", 2, cluster.getNumNameNodes());
    } catch (IOException ioe) {
      Assert.fail("Failed to add NN to cluster:" + StringUtils.stringifyException(ioe));
    } finally {
      cluster.shutdown();
View Full Code Here

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

    try {
      cluster.waitActive();
      Assert.assertNotNull(cluster);
      Assert.assertEquals("(2)Should be 1 namenodes", 1, cluster.getNumNameNodes());

      cluster.addNameNode(conf, 9929);
      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

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

        .build();

      DataNode dn = cluster.getDataNodes().get(0);
      assertEquals(1, dn.getAllBpOs().length);

      cluster.addNameNode(conf, nnPort2);
      assertEquals(2, dn.getAllBpOs().length);

      cluster.addNameNode(conf, nnPort3);
      assertEquals(3, dn.getAllBpOs().length);
View Full Code Here

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

      assertEquals(1, dn.getAllBpOs().length);

      cluster.addNameNode(conf, nnPort2);
      assertEquals(2, dn.getAllBpOs().length);

      cluster.addNameNode(conf, nnPort3);
      assertEquals(3, dn.getAllBpOs().length);

      cluster.addNameNode(conf, nnPort4);

      // Ensure a BPOfferService in the datanodes corresponds to
View Full Code Here

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

      assertEquals(2, dn.getAllBpOs().length);

      cluster.addNameNode(conf, nnPort3);
      assertEquals(3, dn.getAllBpOs().length);

      cluster.addNameNode(conf, nnPort4);

      // Ensure a BPOfferService in the datanodes corresponds to
      // a namenode in the cluster
      Set<InetSocketAddress> nnAddrsFromCluster = Sets.newHashSet();
      for (int i = 0; i < 4; i++) {
View Full Code Here

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

      BPOfferService [] bposs = dn.getAllBpOs();
      LOG.info("dn bpos len (should be 2):" + bposs.length);
      Assert.assertEquals("should've registered with two namenodes", bposs.length,2);
     
      // add another namenode
      cluster.addNameNode(conf, 9938);
      bposs = dn.getAllBpOs();
      LOG.info("dn bpos len (should be 3):" + bposs.length);
      Assert.assertEquals("should've registered with three namenodes", bposs.length,3);
     
      // change cluster id and another Namenode
View Full Code Here

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

      LOG.info("dn bpos len (should be 3):" + bposs.length);
      Assert.assertEquals("should've registered with three namenodes", bposs.length,3);
     
      // change cluster id and another Namenode
      StartupOption.FORMAT.setClusterId("DifferentCID");
      cluster.addNameNode(conf, 9948);
      NameNode nn4 = cluster.getNameNode(3);
      assertNotNull("cannot create nn4", nn4);
     
      bposs = dn.getAllBpOs();
      LOG.info("dn bpos len (still should be 3):" + bposs.length);
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.