This is an automated email from the ASF dual-hosted git repository.

critas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 05ea4738871 finish (#14366)
05ea4738871 is described below

commit 05ea47388719bb7412074072625cf4c83bfdf57a
Author: Potato <[email protected]>
AuthorDate: Tue Dec 10 12:25:10 2024 +0800

    finish (#14366)
    
    Signed-off-by: OneSizeFitQuorum <[email protected]>
---
 .../org/apache/iotdb/confignode/persistence/node/NodeInfo.java | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git 
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/node/NodeInfo.java
 
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/node/NodeInfo.java
index a0e0b219434..059053a0382 100644
--- 
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/node/NodeInfo.java
+++ 
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/node/NodeInfo.java
@@ -290,6 +290,16 @@ public class NodeInfo implements SnapshotProcessor {
     return result;
   }
 
+  // Please do not delete this method even if is not used for now
+  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 total cpu cores in online DataNodes. */
   public int getDataNodeTotalCpuCoreCount() {
     int result = 0;

Reply via email to