Examples of HRegionIncommon


Examples of org.apache.hadoop.hbase.HBaseTestCase.HRegionIncommon

   * @throws Exception
   */
  @Test
  public void testScanAndRealConcurrentFlush() throws Exception {
    this.r = TEST_UTIL.createLocalHRegion(TESTTABLEDESC, null, null);
    HRegionIncommon hri = new HRegionIncommon(r);
    try {
        LOG.info("Added: " + HBaseTestCase.addContent(hri, Bytes.toString(HConstants.CATALOG_FAMILY),
            Bytes.toString(HConstants.REGIONINFO_QUALIFIER)));
      int count = count(hri, -1, false);
      assertEquals(count, count(hri, 100, true)); // do a true concurrent background thread flush
View Full Code Here

Examples of org.apache.hadoop.hbase.HBaseTestCase.HRegionIncommon

  @Test
  @SuppressWarnings("deprecation")
  public void testScanAndConcurrentMajorCompact() throws Exception {
    HTableDescriptor htd = TEST_UTIL.createTableDescriptor(name.getMethodName());
    this.r = TEST_UTIL.createLocalHRegion(htd, null, null);
    HRegionIncommon hri = new HRegionIncommon(r);

    try {
      HBaseTestCase.addContent(hri, Bytes.toString(fam1), Bytes.toString(col1),
          firstRowBytes, secondRowBytes);
      HBaseTestCase.addContent(hri, Bytes.toString(fam2), Bytes.toString(col1),
View Full Code Here

Examples of org.apache.hadoop.hbase.HBaseTestCase.HRegionIncommon

  private void testMinorCompactionWithDelete(Delete delete) throws Exception {
    testMinorCompactionWithDelete(delete, 0);
  }

  private void testMinorCompactionWithDelete(Delete delete, int expectedResultsAfterDelete) throws Exception {
    HRegionIncommon loader = new HRegionIncommon(r);
    for (int i = 0; i < compactionThreshold + 1; i++) {
      HBaseTestCase.addContent(loader, Bytes.toString(fam1), Bytes.toString(col1), firstRowBytes,
        thirdRowBytes, i);
      HBaseTestCase.addContent(loader, Bytes.toString(fam1), Bytes.toString(col2), firstRowBytes,
        thirdRowBytes, i);
View Full Code Here

Examples of org.apache.hadoop.hbase.HBaseTestCase.HRegionIncommon

    try {
      // Create a couple store files w/ 15KB (over 10KB interval)
      int jmax = (int) Math.ceil(15.0/compactionThreshold);
      byte [] pad = new byte[1000]; // 1 KB chunk
      for (int i = 0; i < compactionThreshold; i++) {
        HRegionIncommon loader = new HRegionIncommon(r);
        Put p = new Put(Bytes.add(STARTROW, Bytes.toBytes(i)));
        p.setDurability(Durability.SKIP_WAL);
        for (int j = 0; j < jmax; j++) {
          p.add(COLUMN_FAMILY, Bytes.toBytes(j), pad);
        }
        HBaseTestCase.addContent(loader, Bytes.toString(COLUMN_FAMILY));
        loader.put(p);
        loader.flushcache();
      }

      HRegion spyR = spy(r);
      doAnswer(new Answer() {
        public Object answer(InvocationOnMock invocation) throws Throwable {
View Full Code Here

Examples of org.apache.hadoop.hbase.HBaseTestCase.HRegionIncommon

  private void createStoreFile(final HRegion region) throws IOException {
    createStoreFile(region, Bytes.toString(COLUMN_FAMILY));
  }

  private void createStoreFile(final HRegion region, String family) throws IOException {
    HRegionIncommon loader = new HRegionIncommon(region);
    HBaseTestCase.addContent(loader, family);
    loader.flushcache();
  }
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.