This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/dev/1.3 by this push:
new c53ff411303 finish (#14366)
c53ff411303 is described below
commit c53ff41130301b7b09885ac266256138222fff4a
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;