Package org.apache.hadoop.hbase.regionserver

Examples of org.apache.hadoop.hbase.regionserver.HRegion.compactStores()


    for (int i = 0; i < 3; i++) {
      HBaseTestCase.addContent(region, fam3);
      region.flushcache();
    }

    region.compactStores();

    byte [] splitRow = region.checkSplit();

    assertNotNull(splitRow);
    HRegion [] regions = split(region, splitRow);
View Full Code Here


    for (int i = 0; i < 3; i++) {
      HBaseTestCase.addContent(region, fam3);
      region.flushcache();
    }

    region.compactStores();

    byte [] splitRow = region.checkSplit();

    assertNotNull(splitRow);
    HRegion [] regions = split(region, splitRow);
View Full Code Here

    assertEquals(expectedBlockMiss, cache.getStats().getMissCount());
    // compact, net minus two blocks, two hits, no misses
    System.out.println("Compacting");
    assertEquals(2, store.getStorefilesCount());
    store.triggerMajorCompaction();
    region.compactStores();
    waitForStoreFileCount(store, 1, 10000); // wait 10 seconds max
    assertEquals(1, store.getStorefilesCount());
    expectedBlockCount -= 2; // evicted two blocks, cached none
    assertEquals(expectedBlockCount, cache.getBlockCount());
    expectedBlockHits += 2;
View Full Code Here

    // Exercise both compaction codepaths.
    if (explicitCompaction) {
      HStore store = (HStore)region.getStore(FAMILY_BYTES);
      store.compactRecentForTestingAssumingDefaultPolicy(totalNumFiles);
    } else {
      region.compactStores();
    }

    region.close();
  }
}
View Full Code Here

    //verify correctness when memstore contains data
    doGets(region);

    //verify correctness again after compacting
    region.compactStores();
    doGets(region);


    Map<DataBlockEncoding, Integer> encodingCounts = cache.getEncodingCountsForTest();
View Full Code Here

          region.flushcache();
        }

        if (Math.random() < minorPercentage) {
          LOG.info("Minor compacting... ");
          region.compactStores(false);
        }

        if (Math.random() < majorPercentage) {
          LOG.info("Major compacting... ");
          region.compactStores(true);
View Full Code Here

    return this.rootRegion;
  }

  private HRegion openMetaRegion(HRegionInfo metaInfo) throws IOException {
    HRegion meta = HRegion.openHRegion(metaInfo, getLog(), this.conf);
    meta.compactStores();
    return meta;
  }

  /**
   * Set a single region on/offline.
View Full Code Here

          region.compactStores(false);
        }

        if (Math.random() < majorPercentage) {
          LOG.info("Major compacting... ");
          region.compactStores(true);
        }
      }
    }

    for (int i = 0; i < numberOfTests + 1; i++) {
View Full Code Here

        region.flushcache();
      }

      if (Math.random() < minorPercentage) {
        LOG.info("Minor compacting... ");
        region.compactStores(false);
      }

      if (Math.random() < majorPercentage) {
        LOG.info("Major compacting... ");
        region.compactStores(true);
View Full Code Here

        region.compactStores(false);
      }

      if (Math.random() < majorPercentage) {
        LOG.info("Major compacting... ");
        region.compactStores(true);
      }
    }

    for (int i = 0; i < numberOfTests + 1; i++) {
      Collection<KeyValue> kvSet;
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.