public static TAINodeLocation matchRegisteredAINode(
      TAINodeLocation aiNodeLocation, List<TAINodeConfiguration> registeredAINodes) {
    for (TAINodeConfiguration registeredAINode : registeredAINodes) {
      if (registeredAINode.getLocation().getAiNodeId() == aiNodeLocation.getAiNodeId()) {
        return registeredAINode.getLocation();
      }
    }

    return null;
  }
Check if there exists a registered AINode who has the same index of the given one.

@param aiNodeLocation The given AINode
@param registeredAINodes Registered AINodes
@return The AINodeLocation who has the same index of the given one, null otherwise.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/ClusterNodeStartUtils.java