public Map<Integer, NodeStatistics> getCurrentDataNodeStatisticsMap() {
    Map<Integer, NodeStatistics> dataNodeStatisticsMap = new TreeMap<>();
    nodeCacheMap.forEach(
        (nodeId, nodeCache) -> {
          if (nodeCache instanceof DataNodeHeartbeatCache) {
            dataNodeStatisticsMap.put(nodeId, (NodeStatistics) nodeCache.getCurrentStatistics());
          }
        });
    return dataNodeStatisticsMap;
  }
Get the NodeStatistics of all DataNodes.

@return a map of all DataNodes' NodeStatistics
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/cache/LoadCache.java