private Map<Integer, Double> buildFreeDiskSpaceMap(
      List<TDataNodeConfiguration> availableDataNodes) {
    Map<Integer, Double> freeDiskSpaceMap = new HashMap<>(availableDataNodes.size());
    availableDataNodes.forEach(
        dataNode ->
            freeDiskSpaceMap.put(
                dataNode.getLocation().getDataNodeId(),
                configManager
                    .getLoadManager()
                    .getFreeDiskSpace(dataNode.getLocation().getDataNodeId())));
    return freeDiskSpaceMap;
  }
Constructs a mapping of free disk space for each DataNode.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/RemoveDataNodeHandler.java