Package org.apache.hadoop.hbase.regionserver

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


    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


          master.getAssignmentManager().getRegionStates().isRegionsInTransition());

      // Kill a few regionservers.
      for (int aborted = 0; aborted <= 2; aborted++) {
        HRegionServer hrs = TEST_UTIL.getMiniHBaseCluster().getRegionServer(aborted + 1);
        hrs.abort("Aborting");
      }

      // Wait for regions to come back online again.
      waitForAllRegionsOnline();
View Full Code Here

    log("Done mocking data up in ZK");

    // Kill the RS that had a hard death
    log("Killing RS " + deadServerName);
    hrsDead.abort("Killing for unit test");
    log("RS " + deadServerName + " killed");

    // Start up a new master.  Wait until regionserver is completely down
    // before starting new master because of hbase-4511.
    while (hrsDeadThread.isAlive()) {
View Full Code Here

    HRegion metaRegion = null;
    HRegionServer metaRegionServer = null;
    for (RegionServerThread regionServerThread : regionServerThreads) {
      HRegionServer regionServer = regionServerThread.getRegionServer();
      metaRegion = regionServer.getOnlineRegion(HRegionInfo.FIRST_META_REGIONINFO.getRegionName());
      regionServer.abort("");
      if (null != metaRegion) {
        metaRegionServer = regionServer;
        break;
      }
    }
View Full Code Here

    try {
      LOG.info("Aborting " + server.getHServerInfo().toString());
    } catch (IOException e) {
      e.printStackTrace();
    }
    server.abort();
  }

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

        }
      } catch (Exception ex) {
        String msg =
            "Splitting of index region has failed in stepsAfterPONR stage so aborting the server";
        LOG.error(msg, ex);
        rs.abort(msg);
      }
    }
  }

  // A thread local variable used to get the splitted region information of the index region.
View Full Code Here

      }
    } catch (Exception e) {
      LOG.error(
        "Error while rolling back the split failure for index region "
            + splitTransaction.getParent(), e);
      rs.abort("Abort; we got an error during rollback of index");
    }
  }

  // For testing to check whether final step of seek point is added
  public static void setSeekpointAdded(boolean isSeekpointAddded) {
View Full Code Here

    String tableName = "testRandomAssignmentAfterRegionServerDown";
    String indexTableName =
        "testRandomAssignmentAfterRegionServerDown" + Constants.INDEX_TABLE_SUFFIX;
    HRegionServer regionServer = cluster.getRegionServer(1);
    regionServer.abort("Aborting to test random assignment after region server down");
    while (master.getServerManager().areDeadServersInProgress()) {
      Thread.sleep(1000);
    }
    int totalNumRegions = 21;
    List<Pair<byte[], ServerName>> iTableStartKeysAndLocations = null;
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

    Configuration conf = new Configuration(TEST_UTIL.getConfiguration());
    conf.setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, SCANNER_TIMEOUT * 100);
    Table 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

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.