public static BlockCache createBlockCache(Configuration conf,
    Map<String, HRegion> onlineRegions) {
    FirstLevelBlockCache l1Cache = createFirstLevelCache(conf);
    if (l1Cache == null) {
      return null;
    }
    boolean useExternal = conf.getBoolean(EXTERNAL_BLOCKCACHE_KEY, EXTERNAL_BLOCKCACHE_DEFAULT);
    if (useExternal) {
      BlockCache l2CacheInstance = createExternalBlockcache(conf);
      return l2CacheInstance == null
        ? l1Cache
        : new InclusiveCombinedBlockCache(l1Cache, l2CacheInstance);
    } else {
      // otherwise use the bucket cache.
      BucketCache bucketCache = createBucketCache(conf, onlineRegions);
      if (!conf.getBoolean("hbase.bucketcache.combinedcache.enabled", true)) {
        // Non combined mode is off from 2.0
        LOG.warn(
          "From HBase 2.0 onwards only combined mode of LRU cache and bucket cache is available");
      }
      return bucketCache == null ? l1Cache : new CombinedBlockCache(l1Cache, bucketCache);
    }
  }
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