Examples of quiesceStandby()


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

    // checkpoint failed -> now reading edits.new
   
   
    assertNotNull(h.lastSignature)
    createEdits(20);
    standby.quiesceStandby(getCurrentTxId(primary)-1);
    assertEquals(40, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
  }
 
  @Test
View Full Code Here

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

    standby.doCheckpoint();
    // checkpoint succeeded
    assertNull(h.lastSignature);
   
    createEdits(20);
    standby.quiesceStandby(getCurrentTxId(primary)-1);
    assertEquals(40, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
  }
 
  @Test
View Full Code Here

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

    standby.doCheckpoint();
    assertTrue(h.ingestRecreatedAfterFailure);
    h.simulateEditsNotExists = false;
   
    createEdits(20);
    standby.quiesceStandby(getCurrentTxId(primary)-1);
    assertEquals(40, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
  }
 
  @Test
View Full Code Here

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

  public void testBlocksMisMatch() throws Exception {
    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()

    createEdits(40);
    try {
      Thread.sleep(6000);
    } catch (Exception e) { }

    standby.quiesceStandby(getCurrentTxId(primary)-1);
    assertEquals(40, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    tearDown();
  }
 
View Full Code Here

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

    try {
      Thread.sleep(10000);
    } catch (Exception e) {
    }
    h.setDisabled(true);
    standby.quiesceStandby(getCurrentTxId(primary) - 1);
    assertEquals(20, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    tearDown();
  }
View Full Code Here

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

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

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

    standby = cluster.getStandbyAvatar(0).avatar;
    assertEquals(20, getCurrentTxId(primary));

    // Create some more edits and verify.
    createEdits(20);
    standby.quiesceStandby(getCurrentTxId(primary)-1);
    assertEquals(40, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    LOG.info("------------ testWithFailover----------- DONE");
  }
View Full Code Here

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(60, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    LOG.info("------------ testDoubleFailover----------- DONE");
  }
View Full Code Here

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

    createEdits(20);
    cluster.restartStandby();
    createEdits(20);
    AvatarNode primary = cluster.getPrimaryAvatar(0).avatar;
    AvatarNode standby = cluster.getStandbyAvatar(0).avatar;
    standby.quiesceStandby(getCurrentTxId(primary)-1);
    assertEquals(60, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    LOG.info("------------ testWithStandbyDead----------- DONE");
  }
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.