public Map<TConsensusGroupId, Map<Integer, RegionStatistics>> getCurrentRegionStatisticsMap(
      TConsensusGroupType type) {
    Map<TConsensusGroupId, Map<Integer, RegionStatistics>> regionStatisticsMap = new TreeMap<>();
    regionGroupCacheMap.forEach(
        (regionGroupId, regionGroupCache) -> {
          if (type.equals(regionGroupId.getType())) {
            regionStatisticsMap.put(
                regionGroupId, regionGroupCache.getCurrentStatistics().getRegionStatisticsMap());
          }
        });
    return regionStatisticsMap;
  }
Get the RegionStatistics of all Regions.

@param type DataRegion or SchemaRegion
@return a map of RegionStatistics
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/cache/LoadCache.java