Skip to content

Commit 05ea473

Browse files
finish (apache#14366)
Signed-off-by: OneSizeFitQuorum <[email protected]>
1 parent e48aa4f commit 05ea473

File tree

1 file changed

+10
-0
lines changed
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/node

1 file changed

+10
-0
lines changed

iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/node/NodeInfo.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,16 @@ public int getRegisteredDataNodeCount() {
290290
return result;
291291
}
292292

293+
// Please do not delete this method even if is not used for now
294+
public int getDataNodeCpuCoreCount(int dataNodeId) {
295+
try {
296+
return registeredDataNodes.get(dataNodeId).getResource().getCpuCoreNum();
297+
} catch (Exception e) {
298+
LOGGER.warn("Get DataNode {} cpu core fail, will be treated as zero.", dataNodeId, e);
299+
return 0;
300+
}
301+
}
302+
293303
/** Return the number of total cpu cores in online DataNodes. */
294304
public int getDataNodeTotalCpuCoreCount() {
295305
int result = 0;

0 commit comments

Comments
 (0)