Examples of transitionToStandby()


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

     
      assertEquals(0, cluster.getNamesystem(1).getBlockManager()
          .getPendingDataNodeMessageCount());
     
      // Now try to fail over.
      cluster.transitionToStandby(0);
      cluster.transitionToActive(1);
    } finally {
      cluster.shutdown();
    }
  }
View Full Code Here

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

      // write another block and a half
      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);
View Full Code Here

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

      AppendTestUtil.write(stm, 0, BLOCK_AND_A_HALF);
      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);
View Full Code Here

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

     
      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.transitionToStandby()

      LOG.info("Waiting for commitBlockSynchronization call from primary");
      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();
View Full Code Here

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

      cluster.waitActive();
      cluster.transitionToActive(0);
      FileSystem fs = cluster.getFileSystem(0);
     
      fs.mkdirs(TEST_DIR);
      cluster.transitionToStandby(0);
      try {
        fs.mkdirs(new Path("/x"));
        fail("Didn't throw trying to mutate FS in standby state");
      } catch (Throwable t) {
        GenericTestUtils.assertExceptionContains(
View Full Code Here

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

      fs.delete(TEST_DIR, true);
     
      // Now if the standby tries to replay the last segment that it just
      // wrote as active, it would fail since it's trying to create a file
      // in a non-existent directory.
      cluster.transitionToStandby(0);
      cluster.transitionToActive(0);
     
      assertFalse(fs.exists(TEST_DIR));

    } finally {
View Full Code Here

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

      .build();
    try {
      cluster.waitActive();
      cluster.transitionToActive(0);
      cluster.transitionToActive(0);
      cluster.transitionToStandby(0);
      cluster.transitionToStandby(0);
    } finally {
      cluster.shutdown();
    }
  }
View Full Code Here

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

    try {
      cluster.waitActive();
      cluster.transitionToActive(0);
      cluster.transitionToActive(0);
      cluster.transitionToStandby(0);
      cluster.transitionToStandby(0);
    } finally {
      cluster.shutdown();
    }
  }
View Full Code Here

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

      }
     
      ctx.addThread(new RepeatingTestThread(ctx) {
        @Override
        public void doAnAction() throws Exception {
          cluster.transitionToStandby(0);
          Thread.sleep(50);
          cluster.transitionToActive(0);
        }
      });
      ctx.startThreads();
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.