Examples of quiesceStandby()


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

    cluster.restartStandby();
    createEdits(20);

    AvatarNode primary = cluster.getPrimaryAvatar(0).avatar;
    AvatarNode standby = cluster.getStandbyAvatar(0).avatar;
    standby.quiesceStandby(getCurrentTxId(primary)-1);
    assertEquals(80, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    LOG.info("------------ testWithStandbyDeadAfterFailover----------- DONE");
  }
View Full Code Here

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

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

    AvatarNode primary = cluster.getPrimaryAvatar(0).avatar;
    AvatarNode standby = cluster.getStandbyAvatar(0).avatar;
    assertEquals(20, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    createEdits(20);
    standby.quiesceStandby(getCurrentTxId(primary)-1);
    assertEquals(40, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    LOG.info("------------ testAcrossRestarts----------- DONE");
  }
View Full Code Here

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

    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));

    cluster.restartAvatarNodes();
    primary = cluster.getPrimaryAvatar(0).avatar;
View Full Code Here

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

    cluster.restartAvatarNodes();
    primary = cluster.getPrimaryAvatar(0).avatar;
    standby = cluster.getStandbyAvatar(0).avatar;
    createEdits(20);
    standby.quiesceStandby(getCurrentTxId(primary)-1);
    assertEquals(60, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    LOG.info("------------ testCheckpointAndRestart----------- DONE");
  }
}
View Full Code Here

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

    try {
      Thread.sleep(10000);
    } catch (Exception e) {
    }
   
    standby.quiesceStandby(getCurrentTxId(primary) - 1);
    assertEquals(20, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    if(expectException)
      assertTrue(h.exceptionEvent);
  }
View Full Code Here

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

    h.setDisabled(false);

    // sleep to see if the state recovers correctly
    DFSTestUtil.waitNSecond(5);
    h.doCheckpoint();
    standby.quiesceStandby(getCurrentTxId(primary) - 1);

    assertEquals(47, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
  }
}
View Full Code Here

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

    setUp("testBlocksMisMatch", false);
    int totalBlocks = 50;
    DFSTestUtil.createFile(fs, new Path("/testBlocksMisMatch"),
        (long) totalBlocks * 1024, (short) 3, System.currentTimeMillis());
    AvatarNode standby = cluster.getStandbyAvatar(0).avatar;
    standby.quiesceStandby(cluster
        .getPrimaryAvatar(0).avatar.getLastWrittenTxId());
    // This sets the standby number of blocks to 0.
    standby.namesystem.close();
    try {
      cluster.failOver();
View Full Code Here

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

    // no actual checkpoint happened at startup
    assertFalse(h.receivedEvents
        .contains(InjectionEvent.STANDBY_BEFORE_ROLL_EDIT));

    if (!enableQJM) {
      standby.quiesceStandby(DFSAvatarTestUtil.getCurrentTxId(primary) - 1);
      // edits + SLS
      assertEquals(41, DFSAvatarTestUtil.getCurrentTxId(primary));
    }
  }
 
View Full Code Here

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

    // wait to the savers are up for some checkpoint
    // and waiting until we interrupt
    h.waitReachedSynchronizationPoint();
     
    standby.quiesceStandby(getCurrentTxId(primary) - 1);
    // SLS + ELS + SLS + 20 edits
    assertEquals(23, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    if(expectException)
      assertTrue(h.exceptionEvent);
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.