yiguolei commented on code in PR #54243:
URL: https://github.com/apache/doris/pull/54243#discussion_r2256024874
##########
fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroup.java:
##########
@@ -553,6 +614,52 @@ public long getVersion() {
return version;
}
+ public int getMinCpuPercent() {
+ String minCpuPercentStr = properties.get(MIN_CPU_PERCENT);
+ if (minCpuPercentStr.endsWith("%")) {
+ return Integer.valueOf(minCpuPercentStr.substring(0,
minCpuPercentStr.length() - 1));
+ }
+ return Integer.valueOf(minCpuPercentStr);
+ }
+
+ public int getMaxCpuPercent() {
+ String maxCpuPercentStr = properties.get(MAX_CPU_PERCENT);
+ if (maxCpuPercentStr.endsWith("%")) {
+ return Integer.valueOf(maxCpuPercentStr.substring(0,
maxCpuPercentStr.length() - 1));
+ }
+ return Integer.valueOf(maxCpuPercentStr);
+ }
+
+ public int getMinMemoryPercent() {
+ String minMemPercentStr = properties.get(MIN_MEMORY_PERCENT);
+ if (minMemPercentStr.endsWith("%")) {
+ return Integer.valueOf(minMemPercentStr.substring(0,
+ minMemPercentStr.length() - 1));
+ }
+ return Integer.valueOf(minMemPercentStr);
+ }
+
+ public int getMaxMemoryPercent() {
+ String maxMemPercentStr = properties.get(MAX_MEMORY_PERCENT);
Review Comment:
嗯,是的。
我后来是写迷糊了,不知道什么时候用的%结尾,所以直接都判断一下是否%
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]