Examples of heapSize()


Examples of org.apache.hadoop.hbase.io.HeapSize.heapSize()

    // Check if all blocks are properly cached and retrieved
    for (CachedItem block : blocks) {
      HeapSize buf = cache.getBlock(block.cacheKey, true, false, true);
      assertTrue(buf != null);
      assertEquals(buf.heapSize(), block.heapSize());
    }

    // Verify correctly calculated cache heap size
    assertEquals(expectedCacheSize, cache.heapSize());
View Full Code Here

Examples of org.apache.hadoop.hbase.io.HeapSize.heapSize()

    // Check if all blocks are properly cached and retrieved
    for (CachedItem block : blocks) {
      HeapSize buf = cache.getBlock(block.cacheKey, true, false, true);
      assertTrue(buf != null);
      assertEquals(buf.heapSize(), block.heapSize());
    }

    // Expect no evictions
    assertEquals(0, cache.getEvictionCount());
    Thread t = new LruBlockCache.StatisticsThread(cache);
View Full Code Here

Examples of org.apache.hadoop.hbase.io.HeapSize.heapSize()

    // Check if all blocks are properly cached and retrieved
    for (CachedItem block : blocks) {
      HeapSize buf = cache.getBlock(block.cacheKey, true, false);
      assertTrue(buf != null);
      assertEquals(buf.heapSize(), block.heapSize());
    }

    // Re-add same blocks and ensure nothing has changed
    for (CachedItem block : blocks) {
      try {
View Full Code Here

Examples of org.apache.hadoop.hbase.io.HeapSize.heapSize()

    // Check if all blocks are properly cached and retrieved
    for (CachedItem block : blocks) {
      HeapSize buf = cache.getBlock(block.cacheKey, true, false);
      assertTrue(buf != null);
      assertEquals(buf.heapSize(), block.heapSize());
    }

    // Expect no evictions
    assertEquals(0, cache.getEvictionCount());
    Thread t = new LruBlockCache.StatisticsThread(cache);
View Full Code Here

Examples of org.apache.hadoop.hbase.io.HeapSize.heapSize()

    // Check if all blocks are properly cached and retrieved
    for (CachedItem block : blocks) {
      HeapSize buf = cache.getBlock(block.cacheKey, true, false, true);
      assertTrue(buf != null);
      assertEquals(buf.heapSize(), block.heapSize());
    }

    // Re-add same blocks and ensure nothing has changed
    long expectedBlockCount = cache.getBlockCount();
    for (CachedItem block : blocks) {
View Full Code Here

Examples of org.apache.hadoop.hbase.io.HeapSize.heapSize()

    // Check if all blocks are properly cached and retrieved
    for (CachedItem block : blocks) {
      HeapSize buf = cache.getBlock(block.cacheKey, true, false, true);
      assertTrue(buf != null);
      assertEquals(buf.heapSize(), block.heapSize());
    }

    // Expect no evictions
    assertEquals(0, cache.getStats().getEvictionCount());
    Thread t = new LruBlockCache.StatisticsThread(cache);
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFile.BlockIndex.heapSize()

    long actual = 0L;
   
    cl = BlockIndex.class;
    expected = ClassSize.estimateBase(cl, false);
    BlockIndex bi = new BlockIndex(Bytes.BYTES_RAWCOMPARATOR);
    actual = bi.heapSize();
    //Since the arrays in BlockIndex(byte [][] blockKeys, long [] blockOffsets,
    //int [] blockDataSizes) are all null they are not going to show up in the
    //HeapSize calculation, so need to remove those array costs from ecpected.
    expected -= ClassSize.align(3 * ClassSize.ARRAY);
    if(expected != actual) {
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFile.BlockIndex.heapSize()

    long actual = 0L;
   
    cl = BlockIndex.class;
    expected = ClassSize.estimateBase(cl, false);
    BlockIndex bi = new BlockIndex(Bytes.BYTES_RAWCOMPARATOR);
    actual = bi.heapSize();
    //Since the arrays in BlockIndex(byte [][] blockKeys, long [] blockOffsets,
    //int [] blockDataSizes) are all null they are not going to show up in the
    //HeapSize calculation, so need to remove those array costs from ecpected.
    expected -= ClassSize.align(3 * ClassSize.ARRAY);
    if(expected != actual) {
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.metrics.SchemaConfigured.heapSize()

    // SchemaConfigured
    LOG.debug("Heap size for: " + SchemaConfigured.class.getName());
    SchemaConfigured sc = new SchemaConfigured(null, "myTable", "myCF");
    assertEquals(ClassSize.estimateBase(SchemaConfigured.class, true),
        sc.heapSize());

    // Store Overhead
    cl = Store.class;
    actual = Store.FIXED_OVERHEAD;
    expected = ClassSize.estimateBase(cl, false);
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.wal.HLogSplitter.RegionEntryBuffer.heapSize()

   
    assertTrue(sink.totalBuffered > 0);
    long amountInChunk = sink.totalBuffered;
    // Get a chunk
    RegionEntryBuffer chunk = sink.getChunkToWrite();
    assertEquals(chunk.heapSize(), amountInChunk);
   
    // Make sure it got marked that a thread is "working on this"
    assertTrue(sink.isRegionCurrentlyWriting(TEST_REGION));

    // Insert some more entries
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.