Package org.apache.hadoop.hbase.HMemcache

Examples of org.apache.hadoop.hbase.HMemcache.Snapshot


      throws IOException {
    // Save off old state.
    int oldHistorySize = hmc.history.size();
    TreeMap<HStoreKey, BytesWritable> oldMemcache = hmc.memcache;
    // Run snapshot.
    Snapshot s = hmc.snapshotMemcacheForLog(log);
    // Make some assertions about what just happened.
    assertEquals("Snapshot equals old memcache", hmc.snapshot,
        oldMemcache);
    assertEquals("Returned snapshot holds old memcache",
        s.memcacheSnapshot, oldMemcache);
View Full Code Here


    HLog log = getLogfile();
    try {
      // Add some rows, run a snapshot. Do it a few times.
      for (int i = 0; i < snapshotCount; i++) {
        addRows(this.hmemcache);
        Snapshot s = runSnapshot(this.hmemcache, log);
        log.completeCacheFlush(new Text(Integer.toString(i)),
            tableName, s.sequenceId);
        // Clean up snapshot now we are done with it.
        this.hmemcache.deleteSnapshot();
      }
View Full Code Here

   
    // Save off old state.
    int oldHistorySize = hmc.history.size();
    SortedMap<HStoreKey, byte []> oldMemcache = hmc.memcache;
    // Run snapshot.
    Snapshot s = hmc.snapshotMemcacheForLog(log);
    // Make some assertions about what just happened.
    assertEquals("Snapshot equals old memcache", hmc.snapshot,
        oldMemcache);
    assertEquals("Returned snapshot holds old memcache",
        s.memcacheSnapshot, oldMemcache);
View Full Code Here

    HLog log = getLogfile();
    // Add some rows, run a snapshot. Do it a few times.
    for (int i = 0; i < snapshotCount; i++) {
      addRows(this.hmemcache);
      int historyInitialSize = this.hmemcache.history.size();
      Snapshot s = runSnapshot(this.hmemcache, log);
      log.completeCacheFlush(new Text(Integer.toString(i)),
          tableName, s.sequenceId);
      // Clean up snapshot now we are done with it.
      this.hmemcache.deleteSnapshot();
      assertTrue("History not being cleared",
View Full Code Here

      throws IOException {
    // Save off old state.
    int oldHistorySize = hmc.history.size();
    TreeMap<HStoreKey, byte []> oldMemcache = hmc.memcache;
    // Run snapshot.
    Snapshot s = hmc.snapshotMemcacheForLog(log);
    // Make some assertions about what just happened.
    assertEquals("Snapshot equals old memcache", hmc.snapshot,
        oldMemcache);
    assertEquals("Returned snapshot holds old memcache",
        s.memcacheSnapshot, oldMemcache);
View Full Code Here

    final Text tableName = new Text(getName());
    HLog log = getLogfile();
    // Add some rows, run a snapshot. Do it a few times.
    for (int i = 0; i < snapshotCount; i++) {
      addRows(this.hmemcache);
      Snapshot s = runSnapshot(this.hmemcache, log);
      log.completeCacheFlush(new Text(Integer.toString(i)),
          tableName, s.sequenceId);
      // Clean up snapshot now we are done with it.
      this.hmemcache.deleteSnapshot();
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.HMemcache.Snapshot

Copyright © 2018 www.massapicom. 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.