public int getDataNodeCpuCoreCount(int dataNodeId) {
    try {
      return registeredDataNodes.get(dataNodeId).getResource().getCpuCoreNum();
    } catch (Exception e) {
      LOGGER.warn("Get DataNode {} cpu core fail, will be treated as zero.", dataNodeId, e);
      return 0;
    }
  }
Return the number of registered DataNodes.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/node/NodeInfo.java