Examples of waitOnMaster()


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

    assertTrue(t.get(new Get(ROW)).isEmpty());

    // stop the master
    MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
    cluster.stopMaster(0, false);
    cluster.waitOnMaster(0);

    // start up a new master
    cluster.startMaster();
    assertTrue(cluster.waitForActiveAndReadyMaster());
View Full Code Here

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

    admin.createTable(iHtd);
    admin.disableTable("testIndexTableCreationAfterMasterRestart" + Constants.INDEX_TABLE_SUFFIX);
    admin.deleteTable("testIndexTableCreationAfterMasterRestart" + Constants.INDEX_TABLE_SUFFIX);
    MiniHBaseCluster cluster = UTIL.getHBaseCluster();
    cluster.abortMaster(0);
    cluster.waitOnMaster(0);
    HMaster master = cluster.startMaster().getMaster();
    cluster.waitForActiveAndReadyMaster();
    String indexTableName =
        "testIndexTableCreationAfterMasterRestart" + Constants.INDEX_TABLE_SUFFIX;
View Full Code Here

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

    HTableDescriptor htd =
        new HTableDescriptor("testIndexTableCreationAlongWithNormalTablesAfterMasterRestart");
    admin.createTable(htd);
    MiniHBaseCluster cluster = UTIL.getHBaseCluster();
    cluster.abortMaster(0);
    cluster.waitOnMaster(0);
    HMaster master = cluster.startMaster().getMaster();
    cluster.waitForActiveAndReadyMaster();

    boolean tableExist =
        MetaReader.tableExists(master.getCatalogTracker(),
View Full Code Here

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

    admin.createTable(iHtd);
    admin.disableTable(indexTableName);
    MiniHBaseCluster cluster = UTIL.getHBaseCluster();
    cluster.abortMaster(0);
    cluster.startMaster();
    cluster.waitOnMaster(0);
    cluster.waitForActiveAndReadyMaster();
    Thread.sleep(1000);
    assertTrue("User table should be enabled.", admin.isTableEnabled(tableName));
    assertTrue("Index table should be enabled.", admin.isTableEnabled(indexTableName));
  }
View Full Code Here

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

    admin.disableTable(tableName);
    admin.enableTable(indexTableName);
    MiniHBaseCluster cluster = UTIL.getHBaseCluster();
    cluster.abortMaster(0);
    cluster.startMaster();
    cluster.waitOnMaster(0);
    cluster.waitForActiveAndReadyMaster();
    Thread.sleep(1000);
    assertTrue("User table should be disabled.", admin.isTableDisabled(tableName));
    assertTrue("Index table should be disabled.", admin.isTableDisabled(indexTableName));
  }
View Full Code Here

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

    MiniHBaseCluster cluster = UTIL.getHBaseCluster();
    HMaster master = cluster.getMaster();
    master.getAssignmentManager().getZKTable().setEnablingTable(tableName);
    cluster.abortMaster(0);
    cluster.startMaster();
    cluster.waitOnMaster(0);
    cluster.waitForActiveAndReadyMaster();
    Thread.sleep(1000);
    assertTrue("User table should be enabled.", admin.isTableEnabled(tableName));
    assertTrue("Index table should be enabled.", admin.isTableEnabled(indexTableName));
  }
View Full Code Here

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

    log("Assignment completed");

    // Stop the master
    log("Aborting master");
    cluster.abortMaster(0);
    cluster.waitOnMaster(0);
    log("Master has aborted");

    /*
     * Now, let's start mocking up some weird states as described in the method
     * javadoc.
 
View Full Code Here

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

      disabledAndOnDeadRegions.size() >= 2);

    // Stop the master
    log("Aborting master");
    cluster.abortMaster(0);
    cluster.waitOnMaster(0);
    log("Master has aborted");

    /*
     * Now, let's start mocking up some weird states as described in the method
     * javadoc.
 
View Full Code Here

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

    // attempt to stop one of the inactive masters
    int backupIndex = (activeIndex == 0 ? 1 : activeIndex - 1);
    HMaster master = cluster.getMaster(backupIndex);
    LOG.debug("\n\nStopping a backup master: " + master.getServerName() + "\n");
    cluster.stopMaster(backupIndex, false);
    cluster.waitOnMaster(backupIndex);

    // Verify still one active master and it's the same
    for (int i = 0; i < masterThreads.size(); i++) {
      if (masterThreads.get(i).getMaster().isActiveMaster()) {
        assertTrue(activeName.equals(masterThreads.get(i).getMaster().getServerName()));
View Full Code Here

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

    assertEquals(1, status.getBackupMasters().size());

    // kill the active master
    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");
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.