Examples of doCheckpoint()


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

    setUp();
    createEdits(20);
    AvatarNode standby = cluster.getStandbyAvatar(0).avatar;
   
    try {
      standby.doCheckpoint();
      fail("Should get IOException here");
    } catch (IOException e) {  }
  }
 
  private void testQuiesceInterruption(InjectionEvent event, boolean scf) throws Exception {
View Full Code Here

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

  public void testWithCheckPoints() throws Exception {
    LOG.info("------------ testWithCheckPoints-----------");
    createEdits(20);
    AvatarNode primary = cluster.getPrimaryAvatar(0).avatar;
    AvatarNode standby = cluster.getStandbyAvatar(0).avatar;
    standby.doCheckpoint();
    createEdits(20);
    standby.quiesceStandby(getCurrentTxId(primary)-1);
    assertEquals(40, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    LOG.info("------------ testWithCheckPoints----------- DONE");
View Full Code Here

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

  public void testCheckpointAndRestart() throws Exception {
    LOG.info("------------ testCheckpointAndRestart-----------");
    createEdits(20);
    AvatarNode primary = cluster.getPrimaryAvatar(0).avatar;
    AvatarNode standby = cluster.getStandbyAvatar(0).avatar;
    standby.doCheckpoint();
    createEdits(20);
    standby.quiesceStandby(getCurrentTxId(primary)-1);
    assertEquals(40, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
View Full Code Here

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

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

      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

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

      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

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

      // 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

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

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

      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

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

      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
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.