Examples of flushcache()


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

      Put p = new Put(Bytes.toBytes("row" + i));
      p.setDurability(Durability.SKIP_WAL);
      p.add(FAMILIES[0], columnStatus, Bytes.toBytes(i%2));
      testRegion.put(p);
    }
    testRegion.flushcache();
    // 1. got rows > "row4"
    Filter rowFilter = new RowFilter(CompareOp.GREATER,new BinaryComparator(Bytes.toBytes("row4")));
    Scan s1 = new Scan();
    s1.setFilter(rowFilter);
    InternalScanner scanner = testRegion.getScanner(s1);
View Full Code Here

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

                Bytes.toBytes(valueStr));
          }
        }
        region.put(p);
      }
      region.flushcache();
    }
    LruBlockCache blockCache =
        (LruBlockCache) new CacheConfig(conf).getBlockCache();
    blockCache.clearCache();
    assertEquals(0, blockCache.getBlockTypeCountsForTest().size());
View Full Code Here

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

    boolean first = true;
    for (HColumnDescriptor hcd: htd.getFamilies()) {
      addRegionEdits(rowName, hcd.getName(), countPerFamily, this.ee, region, "x");
      if (first ) {
        // If first, so we have at least one family w/ different seqid to rest.
        region.flushcache();
        first = false;
      }
    }
    // Now assert edits made it in.
    final Get g = new Get(rowName);
View Full Code Here

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

    Result result = region.get(g, null);
    assertEquals(countPerFamily * htd.getFamilies().size(),
      result.size());

    // Let us flush the region
    region.flushcache();
    region.close(true);
    wal.close();

    // delete the store files in the second column family to simulate a failure
    // in between the flushcache();
View Full Code Here

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

    assertEquals(writtenRowCount, getScannedCount(scanner));

    // Let us flush the region
    throwExceptionWhenFlushing.set(true);
    try {
      region.flushcache();
      fail("Injected exception hasn't been thrown");
    } catch (Throwable t) {
      LOG.info("Expected simulated exception when flushing region,"
          + t.getMessage());
      // simulated to abort server
View Full Code Here

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

    }
    writtenRowCount += moreRow;
    // call flush again
    throwExceptionWhenFlushing.set(false);
    try {
      region.flushcache();
    } catch (IOException t) {
      LOG.info("Expected exception when flushing region because server is stopped,"
          + t.getMessage());
    }
View Full Code Here

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

    // get the seq no after first set of entries.
    long sequenceNumber = wal.getSequenceNumber();

    // Let us flush the region
    // But this time completeflushcache is not yet done
    region.flushcache();
    for (HColumnDescriptor hcd : htd.getFamilies()) {
      addRegionEdits(rowName, hcd.getName(), 5, this.ee, region, "x");
    }
    long lastestSeqNumber = wal.getSequenceNumber();
    // get the current seq no
View Full Code Here

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

    Configuration hc = initSplit();
    HRegion region = initHRegion(tableName, getName(), hc,
      new Class<?>[]{CoprocessorImpl.class}, families);
    for (int i = 0; i < 3; i++) {
      addContent(region, fam3);
      region.flushcache();
    }

    region.compactStores();

    byte [] splitRow = region.checkSplit();
View Full Code Here

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

    // put a row and flush it to disk
    Put put = new Put(ROW);
    put.add(A, A, A);
    region.put(put);
    region.flushcache();
    Get get = new Get(ROW);
    Result r = region.get(get);
    assertNull(
      "Got an unexpected number of rows - no data should be returned with the NoDataFromScan coprocessor. Found: "
          + r, r.list());
View Full Code Here

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

      Put p = new Put(Bytes.toBytes((char)('a'+i) + "row"));
      p.setDurability(Durability.SKIP_WAL);
      p.add(family, qualifier, Bytes.toBytes(String.valueOf(111+i)));
      testRegion.put(p);
    }
    testRegion.flushcache();

    // rows starting with "b"
    PrefixFilter pf = new PrefixFilter(new byte[] {'b'}) ;
    // rows with value of column 'q1' set to '113'
    SingleColumnValueFilter scvf = new SingleColumnValueFilter(
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.