You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by jo...@apache.org on 2020/03/24 04:46:05 UTC

[incubator-dolphinscheduler] branch refactor-worker updated: [Refactor worker] fix cpu pressure may be too high bug (#2290)

This is an automated email from the ASF dual-hosted git repository.

journey pushed a commit to branch refactor-worker
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/refactor-worker by this push:
     new 7da3523  [Refactor worker] fix cpu pressure may be too high bug (#2290)
7da3523 is described below

commit 7da35238e1c93a6aa5d38e7c63acd483aea5745e
Author: dailidong <da...@gmail.com>
AuthorDate: Tue Mar 24 12:45:55 2020 +0800

    [Refactor worker] fix cpu pressure may be too high bug (#2290)
    
    * update logback
    
    * update log
    
    * refactor worker registry (#2107)
    
    * Refactor worker (#2115)
    
    * refactor worker registry
    
    * refactor master server
    
    * Modify workgroupid parameter name (#2105)
    
    * Delete worker group management page
    
    * Modify workgroupid parameter name
    
    * Refactor worker (#2121)
    
    * refactor worker registry
    
    * refactor master server
    
    * refactor MasterSchedulerService
    
    * cancelTaskInstance set TaskExecutionContext host,logPath,executePath (#2126)
    
    * 1, master persistent task
    2. extract  master and worker communication model
    
    * 1, master persistent task
    2. extract  master and worker communication model
    
    * 1, master persistent task
    2. extract  master and worker communication model
    
    * add license
    
    * modify javadoc error
    
    * TaskExecutionContext create modify
    
    * buildAckCommand taskInstanceId not set modify
    
    * java doc error modify
    
    * add comment
    
    * ExecutorManager interface add generic type
    
    * add TaskInstanceCacheManager receive Worker report result
    
    * TaskInstance setExecutePath
    
    * add TaskInstanceCacheManager to receive Worker Task result report
    
    * TaskInstanceCacheManager add remove method
    
    * add license
    
    * add dispatcht task method
    
    * AbstractCommandExecutor remove db access
    
    * AbstractCommandExecutor remove db access
    
    * AbstractCommandExecutor remove db access
    
    * AbstractCommandExecutor remove db access
    
    * AbstractCommandExecutor remove db access
    
    * AbstractCommandExecutor remove db access
    
    * AbstractCommandExecutor remove db access
    
    * taskInstanceCache is null ,need load from db
    
    * taskInstanceCache is null ,need load from db
    
    * taskInstanceCache is null ,need load from db
    
    * 1,worker TaskPros use TaskExecutionContext replase
    2,Master kill Task , KillTaskProcessor modify
    
    * worker remove db
    
    * ShellTask modify
    
    * master persistence processId and appIds
    
    * master persistence processId and appIds
    
    * master add kill task logic
    
    * master add kill task logic
    
    * master add kill task logic
    
    * javadoc error modify
    
    * remove chinese log
    
    * executeDirectly method add Override
    
    * remote module modify
    
    * TaskKillResponseProcessor command type modify
    
    * create buildKillCommand
    
    * host add host:port format
    
    * host add host:port format
    
    * TaskAckProcessor modify
    
    * TaskAckProcessor modify
    
    * task prioriry refator
    
    * remove ITaskQueue
    
    * task prioriry refator
    
    * remove ITaskQueue
    
    * TaskPriority refactor
    
    * remove logs
    
    * WorkerServer refactor
    
    * MasterSchedulerService modify
    
    * WorkerConfig listen port modify
    
    * modify master and worker listen port
    
    * cancelTaskInstance set TaskExecutionContext host,logPath,executePath
    
    * cancelTaskInstance set TaskExecutionContext host,logPath,executePath
    
    Co-authored-by: qiaozhanwei <qi...@analysys.com.cn>
    
    * not exist in openjdk,just delete
    
    * add master and worker properties
    
    * add master and worker properties
    
    * add master and worker properties
    
    * fix cpu 100% bug
    
    Co-authored-by: Tboy <gu...@immomo.com>
    Co-authored-by: break60 <79...@qq.com>
    Co-authored-by: qiaozhanwei <qi...@outlook.com>
    Co-authored-by: qiaozhanwei <qi...@analysys.com.cn>
---
 .../server/master/consumer/TaskUpdateQueueConsumer.java                 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskUpdateQueueConsumer.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskUpdateQueueConsumer.java
index 8b00133..5f66c1b 100644
--- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskUpdateQueueConsumer.java
+++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskUpdateQueueConsumer.java
@@ -18,6 +18,7 @@
 package org.apache.dolphinscheduler.server.master.consumer;
 
 import com.alibaba.fastjson.JSONObject;
+import org.apache.dolphinscheduler.common.Constants;
 import org.apache.dolphinscheduler.common.enums.ExecutionStatus;
 import org.apache.dolphinscheduler.common.enums.TaskType;
 import org.apache.dolphinscheduler.common.enums.UdfType;
@@ -89,6 +90,7 @@ public class TaskUpdateQueueConsumer extends Thread{
         while (Stopper.isRunning()){
             try {
                 if (taskUpdateQueue.size() == 0){
+                    Thread.sleep(Constants.SLEEP_TIME_MILLIS);
                     continue;
                 }
                 String taskPriorityInfo = taskUpdateQueue.take();