Examples of waitForActiveAndReadyMaster()


Examples of com.alibaba.wasp.MiniWaspCluster.waitForActiveAndReadyMaster()

    // Start up a new master
    log("Starting up a new master");
    cluster.startMaster().getMaster();
    log("Waiting for master to be ready");
    cluster.waitForActiveAndReadyMaster();
    log("Master is ready");

    // Failover should be completed, now wait for no RIT
    log("Waiting for no more RIT");
    ZKAssign.blockUntilNoRIT(zkw);
View Full Code Here

Examples of com.alibaba.wasp.MiniWaspCluster.waitForActiveAndReadyMaster()

  private MiniWaspCluster createEntityGroups(String tableName)
      throws InterruptedException, ZooKeeperConnectionException, IOException,
      KeeperException {
    MiniWaspCluster cluster = TEST_UTIL.getWaspCluster();
    log("Waiting for active/ready master");
    cluster.waitForActiveAndReadyMaster();
    zkw = new ZooKeeperWatcher(TEST_UTIL.getConfiguration(),
        "testOpenedEntityGroupHandler", null);

    // Create a table with entityGroups
    byte[] table = Bytes.toBytes(tableName);
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniHBaseCluster.waitForActiveAndReadyMaster()

    // get all the master threads
    List<MasterThread> masterThreads = cluster.getMasterThreads();
    assertEquals(1, masterThreads.size());

    // only one master thread, let's wait for it to be initialized
    assertTrue(cluster.waitForActiveAndReadyMaster());
    HMaster master = masterThreads.get(0).getMaster();
    assertTrue(master.isActiveMaster());
    assertTrue(master.isInitialized());

    // disable load balancing on this master
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniHBaseCluster.waitForActiveAndReadyMaster()

    // Start up a new master
    log("Starting up a new master");
    master = cluster.startMaster().getMaster();
    log("Waiting for master to be ready");
    cluster.waitForActiveAndReadyMaster();
    log("Master is ready");

    // Failover should be completed, now wait for no RIT
    log("Waiting for no more RIT");
    ZKAssign.blockUntilNoRIT(zkw);
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniHBaseCluster.waitForActiveAndReadyMaster()

    // get all the master threads
    List<MasterThread> masterThreads = cluster.getMasterThreads();
    assertEquals(1, masterThreads.size());

    // only one master thread, let's wait for it to be initialized
    assertTrue(cluster.waitForActiveAndReadyMaster());
    HMaster master = masterThreads.get(0).getMaster();
    assertTrue(master.isActiveMaster());
    assertTrue(master.isInitialized());

    // disable load balancing on this master
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniHBaseCluster.waitForActiveAndReadyMaster()

      Threads.sleep(10);
    }
    log("Starting up a new master");
    master = cluster.startMaster().getMaster();
    log("Waiting for master to be ready");
    assertTrue(cluster.waitForActiveAndReadyMaster());
    log("Master is ready");

    // Let's add some weird states to master in-memory state

    // After HBASE-3181, we need to have some ZK state if we're PENDING_OPEN
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniHBaseCluster.waitForActiveAndReadyMaster()

  public void testRegionShouldNotBeDeployed() throws Exception {
    String table = "tableRegionShouldNotBeDeployed";
    try {
      LOG.info("Starting testRegionShouldNotBeDeployed.");
      MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
      assertTrue(cluster.waitForActiveAndReadyMaster());

      // Create a ZKW to use in the test
      ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(TEST_UTIL);

      FileSystem filesystem = FileSystem.get(conf);
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniHBaseCluster.waitForActiveAndReadyMaster()

    LOG.debug("\n\nStopping the active master " + active.getServerName() + "\n");
    cluster.stopMaster(activeIndex, false);
    cluster.waitOnMaster(activeIndex);

    // wait for an active master to show up and be ready
    assertTrue(cluster.waitForActiveAndReadyMaster());

    LOG.debug("\n\nVerifying backup master is now active\n");
    // should only have one master now
    assertEquals(1, masterThreads.size());
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniHBaseCluster.waitForActiveAndReadyMaster()

    TableName table =
        TableName.valueOf("tableRegionShouldNotBeDeployed");
    try {
      LOG.info("Starting testRegionShouldNotBeDeployed.");
      MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
      assertTrue(cluster.waitForActiveAndReadyMaster());


      byte[][] SPLIT_KEYS = new byte[][] { new byte[0], Bytes.toBytes("aaa"),
          Bytes.toBytes("bbb"), Bytes.toBytes("ccc"), Bytes.toBytes("ddd") };
      HTableDescriptor htdDisabled = new HTableDescriptor(table);
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniHBaseCluster.waitForActiveAndReadyMaster()

    cluster.stopMaster(0, false);
    cluster.waitOnMaster(0);

    // start up a new master
    cluster.startMaster();
    assertTrue(cluster.waitForActiveAndReadyMaster());

    // test that the same unmanaged connection works with a new
    // HBaseAdmin and can connect to the new master;
    HBaseAdmin newAdmin = new HBaseAdmin(conn);
    assertTrue(newAdmin.tableExists(tableName));
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.