ruanwenjun commented on code in PR #15278:
URL: 
https://github.com/apache/dolphinscheduler/pull/15278#discussion_r1415583417


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/GlobalMasterTaskExecuteRunnableQueue.java:
##########
@@ -17,38 +17,38 @@
 
 package org.apache.dolphinscheduler.server.master.runner;
 
-import 
org.apache.dolphinscheduler.server.master.runner.execute.MasterDelayTaskExecuteRunnable;
-import 
org.apache.dolphinscheduler.server.master.runner.execute.MasterTaskExecuteRunnable;
+import 
org.apache.dolphinscheduler.server.master.runner.execute.MasterTaskExecutor;
 
-import java.util.concurrent.DelayQueue;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
 
 import org.springframework.stereotype.Component;
 
 /**
  *
  */
 @Component
-public class MasterDelayTaskExecuteRunnableDelayQueue {
+public class GlobalMasterTaskExecuteRunnableQueue {
 
-    private final DelayQueue<MasterDelayTaskExecuteRunnable> 
masterDelayTaskExecuteRunnableDelayQueue =
-            new DelayQueue<>();
+    private final BlockingQueue<MasterTaskExecutor> 
masterTaskExecutorBlockingQueue =
+            new LinkedBlockingQueue<>();
 
-    public boolean 
submitMasterDelayTaskExecuteRunnable(MasterDelayTaskExecuteRunnable 
masterDelayTaskExecuteRunnable) {
-        return 
masterDelayTaskExecuteRunnableDelayQueue.offer(masterDelayTaskExecuteRunnable);
+    public boolean submitMasterTaskExecuteRunnable(MasterTaskExecutor 
masterTaskExecutor) {
+        return masterTaskExecutorBlockingQueue.offer(masterTaskExecutor);
     }
 
-    public MasterDelayTaskExecuteRunnable takeMasterDelayTaskExecuteRunnable() 
throws InterruptedException {
-        return masterDelayTaskExecuteRunnableDelayQueue.take();
+    public MasterTaskExecutor takeMasterTaskExecuteRunnable() throws 
InterruptedException {
+        return masterTaskExecutorBlockingQueue.take();
     }
 
     // todo: if we move the delay process to master, than we don't need this 
method, since dispatchProcess can directly

Review Comment:
   Done



-- 
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]

Reply via email to