private long updateSizeMetrics(LruCachedBlock cb, boolean evict) {
    long heapsize = cb.heapSize();
    BlockType bt = cb.getBuffer().getBlockType();
    if (evict) {
      heapsize *= -1;
    }
    if (bt != null && bt.isData()) {
      dataBlockSize.add(heapsize);
    }
    return size.addAndGet(heapsize);
  }
Helper function that updates the local size counter and also updates any per-cf or
per-blocktype metrics it can discern from given {@link LruCachedBlock}
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.java