public boolean containsAINode(int aiNodeId) {
    aiNodeInfoReadWriteLock.readLock().lock();
    try {
      return registeredAINodes.containsKey(aiNodeId);
    } finally {
      aiNodeInfoReadWriteLock.readLock().unlock();
    }
  }
Return the number of registered DataNodes.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/node/NodeInfo.java