Package org.apache.hadoop.hbase.regionserver

Examples of org.apache.hadoop.hbase.regionserver.HRegionServer.abort()


    // abort master
    abortMaster(cluster);

    // abort RS
    LOG.info("Aborting region server: " + hrs.getServerName());
    hrs.abort("testing");

    // wait for abort completes
    TEST_UTIL.waitFor(120000, 200, new Waiter.Predicate<Exception>() {
      @Override
      public boolean evaluate() throws Exception {
View Full Code Here


    // abort master
    abortMaster(cluster);

    // abort RS
    LOG.info("Aborting region server: " + hrs.getServerName());
    hrs.abort("testing");

    // wait for the RS dies
    TEST_UTIL.waitFor(120000, 200, new Waiter.Predicate<Exception>() {
      @Override
      public boolean evaluate() throws Exception {
View Full Code Here

    makeHLog(hrs1.getWAL(), regions, "table", "family", NUM_LOG_LINES, 100);

    // abort RS1
    LOG.info("Aborting region server: " + hrs1.getServerName());
    hrs1.abort("testing");

    // wait for abort completes
    TEST_UTIL.waitFor(120000, 200, new Waiter.Predicate<Exception>() {
      @Override
      public boolean evaluate() throws Exception {
View Full Code Here

    Thread.sleep(300);
    // abort second region server
    rsts = cluster.getLiveRegionServerThreads();
    HRegionServer hrs2 = rsts.get(0).getRegionServer();
    LOG.info("Aborting one more region server: " + hrs2.getServerName());
    hrs2.abort("testing");

    // wait for abort completes
    TEST_UTIL.waitFor(120000, 200, new Waiter.Predicate<Exception>() {
      @Override
      public boolean evaluate() throws Exception {
View Full Code Here

    LOG.info("Disabling table\n");
    TEST_UTIL.getHBaseAdmin().disableTable(Bytes.toBytes("disableTable"));
   
    // abort RS
    LOG.info("Aborting region server: " + hrs.getServerName());
    hrs.abort("testing");

    // wait for abort completes
    TEST_UTIL.waitFor(120000, 200, new Waiter.Predicate<Exception>() {
      @Override
      public boolean evaluate() throws Exception {
View Full Code Here

    abortMaster(cluster);

    // abort RS
    int numRS = cluster.getLiveRegionServerThreads().size();
    LOG.info("Aborting region server: " + hrs.getServerName());
    hrs.abort("testing");

    // wait for the RS dies
    long start = EnvironmentEdgeManager.currentTimeMillis();
    while (cluster.getLiveRegionServerThreads().size() > (numRS - 1)) {
      if (EnvironmentEdgeManager.currentTimeMillis() - start > 60000) {
View Full Code Here

      int aborted = 0;
      final int numberToAbort = 2;
      for (int i = 1; i < TEST_UTIL.getMiniHBaseCluster().countServedRegions(); i++) {
        HRegionServer hrs = TEST_UTIL.getMiniHBaseCluster().getRegionServer(i);
        if (hrs.getServerName().equals(drainingServer.getServerName())) continue;
        hrs.abort("Aborting");
        aborted++;
        if (aborted >= numberToAbort) break;
      }
      // Wait for regions to come back on line again.
      waitForAllRegionsOnline();
View Full Code Here

   * @param serverNumber  Used as index into a list.
   */
  public String abortRegionServer(int serverNumber) {
    HRegionServer server = getRegionServer(serverNumber);
    LOG.info("Aborting " + server.toString());
    server.abort("Aborting for tests", new Exception("Trace info"));
    return server.toString();
  }

  /**
   * Shut down the specified region server cleanly
View Full Code Here

    conf.setInt(
        HConstants.HBASE_REGIONSERVER_LEASE_PERIOD_KEY, SCANNER_TIMEOUT*100);
    HTable higherScanTimeoutTable = new HTable(conf, TABLE_NAME);
    ResultScanner r = higherScanTimeoutTable.getScanner(scan);
    // This takes way less than SCANNER_TIMEOUT*100
    rs.abort("die!");
    Result[] results = r.next(NB_ROWS);
    assertEquals(NB_ROWS, results.length);
    r.close();
    higherScanTimeoutTable.close();
    LOG.info("END ************ test2772");
 
View Full Code Here

    int count = 1;
    r.next();
    LOG.info("START ************ TEST3686A---44");

    // Kill after one call to next(), which got 5 rows.
    rs.abort("die!");
    while(r.next() != null) {
      count ++;
    }
    assertEquals(NB_ROWS, count);
    r.close();
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.