public List<TConfigNodeInfo4InformationSchema> getRegisteredConfigNodeInfo4InformationSchema() {
    final List<TConfigNodeInfo4InformationSchema> configNodeInfoList = new ArrayList<>();
    final List<TConfigNodeLocation> registeredConfigNodes = this.getRegisteredConfigNodes();
    if (registeredConfigNodes != null) {
      registeredConfigNodes.forEach(
          configNodeLocation -> {
            final TConfigNodeInfo4InformationSchema info = new TConfigNodeInfo4InformationSchema();
            final int configNodeId = configNodeLocation.getConfigNodeId();
            info.setConfigNodeId(configNodeId);
            info.setConsensusPort(configNodeLocation.getConsensusEndPoint().getPort());
            info.setRoleType(
                configNodeLocation.getConfigNodeId() == ConfigNodeHeartbeatCache.CURRENT_NODE_ID
                    ? RegionRoleType.Leader.name()
                    : RegionRoleType.Follower.name());
            configNodeInfoList.add(info);
          });
    }
    configNodeInfoList.sort(
        Comparator.comparingInt(TConfigNodeInfo4InformationSchema::getConfigNodeId));
    return configNodeInfoList;
  }
Only leader use this interface.

<p>Notice: The result will be an empty TDataNodeConfiguration if the specified DataNode doesn't
register

@param dataNodeId The specified DataNode's index
@return The specified registered DataNode
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java