Package org.apache.hadoop.hdfs.server.namenode

Examples of org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.doCheckpoint()


      snn = new SecondaryNameNode(conf);

      dfs = cluster.getFileSystem();
      dfs.mkdirs(new Path("/test/foo"));

      snn.doCheckpoint();

      //start rolling upgrade
      dfs.setSafeMode(SafeModeAction.SAFEMODE_ENTER);
      dfs.rollingUpgrade(RollingUpgradeAction.PREPARE);
      dfs.setSafeMode(SafeModeAction.SAFEMODE_LEAVE);
View Full Code Here


      dfs.rollingUpgrade(RollingUpgradeAction.PREPARE);
      dfs.setSafeMode(SafeModeAction.SAFEMODE_LEAVE);

      dfs.mkdirs(new Path("/test/bar"));
      // do checkpoint in SNN again
      snn.doCheckpoint();
    } finally {
      IOUtils.cleanup(null, dfs);
      if (snn != null) {
        snn.shutdown();
      }
View Full Code Here

      assertEquals(1, nnSnapshotManager.getNumSnapshottableDirs());
     
      // 3. Start up a 2NN and have it do a checkpoint. It will have foo and its
      // snapshot in its list of snapshottable dirs referenced from the
      // SnapshotManager, as well as in the file system tree.
      secondary.doCheckpoint();
      assertEquals(1, secondarySnapshotManager.getNumSnapshots());
      assertEquals(1, secondarySnapshotManager.getNumSnapshottableDirs());
     
      // 4. Disallow snapshots on and delete foo on the NN. The snapshot count
      // will go down to 0 and the snapshottable dir will be removed from the fs
View Full Code Here

      // clear the list of snapshottable dirs referenced from the
      // SnapshotManager. When it writes out an fsimage, the 2NN will write out
      // 0 for the snapshot count, but still serialize the snapshottable dir
      // referenced in the SnapshotManager even though it no longer appears in
      // the file system tree. The NN will not be able to start up with this.
      secondary.doCheckpoint();
      assertEquals(0, secondarySnapshotManager.getNumSnapshots());
      assertEquals(0, secondarySnapshotManager.getNumSnapshottableDirs());
    } finally {
      if (cluster != null) {
        cluster.shutdown();
View Full Code Here

      snn = new SecondaryNameNode(conf);

      dfs = cluster.getFileSystem();
      dfs.mkdirs(new Path("/test/foo"));

      snn.doCheckpoint();

      //start rolling upgrade
      dfs.setSafeMode(SafeModeAction.SAFEMODE_ENTER);
      dfs.rollingUpgrade(RollingUpgradeAction.PREPARE);
      dfs.setSafeMode(SafeModeAction.SAFEMODE_LEAVE);
View Full Code Here

      dfs.rollingUpgrade(RollingUpgradeAction.PREPARE);
      dfs.setSafeMode(SafeModeAction.SAFEMODE_LEAVE);

      dfs.mkdirs(new Path("/test/bar"));
      // do checkpoint in SNN again
      snn.doCheckpoint();
    } finally {
      IOUtils.cleanup(null, dfs);
      if (snn != null) {
        snn.shutdown();
      }
View Full Code Here

      assertEquals(1, nnSnapshotManager.getNumSnapshottableDirs());
     
      // 3. Start up a 2NN and have it do a checkpoint. It will have foo and its
      // snapshot in its list of snapshottable dirs referenced from the
      // SnapshotManager, as well as in the file system tree.
      secondary.doCheckpoint();
      assertEquals(1, secondarySnapshotManager.getNumSnapshots());
      assertEquals(1, secondarySnapshotManager.getNumSnapshottableDirs());
     
      // 4. Disallow snapshots on and delete foo on the NN. The snapshot count
      // will go down to 0 and the snapshottable dir will be removed from the fs
View Full Code Here

      // clear the list of snapshottable dirs referenced from the
      // SnapshotManager. When it writes out an fsimage, the 2NN will write out
      // 0 for the snapshot count, but still serialize the snapshottable dir
      // referenced in the SnapshotManager even though it no longer appears in
      // the file system tree. The NN will not be able to start up with this.
      secondary.doCheckpoint();
      assertEquals(0, secondarySnapshotManager.getNumSnapshots());
      assertEquals(0, secondarySnapshotManager.getNumSnapshottableDirs());
    } finally {
      if (cluster != null) {
        cluster.shutdown();
View Full Code Here

      snn = new SecondaryNameNode(conf);

      dfs = cluster.getFileSystem();
      dfs.mkdirs(new Path("/test/foo"));

      snn.doCheckpoint();

      //start rolling upgrade
      dfs.setSafeMode(SafeModeAction.SAFEMODE_ENTER);
      dfs.rollingUpgrade(RollingUpgradeAction.PREPARE);
      dfs.setSafeMode(SafeModeAction.SAFEMODE_LEAVE);
View Full Code Here

      dfs.rollingUpgrade(RollingUpgradeAction.PREPARE);
      dfs.setSafeMode(SafeModeAction.SAFEMODE_LEAVE);

      dfs.mkdirs(new Path("/test/bar"));
      // do checkpoint in SNN again
      snn.doCheckpoint();
    } finally {
      IOUtils.cleanup(null, dfs);
      if (snn != null) {
        snn.shutdown();
      }
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.