Examples of transitionToActive()


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

      // Make sure all the blocks are written before failover
      stm.hflush();

      LOG.info("Failing over to NN 1");
      cluster.transitionToStandby(0);
      cluster.transitionToActive(1);

      assertTrue(fs.exists(TEST_PATH));
     
      cluster.stopDataNode(0);
View Full Code Here

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

      AppendTestUtil.write(stm, BLOCK_AND_A_HALF, BLOCK_AND_A_HALF);
      stm.hflush();
     
      LOG.info("Failing back to NN 0");
      cluster.transitionToStandby(0);
      cluster.transitionToActive(1);
     
      cluster.stopDataNode(1);
     
      AppendTestUtil.write(stm, BLOCK_AND_A_HALF*2, BLOCK_AND_A_HALF);
      stm.hflush();
View Full Code Here

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

      .nnTopology(MiniDFSNNTopology.simpleHATopology())
      .numDataNodes(3)
      .build();
    try {
      cluster.waitActive();
      cluster.transitionToActive(0);
      Thread.sleep(500);

      LOG.info("Starting with NN 0 active");
      FileSystem fs = HATestUtil.configureFailoverFs(cluster, conf);
      stm = fs.create(TEST_PATH);
View Full Code Here

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

      stm.hflush();
     
      LOG.info("Failing over to NN 1");
     
      cluster.transitionToStandby(0);
      cluster.transitionToActive(1);
     
      assertTrue(fs.exists(TEST_PATH));

      FileSystem fsOtherUser = createFsAsOtherUser(cluster, conf);
      loopRecoverLease(fsOtherUser, TEST_PATH);
View Full Code Here

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

      AppendTestUtil.check(fs, TEST_PATH, BLOCK_AND_A_HALF);
     
      // Fail back to ensure that the block locations weren't lost on the
      // original node.
      cluster.transitionToStandby(1);
      cluster.transitionToActive(0);
      AppendTestUtil.check(fs, TEST_PATH, BLOCK_AND_A_HALF);     
    } finally {
      IOUtils.closeStream(stm);
      cluster.shutdown();
    }
View Full Code Here

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

      .nnTopology(MiniDFSNNTopology.simpleHATopology())
      .numDataNodes(3)
      .build();
    try {
      cluster.waitActive();
      cluster.transitionToActive(0);
      Thread.sleep(500);

      LOG.info("Starting with NN 0 active");
      FileSystem fs = HATestUtil.configureFailoverFs(cluster, conf);
      stm = fs.create(TEST_PATH);
View Full Code Here

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

      delayer.waitForCall();

      LOG.info("Failing over to NN 1");
     
      cluster.transitionToStandby(0);
      cluster.transitionToActive(1);
     
      // Let the commitBlockSynchronization call go through, and check that
      // it failed with the correct exception.
      delayer.proceed();
      delayer.waitForResult();
View Full Code Here

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

        DFSConfigKeys.DFS_PERMISSIONS_ENABLED_KEY, false);

    final MiniDFSCluster cluster = harness.startCluster();
    try {
      cluster.waitActive();
      cluster.transitionToActive(0);
     
      FileSystem fs = harness.getFailoverFs();
      DistributedFileSystem fsAsOtherUser = createFsAsOtherUser(
          cluster, harness.conf);
     
View Full Code Here

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

        .nnTopology(MiniDFSNNTopology.simpleHATopology()).numDataNodes(0)
        .build();
    try {
      cluster.waitActive();

      cluster.transitionToActive(0);
      String pageContents = DFSTestUtil.urlGet(new URL("http://localhost:"
          + NameNode.getHttpAddress(cluster.getConfiguration(0)).getPort()
          + "/dfshealth.jsp"));
      assertTrue(pageContents.contains("Browse the filesystem"));
      assertTrue(pageContents.contains("Number of Under-Replicated Blocks"));
View Full Code Here

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

          + NameNode.getHttpAddress(cluster.getConfiguration(0)).getPort()
          + "/dfshealth.jsp"));
      assertFalse(pageContents.contains("Browse the filesystem"));
      assertFalse(pageContents.contains("Number of Under-Replicated Blocks"));

      cluster.transitionToActive(0);
      pageContents = DFSTestUtil.urlGet(new URL("http://localhost:"
          + NameNode.getHttpAddress(cluster.getConfiguration(0)).getPort()
          + "/dfshealth.jsp"));
      assertTrue(pageContents.contains("Browse the filesystem"));
      assertTrue(pageContents.contains("Number of Under-Replicated Blocks"));
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.