mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-03 12:48:46 +08:00
[Bug][Worker] get worker status bug (#13992)
* get worker status bug * modify configuration name
This commit is contained in:
parent
5c1edd2912
commit
731123cebc
@ -55,6 +55,6 @@ If either of these is lower than the configured item, then this worker will not
|
||||
|
||||
You can customise the configuration by changing the following properties in worker.properties
|
||||
|
||||
- worker.max.cpuload.avg=-1 (worker max cpuload avg, only higher than the system cpu load average, worker server can be dispatched tasks. default value -1: the number of cpu cores * 2)
|
||||
- worker.reserved.memory=0.3 (worker reserved memory, only lower than system available memory, worker server can be dispatched tasks. default value 0.3, the unit is G)
|
||||
- worker.max.cpu.load.avg=-1 (worker max cpu load avg, only higher than the system cpu load average, worker server can be dispatched tasks. default value -1: the number of cpu cores * 2)
|
||||
- worker.reserved.memory=0.3 (worker reserved memory, only lower than system available memory, worker server can be dispatched tasks. default value 0.3, the unit is percentage)
|
||||
|
||||
|
@ -55,6 +55,6 @@ eg:master.host.selector=random(不区分大小写)
|
||||
|
||||
你可以在 worker.properties 修改下面的属性来自定义配置
|
||||
|
||||
* worker.max.cpuload.avg=-1 (worker最大cpuload均值,只有高于系统cpuload均值时,worker服务才能被派发任务. 默认值为-1: cpu cores * 2)
|
||||
* worker.reserved.memory=0.3 (worker预留内存,只有低于系统可用内存时,worker服务才能被派发任务,单位为G)
|
||||
* worker.max.cpu.load.avg=-1 (worker最大cpu load均值,只有高于系统cpu load均值时,worker服务才能被派发任务. 默认值为-1: cpu cores * 2)
|
||||
* worker.reserved.memory=0.3 (worker预留内存,只有低于系统可用内存时,worker服务才能被派发任务,单位为百分比)
|
||||
|
||||
|
@ -94,10 +94,10 @@ public class WorkerHeartBeatTask extends BaseHeartBeatTask<WorkerHeartBeat> {
|
||||
double reservedMemory,
|
||||
int workerExecThreadCount,
|
||||
int workerWaitingTaskCount) {
|
||||
if (cpuUsagePercentage > maxCpuUsePercentage || memoryUsagePercentage < reservedMemory) {
|
||||
if (cpuUsagePercentage > maxCpuUsePercentage || (1 - memoryUsagePercentage) < reservedMemory) {
|
||||
log.warn(
|
||||
"current cpu load average {} is higher than {} max.cpuload.avg or available memory {} is lower than {} reserved.memory={}",
|
||||
cpuUsagePercentage, maxCpuUsePercentage, memoryUsagePercentage, reservedMemory);
|
||||
"current cpu load average {} is higher than {} or available memory {} is lower than {}",
|
||||
cpuUsagePercentage, maxCpuUsePercentage, 1 - memoryUsagePercentage, reservedMemory);
|
||||
return Constants.ABNORMAL_NODE_STATUS;
|
||||
} else if (workerWaitingTaskCount > workerExecThreadCount) {
|
||||
log.warn("current waiting task count {} is large than worker thread count {}, worker is busy",
|
||||
|
Loading…
Reference in New Issue
Block a user