public static List<TEndPoint> checkConflictTEndPointForNewAINode(
      TAINodeLocation newAINodeLocation, List<TAINodeConfiguration> registeredAINodes) {
    Set<TEndPoint> conflictEndPointSet = new HashSet<>();
    for (TAINodeConfiguration registeredAINode : registeredAINodes) {
      TAINodeLocation registeredLocation = registeredAINode.getLocation();
      if (registeredLocation
          .getInternalEndPoint()
          .equals(newAINodeLocation.getInternalEndPoint())) {
        conflictEndPointSet.add(newAINodeLocation.getInternalEndPoint());
      }
    }

    return new ArrayList<>(conflictEndPointSet);
  }
Check if there exist conflict TEndPoints on the DataNode to be registered.

@param newAINodeLocation The TDataNodeLocation of the DataNode to be registered
@param registeredAINodes All registered DataNodes
@return The conflict TEndPoints if exist
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/ClusterNodeStartUtils.java