private static FirstLevelBlockCache createFirstLevelCache(final Configuration c) {
    final long cacheSize = MemorySizeUtil.getOnHeapCacheSize(c);
    if (cacheSize < 0) {
      return null;
    }
    String policy = c.get(BLOCKCACHE_POLICY_KEY, BLOCKCACHE_POLICY_DEFAULT);
    int blockSize = c.getInt(BLOCKCACHE_BLOCKSIZE_KEY, HConstants.DEFAULT_BLOCKSIZE);
    LOG.info("Allocating BlockCache size=" + StringUtils.byteDesc(cacheSize) + ", blockSize="
      + StringUtils.byteDesc(blockSize));
    if (policy.equalsIgnoreCase("LRU")) {
      return new LruBlockCache(cacheSize, blockSize, true, c);
    } else if (policy.equalsIgnoreCase("IndexOnlyLRU")) {
      return new IndexOnlyLruBlockCache(cacheSize, blockSize, true, c);
    } else if (policy.equalsIgnoreCase("TinyLFU")) {
      return new TinyLfuBlockCache(cacheSize, blockSize, ForkJoinPool.commonPool(), c);
    } else if (policy.equalsIgnoreCase("AdaptiveLRU")) {
      return new LruAdaptiveBlockCache(cacheSize, blockSize, true, c);
    } else {
      throw new IllegalArgumentException("Unknown policy: " + policy);
    }
  }
Default number of periods in the window. We define 12 periods of 5 minutes to give an hourly
split of 5 minutes periods.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheFactory.java