public AINodeConfigurationResp getAINodeConfiguration(
      GetAINodeConfigurationPlan getAINodeConfigurationPlan) {
    AINodeConfigurationResp result = new AINodeConfigurationResp();
    result.setStatus(new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()));

    int aiNodeId = getAINodeConfigurationPlan.getAiNodeId();
    aiNodeInfoReadWriteLock.readLock().lock();
    try {
      if (aiNodeId == -1) {
        result.setAiNodeConfigurationMap(new HashMap<>(registeredAINodes));
      } else {
        result.setAiNodeConfigurationMap(
            registeredAINodes.get(aiNodeId) == null
                ? new HashMap<>(0)
                : Collections.singletonMap(aiNodeId, registeredAINodes.get(aiNodeId)));
      }
    } finally {
      aiNodeInfoReadWriteLock.readLock().unlock();
    }
    return result;
  }
Get DataNodeConfiguration.

@param getDataNodeConfigurationPlan GetDataNodeConfigurationPlan
@return The specific DataNode's configuration or all DataNodes' configuration if dataNodeId in
    GetDataNodeConfigurationPlan is -1
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/node/NodeInfo.java