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


##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/runner/DefaultWorkerTaskExecutorFactory.java:
##########
@@ -28,24 +28,23 @@
 
 import lombok.NonNull;
 
-public abstract class WorkerDelayTaskExecuteRunnableFactory<T extends 
WorkerDelayTaskExecuteRunnable>
+public class DefaultWorkerTaskExecutorFactory
         implements
-            WorkerTaskExecuteRunnableFactory<T> {
-
-    protected final @NonNull TaskExecutionContext taskExecutionContext;
-    protected final @NonNull WorkerConfig workerConfig;
-    protected final @NonNull WorkerMessageSender workerMessageSender;
-    protected final @NonNull TaskPluginManager taskPluginManager;
-    protected final @Nullable StorageOperate storageOperate;
-    protected final @NonNull WorkerRegistryClient workerRegistryClient;
-
-    protected WorkerDelayTaskExecuteRunnableFactory(
-                                                    @NonNull 
TaskExecutionContext taskExecutionContext,
-                                                    @NonNull WorkerConfig 
workerConfig,
-                                                    @NonNull 
WorkerMessageSender workerMessageSender,
-                                                    @NonNull TaskPluginManager 
taskPluginManager,
-                                                    @Nullable StorageOperate 
storageOperate,
-                                                    @NonNull 
WorkerRegistryClient workerRegistryClient) {
+            WorkerTaskExecutorFactory<DefaultWorkerTaskExecutor> {
+
+    private final @NonNull TaskExecutionContext taskExecutionContext;
+    private final @NonNull WorkerConfig workerConfig;
+    private final @NonNull WorkerMessageSender workerMessageSender;
+    private final @NonNull TaskPluginManager taskPluginManager;
+    private final @Nullable StorageOperate storageOperate;
+    private final @NonNull WorkerRegistryClient workerRegistryClient;
+
+    public DefaultWorkerTaskExecutorFactory(@NonNull TaskExecutionContext 
taskExecutionContext,
+                                            @NonNull WorkerConfig workerConfig,
+                                            @NonNull WorkerMessageSender 
workerMessageSender,
+                                            @NonNull TaskPluginManager 
taskPluginManager,
+                                            @Nullable StorageOperate 
storageOperate,
+                                            @NonNull WorkerRegistryClient 
workerRegistryClient) {

Review Comment:
   We rely the workerRegistryClient to find the AlertServer's host, we will 
send Task content to AlertServer.



##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/runner/DefaultWorkerTaskExecutorFactory.java:
##########
@@ -28,24 +28,23 @@
 
 import lombok.NonNull;
 
-public abstract class WorkerDelayTaskExecuteRunnableFactory<T extends 
WorkerDelayTaskExecuteRunnable>
+public class DefaultWorkerTaskExecutorFactory
         implements
-            WorkerTaskExecuteRunnableFactory<T> {
-
-    protected final @NonNull TaskExecutionContext taskExecutionContext;
-    protected final @NonNull WorkerConfig workerConfig;
-    protected final @NonNull WorkerMessageSender workerMessageSender;
-    protected final @NonNull TaskPluginManager taskPluginManager;
-    protected final @Nullable StorageOperate storageOperate;
-    protected final @NonNull WorkerRegistryClient workerRegistryClient;
-
-    protected WorkerDelayTaskExecuteRunnableFactory(
-                                                    @NonNull 
TaskExecutionContext taskExecutionContext,
-                                                    @NonNull WorkerConfig 
workerConfig,
-                                                    @NonNull 
WorkerMessageSender workerMessageSender,
-                                                    @NonNull TaskPluginManager 
taskPluginManager,
-                                                    @Nullable StorageOperate 
storageOperate,
-                                                    @NonNull 
WorkerRegistryClient workerRegistryClient) {
+            WorkerTaskExecutorFactory<DefaultWorkerTaskExecutor> {
+
+    private final @NonNull TaskExecutionContext taskExecutionContext;
+    private final @NonNull WorkerConfig workerConfig;
+    private final @NonNull WorkerMessageSender workerMessageSender;
+    private final @NonNull TaskPluginManager taskPluginManager;
+    private final @Nullable StorageOperate storageOperate;
+    private final @NonNull WorkerRegistryClient workerRegistryClient;
+
+    public DefaultWorkerTaskExecutorFactory(@NonNull TaskExecutionContext 
taskExecutionContext,
+                                            @NonNull WorkerConfig workerConfig,
+                                            @NonNull WorkerMessageSender 
workerMessageSender,
+                                            @NonNull TaskPluginManager 
taskPluginManager,
+                                            @Nullable StorageOperate 
storageOperate,
+                                            @NonNull WorkerRegistryClient 
workerRegistryClient) {

Review Comment:
   We will use the workerRegistryClient to find the AlertServer's host, we will 
send Task content to AlertServer.



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