|
|
@ -31,6 +31,7 @@ import org.apache.dolphinscheduler.remote.command.log.RollViewLogResponseCommand |
|
|
|
import org.apache.dolphinscheduler.remote.command.log.ViewLogRequestCommand; |
|
|
|
import org.apache.dolphinscheduler.remote.command.log.ViewLogRequestCommand; |
|
|
|
import org.apache.dolphinscheduler.remote.command.log.ViewLogResponseCommand; |
|
|
|
import org.apache.dolphinscheduler.remote.command.log.ViewLogResponseCommand; |
|
|
|
import org.apache.dolphinscheduler.remote.processor.NettyRequestProcessor; |
|
|
|
import org.apache.dolphinscheduler.remote.processor.NettyRequestProcessor; |
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.remote.utils.Constants; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.ByteArrayOutputStream; |
|
|
|
import java.io.ByteArrayOutputStream; |
|
|
|
import java.io.File; |
|
|
|
import java.io.File; |
|
|
@ -42,6 +43,7 @@ import java.nio.file.Paths; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
|
|
|
|
import java.util.concurrent.Executors; |
|
|
|
import java.util.concurrent.LinkedBlockingQueue; |
|
|
|
import java.util.concurrent.LinkedBlockingQueue; |
|
|
|
import java.util.concurrent.ThreadPoolExecutor; |
|
|
|
import java.util.concurrent.ThreadPoolExecutor; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
@ -60,10 +62,10 @@ public class LoggerRequestProcessor implements NettyRequestProcessor { |
|
|
|
|
|
|
|
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(LoggerRequestProcessor.class); |
|
|
|
private final Logger logger = LoggerFactory.getLogger(LoggerRequestProcessor.class); |
|
|
|
|
|
|
|
|
|
|
|
private final ThreadPoolExecutor executor; |
|
|
|
private final ExecutorService executor; |
|
|
|
|
|
|
|
|
|
|
|
public LoggerRequestProcessor() { |
|
|
|
public LoggerRequestProcessor() { |
|
|
|
this.executor = new ThreadPoolExecutor(4, 4, 10, TimeUnit.SECONDS, new LinkedBlockingQueue<>(100)); |
|
|
|
this.executor = Executors.newFixedThreadPool(Constants.CPUS * 2 + 1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|