Examples of shutdownNameNode()


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

       * setup for this test depends on the previous test.
       */

      // restart the namenode and then shut it down for test
      cluster.restartNameNode(0);
      cluster.shutdownNameNode(0);

      // verify blockSeekTo() still works (forced to use cached tokens)
      in1.seek(0);
      assertTrue(checkFile1(in1));
      // verify again blockSeekTo() still works (forced to use cached tokens)
View Full Code Here

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

      assertTrue(cluster.restartDataNodes(true));
      cluster.waitActive();
      assertEquals(numDataNodes, cluster.getDataNodes().size());

      // shutdown namenode so that DFSClient can't get new tokens from namenode
      cluster.shutdownNameNode(0);

      // verify blockSeekTo() fails (cached tokens become invalid)
      in1.seek(0);
      assertFalse(checkFile1(in1));
      // verify fetchBlockByteRange() fails (cached tokens become invalid)
View Full Code Here

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

    FileSystem fs = HATestUtil.configureFailoverFs(cluster, conf);
    try {
      cluster.transitionToActive(0);
      NameNode nn0 = cluster.getNameNode(0);
      nn0.getRpcServer().rollEditLog();
      cluster.shutdownNameNode(0);
      createEmptyInProgressEditLog(cluster, nn0, writeHeader);
      cluster.transitionToActive(1);
    } finally {
      IOUtils.cleanup(LOG, fs);
      cluster.shutdown();
View Full Code Here

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

    FileSystem fs = HATestUtil.configureFailoverFs(cluster, conf);
    try {
      cluster.transitionToActive(0);
      NameNode nn0 = cluster.getNameNode(0);
      nn0.getRpcServer().rollEditLog();
      cluster.shutdownNameNode(0);
      createEmptyInProgressEditLog(cluster, nn0, writeHeader);
      cluster.transitionToActive(1);
    } finally {
      IOUtils.cleanup(LOG, fs);
      cluster.shutdown();
View Full Code Here

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

      //add a few transactions and then shutdown namenode.
      final FileSystem fs = cluster.getFileSystem();
      fs.mkdirs(new Path("/user/foo"));
      fs.mkdirs(new Path("/user/bar"));
      cluster.shutdownNameNode();

      //modify edit files
      for(File dir : FSNamesystem.getNamespaceEditsDirs(conf)) {
        final File editFile  = new File(new File(dir, "current"),
            NameNodeFile.EDITS.getName());
View Full Code Here

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

      // restart datanodes on the same ports that they currently use
      assertTrue(cluster.restartDataNodes(true));
      cluster.waitActive();
      assertEquals(numDataNodes, cluster.getDataNodes().size());
      cluster.shutdownNameNode();

      // confirm tokens cached in in1 are still valid
      lblocks = DFSTestUtil.getAllBlocks(in1);
      for (LocatedBlock blk : lblocks) {
        assertFalse(SecurityTestUtil.isAccessTokenExpired(blk.getAccessToken()));
View Full Code Here

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

       * setup for this test depends on the previous test.
       */

      // restart the namenode and then shut it down for test
      cluster.restartNameNode();
      cluster.shutdownNameNode();

      // verify blockSeekTo() still works (forced to use cached tokens)
      in1.seek(0);
      assertTrue(checkFile1(in1));
      // verify again blockSeekTo() still works (forced to use cached tokens)
View Full Code Here

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

      assertTrue(cluster.restartDataNodes(true));
      cluster.waitActive();
      assertEquals(numDataNodes, cluster.getDataNodes().size());

      // shutdown namenode so that DFSClient can't get new tokens from namenode
      cluster.shutdownNameNode();

      // verify blockSeekTo() fails (cached tokens become invalid)
      in1.seek(0);
      assertFalse(checkFile1(in1));
      // verify fetchBlockByteRange() fails (cached tokens become invalid)
View Full Code Here

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

      cluster.transitionToActive(0);

      final Path dir = new Path("/test");
      Assert.assertTrue(fs.mkdirs(dir));

      cluster.shutdownNameNode(0);
      cluster.transitionToActive(1);

      final Path dir2 = new Path("/test2");
      Assert.assertTrue(fs.mkdirs(dir2));
View Full Code Here

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

      // restart datanodes on the same ports that they currently use
      assertTrue(cluster.restartDataNodes(true));
      cluster.waitActive();
      assertEquals(numDataNodes, cluster.getDataNodes().size());
      cluster.shutdownNameNode(0);

      // confirm tokens cached in in1 are still valid
      lblocks = DFSTestUtil.getAllBlocks(in1);
      for (LocatedBlock blk : lblocks) {
        assertFalse(SecurityTestUtil.isBlockTokenExpired(blk.getBlockToken()));
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.