zzzk1 opened a new issue, #3768:
URL: https://github.com/apache/incubator-streampark/issues/3768

   ### Search before asking
   
   - [X] I had searched in the 
[feature](https://github.com/apache/incubator-streampark/issues?q=is%3Aissue+label%3A%22Feature%22)
 and found no similar feature requirement.
   
   
   ### Description
   
   In`org/apache/streampark/console/base/config/AsyncExecutorPoolConfig.java`. 
Among the thread pools currently managed in `AsyncExecutorPoolConfig`. Some of 
them are in the form of JDK: `ThreadPoolExecutor` and spring framework: 
`ThreadPoolTaskExecutor`. 
   I checked their specific usage  and did not find that the implementation of 
using different thread pools brings The benefits seem even more unclear.
   ```java
     public Executor savepointExecutor() {
       ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
   
       executor.setCorePoolSize(Runtime.getRuntime().availableProcessors() * 5);
       executor.setMaxPoolSize(Runtime.getRuntime().availableProcessors() * 10);
       executor.setQueueCapacity(1024);
       executor.setKeepAliveSeconds(60);
       executor.setThreadNamePrefix("trigger-savepoint-executor-");
       executor.setRejectedExecutionHandler(new 
ThreadPoolExecutor.AbortPolicy());
       return executor;
     }
   ```
   ```java
   public ExecutorService clusterExecutor() {
       return new ThreadPoolExecutor(
           Runtime.getRuntime().availableProcessors() * 5,
           Runtime.getRuntime().availableProcessors() * 10,
           60L,
           TimeUnit.SECONDS,
           new LinkedBlockingQueue<>(1024),
           ThreadUtils.threadFactory("streampark-cluster-executor"),
           new ThreadPoolExecutor.AbortPolicy());
     }
   ```
   
   ### Usage Scenario
   
   Maybe we can use `ThreadPoolExecutor` or `ThreadPoolTaskExecutor` uniformly
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: issues-unsubscr...@streampark.apache.org.apache.org

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

Reply via email to