Examples of waitForActiveAndReadyMaster()


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

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

    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;

    assertTrue("Index tables is not created.", admin.isTableAvailable(indexTableName));
  }
View Full Code Here

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

    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(),
          "testIndexTableCreationAlongWithNormalTablesAfterMasterRestart"
              + Constants.INDEX_TABLE_SUFFIX);
View Full Code Here

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

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

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

            throw new IllegalStateException("Hadoop expects default umask " +
                  "to be 022, seems like your system has a different one", e);
         }
         MiniHBaseCluster cluster = testUtil.getHBaseCluster();
         log.info("Waiting for active/ready HBase master");
         cluster.waitForActiveAndReadyMaster();
         // Cache zoo keeper port for cache store configuration
         zooKeeperPort = testUtil.getConfiguration()
               .getInt(HConstants.ZOOKEEPER_CLIENT_PORT, -1);
      } catch (Exception e) {
         throw new RuntimeException("Unable to start HBase cluster", e);
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");

    // Get new region states since master restarted
    regionStates = master.getAssignmentManager().getRegionStates();
    // Merging region should remain merging
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
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.