Class TestHeapMemoryManager.BlockCacheStub

java.lang.Object
org.apache.hadoop.hbase.regionserver.TestHeapMemoryManager.BlockCacheStub
All Implemented Interfaces:
Iterable<org.apache.hadoop.hbase.io.hfile.CachedBlock>, org.apache.hadoop.hbase.io.hfile.BlockCache, org.apache.hadoop.hbase.io.hfile.ResizableBlockCache
Enclosing class:
TestHeapMemoryManager

private static class TestHeapMemoryManager.BlockCacheStub extends Object implements org.apache.hadoop.hbase.io.hfile.ResizableBlockCache
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) long
     
    (package private) org.apache.hadoop.hbase.io.hfile.CacheStats
     
    private long
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlockCacheStub(long size)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cacheBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey cacheKey, org.apache.hadoop.hbase.io.hfile.Cacheable buf)
     
    void
    cacheBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey cacheKey, org.apache.hadoop.hbase.io.hfile.Cacheable buf, boolean inMemory)
     
    boolean
    evictBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey cacheKey)
     
    int
     
    org.apache.hadoop.hbase.io.hfile.Cacheable
    getBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey cacheKey, boolean caching, boolean repeat, boolean updateCacheMetrics)
     
    org.apache.hadoop.hbase.io.hfile.BlockCache[]
     
    long
     
    long
     
    long
     
    long
     
    long
     
    long
     
    org.apache.hadoop.hbase.io.hfile.CacheStats
     
    Iterator<org.apache.hadoop.hbase.io.hfile.CachedBlock>
     
    void
    setMaxSize(long size)
     
    void
    setTestBlockSize(long testBlockSize)
     
    void
     
    long
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.hadoop.hbase.io.hfile.BlockCache

    blockFitsIntoTheCache, cacheBlock, getBlockSize, getFullyCachedFiles, isAlreadyCached, isMetaBlock, notifyFileBlockEvicted, notifyFileCachingCompleted, shouldCacheFile

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Field Details

  • Constructor Details

  • Method Details

    • cacheBlock

      public void cacheBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey cacheKey, org.apache.hadoop.hbase.io.hfile.Cacheable buf, boolean inMemory)
      Specified by:
      cacheBlock in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • cacheBlock

      public void cacheBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey cacheKey, org.apache.hadoop.hbase.io.hfile.Cacheable buf)
      Specified by:
      cacheBlock in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • getBlock

      public org.apache.hadoop.hbase.io.hfile.Cacheable getBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey cacheKey, boolean caching, boolean repeat, boolean updateCacheMetrics)
      Specified by:
      getBlock in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • evictBlock

      public boolean evictBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey cacheKey)
      Specified by:
      evictBlock in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • evictBlocksByHfileName

      public int evictBlocksByHfileName(String hfileName)
      Specified by:
      evictBlocksByHfileName in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • getStats

      public org.apache.hadoop.hbase.io.hfile.CacheStats getStats()
      Specified by:
      getStats in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • size

      public long size()
      Specified by:
      size in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • getMaxSize

      public long getMaxSize()
      Specified by:
      getMaxSize in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • getFreeSize

      public long getFreeSize()
      Specified by:
      getFreeSize in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • getCurrentSize

      public long getCurrentSize()
      Specified by:
      getCurrentSize in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • getCurrentDataSize

      public long getCurrentDataSize()
      Specified by:
      getCurrentDataSize in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • getBlockCount

      public long getBlockCount()
      Specified by:
      getBlockCount in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • getDataBlockCount

      public long getDataBlockCount()
      Specified by:
      getDataBlockCount in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • setMaxSize

      public void setMaxSize(long size)
      Specified by:
      setMaxSize in interface org.apache.hadoop.hbase.io.hfile.ResizableBlockCache
    • iterator

      public Iterator<org.apache.hadoop.hbase.io.hfile.CachedBlock> iterator()
      Specified by:
      iterator in interface org.apache.hadoop.hbase.io.hfile.BlockCache
      Specified by:
      iterator in interface Iterable<org.apache.hadoop.hbase.io.hfile.CachedBlock>
    • getBlockCaches

      public org.apache.hadoop.hbase.io.hfile.BlockCache[] getBlockCaches()
      Specified by:
      getBlockCaches in interface org.apache.hadoop.hbase.io.hfile.BlockCache
    • setTestBlockSize

      public void setTestBlockSize(long testBlockSize)