public static TConfigNodeLocation matchRegisteredConfigNode(
      TConfigNodeLocation configNodeLocation, List<TConfigNodeLocation> registeredConfigNodes) {
    for (TConfigNodeLocation registeredConfigNode : registeredConfigNodes) {
      if (registeredConfigNode.getConfigNodeId() == configNodeLocation.getConfigNodeId()) {
        return registeredConfigNode;
      }
    }

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

@param configNodeLocation The given ConfigNode
@param registeredConfigNodes Registered ConfigNodes
@return The ConfigNodeLocation 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