private void initBlockCache() { this.blockCache = this.regionServer.getBlockCache(); this.cacheStats = this.blockCache.map(BlockCache::getStats); if (this.cacheStats.isPresent()) { if (this.cacheStats.get() instanceof CombinedBlockCache.CombinedCacheStats) { l1Stats = Optional .of(((CombinedBlockCache.CombinedCacheStats) this.cacheStats.get()).getLruCacheStats()); l2Stats = Optional.of(((CombinedBlockCache.CombinedCacheStats) this.cacheStats.get()) .getBucketCacheStats()); } else { l1Stats = this.cacheStats; } } }