@Override
  public void cacheBlock(BlockCacheKey key, Cacheable value) {
    if (value.heapSize() > maxBlockSize) {
      // If there are a lot of blocks that are too big this can make the logs too noisy (2% logged)
      if (stats.failInsert() % 50 == 0) {
        LOG.warn(String.format(
          "Trying to cache too large a block %s @ %,d is %,d which is larger than %,d",
          key.getHfileName(), key.getOffset(), value.heapSize(), DEFAULT_MAX_BLOCK_SIZE));
      }
    } else {
      value = asReferencedHeapBlock(value);
      cache.put(key, value);
    }
  }
Creates a block cache.
@param maximumSizeInBytes maximum size of this cache, in bytes
@param avgBlockSize       expected average size of blocks, in bytes
@param maxBlockSize       maximum size of a block, in bytes
@param executor           the cache's executor
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/TinyLfuBlockCache.java