public TShowConfigurationResp showConfiguration(int nodeId) {
    TShowConfigurationResp resp = new TShowConfigurationResp();

    // data node
    Map<Integer, TDataNodeLocation> dataNodeLocationMap =
        configManager.getNodeManager().getRegisteredDataNodeLocations();
    if (dataNodeLocationMap.containsKey(nodeId)) {
      TDataNodeLocation dataNodeLocation = dataNodeLocationMap.get(nodeId);
      return (TShowConfigurationResp)
          SyncDataNodeClientPool.getInstance()
              .sendSyncRequestToDataNodeWithRetry(
                  dataNodeLocation.getInternalEndPoint(),
                  null,
                  CnToDnSyncRequestType.SHOW_CONFIGURATION);
    }

    // other config node
    for (TConfigNodeLocation registeredConfigNode : getRegisteredConfigNodes()) {
      if (registeredConfigNode.getConfigNodeId() != nodeId) {
        continue;
      }
      resp =
          (TShowConfigurationResp)
              SyncConfigNodeClientPool.getInstance()
                  .sendSyncRequestToConfigNodeWithRetry(
                      registeredConfigNode.getInternalEndPoint(),
                      nodeId,
                      CnToCnNodeRequestType.SHOW_CONFIGURATION);
      return resp;
    }
    return resp;
  }
Only leader use this interface, check the ConfigNode before remove it.

@param removeConfigNodePlan RemoveConfigNodePlan
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java