public boolean checkEnoughDataNodeAfterRemoving(List<TDataNodeLocation> removedDataNodes) {
    int availableDatanodeSize =
        configManager
            .getNodeManager()
            .filterDataNodeThroughStatus(NodeStatus.Running, NodeStatus.ReadOnly)
            .size();

    int removedDataNodeSize =
        (int)
            removedDataNodes.stream()
                .filter(
                    x ->
                        configManager.getLoadManager().getNodeStatus(x.getDataNodeId())
                            != NodeStatus.Unknown)
                .count();

    return availableDatanodeSize - removedDataNodeSize >= NodeInfo.getMinimumDataNode();
  }
Check if the data nodes are sufficient after removing.

@param removedDataNodes List<TDataNodeLocation>
@return true if the number of DataNodes is enough, false otherwise
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/RemoveDataNodeHandler.java