yiguolei commented on code in PR #54243:
URL: https://github.com/apache/doris/pull/54243#discussion_r2254027782
##########
fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroup.java:
##########
@@ -261,69 +293,98 @@ public static WorkloadGroup copyAndUpdate(WorkloadGroup
currentWorkloadGroup, Ma
private static void checkProperties(Map<String, String> properties) throws
DdlException {
for (String propertyName : properties.keySet()) {
if (!ALL_PROPERTIES_NAME.contains(propertyName)) {
- throw new DdlException("Property " + propertyName + " is not
supported.");
+ throw new DdlException("Property " + propertyName + " is not
supported, maybe it is deprecated.");
}
}
- if (properties.containsKey(CPU_SHARE)) {
- String inputValue = properties.get(CPU_SHARE);
+ int minCpuPercent = 0;
+ if (properties.containsKey(MIN_CPU_PERCENT)) {
+ String inputValue = properties.get(MIN_CPU_PERCENT);
+ String minCpuPercentStr = inputValue;
try {
- int cpuShareI = Integer.parseInt(inputValue);
- if (cpuShareI <= 0 && cpuShareI != -1) {
+ if (minCpuPercentStr.endsWith("%")) {
+ minCpuPercentStr = minCpuPercentStr.substring(0,
minCpuPercentStr.length() - 1);
+ }
+
+ minCpuPercent = Integer.parseInt(minCpuPercentStr);
Review Comment:
它并不是当系统出现资源不足的时候,只能使用min cpu percent 这么多资源,而是至少可以使用这么多资源。
--
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]