Examples of quiesceStandby()


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

    createEdits(20);
    h.setDisabled(true);
   
    if (!enableQJM) {
      standby.quiesceStandby(getCurrentTxId(primary) - 1);
      // SLS + 20 edits
      assertEquals(21, getCurrentTxId(primary));
      assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    }
    tearDown();
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()

  public void testBasic() throws Exception {
    setUp("testBasic", false);
    createEdits(20);
    AvatarNode primary = cluster.getPrimaryAvatar(0).avatar;
    AvatarNode standby = cluster.getStandbyAvatar(0).avatar;
    standby.quiesceStandby(getCurrentTxId(primary)-1);
   
    // SLS + ELS + SLS + 20 edits
    assertEquals(23, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
  }
View Full Code Here

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

    // new standby checkpoints ELS + SLS

    if (!enableQJM) {
      // Create some more edits and verify.
      createEdits(20);
      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()

    AvatarNode primary = cluster.getPrimaryAvatar(0).avatar;
    AvatarNode standby = cluster.getStandbyAvatar(0).avatar;
   
    if (!enableQJM) {
      createEdits(20);
      standby.quiesceStandby(getCurrentTxId(primary)-1);
      assertEquals(71, getCurrentTxId(primary));
      assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    }
  }
View Full Code Here

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

    createEdits(20); // 67

    AvatarNode standby = cluster.getStandbyAvatar(0).avatar;
   
  if (!enableQJM) {
      standby.quiesceStandby(getCurrentTxId(primary)-1);
      assertEquals(65, getCurrentTxId(primary));
      assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    }
  }
View Full Code Here

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

    assertEquals(87, getCurrentTxId(cluster.getPrimaryAvatar(0).avatar));
   
    AvatarNode standby = cluster.getStandbyAvatar(0).avatar;
   
    if (!enableQJM) {
      standby.quiesceStandby(getCurrentTxId(primary)-1);
      assertEquals(87, getCurrentTxId(primary));
      assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    }
  }
View Full Code Here

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

    AvatarNode standby = cluster.getStandbyAvatar(0).avatar;
    h.doCheckpoint(); //25
    createEdits(20); //45
   
    if (!enableQJM) {
      standby.quiesceStandby(getCurrentTxId(primary)-1);
      assertEquals(45, getCurrentTxId(primary));
      assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    }
    InjectionHandler.clear();
  }
View Full Code Here

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

    // give time to the standby to start-up
    Thread.sleep(2000);
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));
    createEdits(20);
    if (!enableQJM) {
      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()

    createEdits(20); //23
    AvatarNode primary = cluster.getPrimaryAvatar(0).avatar;
    AvatarNode standby = cluster.getStandbyAvatar(0).avatar;
    h.doCheckpoint(); //25 checkpoint adds 2 transactions
    createEdits(20);
    standby.quiesceStandby(getCurrentTxId(primary)-1);
    assertEquals(45, getCurrentTxId(primary));
    assertEquals(getCurrentTxId(primary), getCurrentTxId(standby));

    cluster.restartAvatarNodes(); //49 (restart + initial checkpoint)
    primary = cluster.getPrimaryAvatar(0).avatar;
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.