private Map<Integer, TDataNodeConfiguration> buildAvailableDataNodeMap(
      List<TDataNodeConfiguration> availableDataNodes) {
    return availableDataNodes.stream()
        .collect(
            Collectors.toMap(
                dataNode -> dataNode.getLocation().getDataNodeId(), Function.identity()));
  }
Constructs a mapping from DataNodeId to TDataNodeConfiguration from the available DataNodes.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/RemoveDataNodeHandler.java