Examples of transitionToActive()


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

      .build();
    try {
      int sizeWritten = 0;
     
      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()

      .nnTopology(MiniDFSNNTopology.simpleHATopology())
      .numDataNodes(5)
      .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()

      AppendTestUtil.write(stm, BLOCK_AND_A_HALF, BLOCK_AND_A_HALF);
      stm.hflush();
     
      LOG.info("Failing back to NN 0");
      cluster.transitionToStandby(1);
      cluster.transitionToActive(0);
     
      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()

      1000);

    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(1)
      .build();
    try {
      cluster.waitActive();
      cluster.transitionToActive(0);
      FileSystem fs = cluster.getFileSystem(0);
     
      fs.mkdirs(TEST_DIR);
      cluster.transitionToStandby(0);
      try {
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.