boolean checkTotalMemoryUsed() {
    int totalSize = 0;
    for (IndexInformation info : cache.values()) {
      totalSize += info.getSize();
    }
    return totalSize == totalMemoryUsed.get();
  }
This method checks if cache and totolMemoryUsed is consistent.
It is only used for unit test.
@return True if cache and totolMemoryUsed is consistent
llap-server/src/java/org/apache/hadoop/hive/llap/shufflehandler/IndexCache.java