Package org.apache.hadoop.hdfs

Examples of org.apache.hadoop.hdfs.MiniDFSNNTopology


    int retryCount = 0;
    while (true) {
      try {
        int basePort = 10060 + random.nextInt(100) * 2;
        MiniDFSNNTopology topology = new MiniDFSNNTopology()
            .addNameservice(new MiniDFSNNTopology.NSConf("ns1")
                .addNN(new MiniDFSNNTopology.NNConf("nn1").setHttpPort(basePort))
                .addNN(new MiniDFSNNTopology.NNConf("nn2").setHttpPort(basePort + 1)));

        cluster = new MiniDFSCluster.Builder(conf)
View Full Code Here


    conf.setInt(DFSConfigKeys.DFS_NAMENODE_NUM_CHECKPOINTS_RETAINED_KEY, 10);
    conf.setInt(DFSConfigKeys.DFS_HA_TAILEDITS_PERIOD_KEY, 1);
    HAUtil.setAllowStandbyReads(conf, true);
   
    if (clusterType == TestType.SHARED_DIR_HA) {
      MiniDFSNNTopology topology = MiniQJMHACluster.createDefaultTopology(10000);
      cluster = new MiniDFSCluster.Builder(conf)
        .nnTopology(topology)
        .numDataNodes(0)
        .checkExitOnShutdown(false)
        .build();
View Full Code Here

    int retryCount = 0;
    while (true) {
      try {
        int basePort = 10060 + random.nextInt(100) * 2;
        MiniDFSNNTopology topology = new MiniDFSNNTopology()
            .addNameservice(new MiniDFSNNTopology.NSConf("ns1")
                .addNN(new MiniDFSNNTopology.NNConf("nn1").setHttpPort(basePort))
                .addNN(new MiniDFSNNTopology.NNConf("nn2").setHttpPort(basePort + 1)));

        cluster = new MiniDFSCluster.Builder(conf)
View Full Code Here

      this.startOpt = startOpt;
    }
  }
 
  public static MiniDFSNNTopology createDefaultTopology(int basePort) {
    return new MiniDFSNNTopology()
      .addNameservice(new MiniDFSNNTopology.NSConf(NAMESERVICE).addNN(
        new MiniDFSNNTopology.NNConf("nn1").setIpcPort(basePort)
            .setHttpPort(basePort + 1)).addNN(
        new MiniDFSNNTopology.NNConf("nn2").setIpcPort(basePort + 2)
            .setHttpPort(basePort + 3)));
View Full Code Here

        journalCluster = new MiniJournalCluster.Builder(conf).format(true)
            .build();
        URI journalURI = journalCluster.getQuorumJournalURI(NAMESERVICE);

        // start cluster with 2 NameNodes
        MiniDFSNNTopology topology = createDefaultTopology(basePort);

        initHAConf(journalURI, builder.conf);

        // First start up the NNs just to format the namespace. The MinIDFSCluster
        // has no way to just format the NameNodes without also starting them.
View Full Code Here

    Configuration conf = setupCommonConfig();
    conf.set(DFSConfigKeys.DFS_NAMENODE_SHARED_EDITS_DIR_KEY,
             BKJMUtil.createJournalURI("/checkpointing" + journalCount++)
             .toString());
    BKJMUtil.addJournalManagerDefinition(conf);
    MiniDFSNNTopology topology = new MiniDFSNNTopology()
      .addNameservice(new MiniDFSNNTopology.NSConf("ns1")
        .addNN(new MiniDFSNNTopology.NNConf("nn1").setHttpPort(10001))
        .addNN(new MiniDFSNNTopology.NNConf("nn2").setHttpPort(10002)));

    cluster = new MiniDFSCluster.Builder(conf)
View Full Code Here

    conf = new Configuration();
    conf.setInt(DFSConfigKeys.DFS_HA_LOGROLL_PERIOD_KEY, 1);
    conf.setInt(DFSConfigKeys.DFS_HA_TAILEDITS_PERIOD_KEY, 1);
    HAUtil.setAllowStandbyReads(conf, true);
   
    MiniDFSNNTopology topology = MiniDFSNNTopology.simpleHATopology();
   
    cluster = new MiniDFSCluster.Builder(conf)
      .nnTopology(topology)
      .numDataNodes(0)
      .build();
View Full Code Here

    conf.set(DFSConfigKeys.DFS_IMAGE_COMPRESSION_CODEC_KEY,
        SlowCodec.class.getCanonicalName());
    CompressionCodecFactory.setCodecClasses(conf,
        ImmutableList.<Class>of(SlowCodec.class));

    MiniDFSNNTopology topology = new MiniDFSNNTopology()
      .addNameservice(new MiniDFSNNTopology.NSConf("ns1")
        .addNN(new MiniDFSNNTopology.NNConf("nn1").setHttpPort(10001))
        .addNN(new MiniDFSNNTopology.NNConf("nn2").setHttpPort(10002)));
   
    cluster = new MiniDFSCluster.Builder(conf)
View Full Code Here

    try {
      Configuration conf = new Configuration();
      HAUtil.setAllowStandbyReads(conf, true);
      conf.setInt(DFSConfigKeys.DFS_HA_TAILEDITS_PERIOD_KEY, 1);

      MiniDFSNNTopology topology = MiniDFSNNTopology.simpleHATopology();
      cluster = new MiniDFSCluster.Builder(conf).nnTopology(topology)
          .numDataNodes(0).build();
      cluster.waitActive();
      // Shutdown and clear the current filebased shared dir.
      cluster.shutdownNameNodes();
View Full Code Here

 
  @Before
  public void setupCluster() throws IOException {
    Configuration conf = new Configuration();

    MiniDFSNNTopology topology = new MiniDFSNNTopology()
      .addNameservice(new MiniDFSNNTopology.NSConf("ns1")
        .addNN(new MiniDFSNNTopology.NNConf("nn1").setHttpPort(10001))
        .addNN(new MiniDFSNNTopology.NNConf("nn2").setHttpPort(10002)));
   
    cluster = new MiniDFSCluster.Builder(conf)
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.MiniDFSNNTopology

Copyright © 2018 www.massapicom. 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.