You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/12/12 04:05:03 UTC

[GitHub] [dolphinscheduler] kezhenxu94 commented on a change in pull request #7325: [Bug-7321][Server] add netty processor to spring component

kezhenxu94 commented on a change in pull request #7325:
URL: https://github.com/apache/dolphinscheduler/pull/7325#discussion_r767220179



##########
File path: dolphinscheduler-log-server/src/main/java/org/apache/dolphinscheduler/server/log/LoggerRequestProcessor.java
##########
@@ -46,21 +46,26 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import javax.annotation.PostConstruct;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
 
 import io.netty.channel.Channel;
 
 /**
  * logger request process logic
  */
+@Component
 public class LoggerRequestProcessor implements NettyRequestProcessor {
 
     private final Logger logger = LoggerFactory.getLogger(LoggerRequestProcessor.class);
 
-    private final ExecutorService executor;
+    private ExecutorService executor;
 
-    public LoggerRequestProcessor() {
+    @PostConstruct

Review comment:
       What about just keeping this in constructor ?




-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org