@Override
  public void debugDumpShort(StringBuilder sb) {
    ArrayList<String> endResult = new ArrayList<>();
    Map<CacheTag, TagState> summaries = new TreeMap<>();

    for (TagState state : tagInfo.values()) {
      synchronized (state) {
        endResult.add(unsafePrintTagState(state));

        // Handle summary calculation
        CacheTag parentTag = CacheTag.createParentCacheTag(state.cacheTag);
        while (parentTag != null) {
          if (!summaries.containsKey(parentTag)) {
            summaries.put(parentTag, new TagState(parentTag));
          }
          TagState parentState = summaries.get(parentTag);
          parentState.bufferCount += state.bufferCount;
          parentState.maxCount += state.maxCount;
          parentState.totalSize += state.totalSize;
          parentState.maxSize += state.maxSize;
          parentTag = CacheTag.createParentCacheTag(parentTag);
        }
      }
    }
    for (TagState state : summaries.values()) {
      endResult.add(unsafePrintTagState(state));
    }
    sb.append("\nCache state: \n");
    sb.append(endResult.stream().sorted().collect(joining("\n")));
  }
A wrapper around cache eviction policy that tracks cache contents via tags.
llap-server/src/java/org/apache/hadoop/hive/llap/cache/CacheContentsTracker.java