mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-20 04:35:32 +00:00
Bug 5214: Remove and replace DataMiningExceutorService with
ThreadPoolUtil background ThreadPoolExecutor
This commit is contained in:
+3
-1
@@ -45,6 +45,7 @@ import com.sap.sse.datamining.shared.data.QueryResultState;
|
||||
import com.sap.sse.datamining.shared.impl.GenericGroupKey;
|
||||
import com.sap.sse.datamining.test.util.components.StatefulBlockingInstruction;
|
||||
import com.sap.sse.datamining.test.util.components.StatefulProcessorInstruction;
|
||||
import com.sap.sse.util.ThreadPoolUtil;
|
||||
|
||||
/**
|
||||
* Integration test aborting a query with simulated heavy load instructions. Uses a highly customized processor chain
|
||||
@@ -250,7 +251,8 @@ public class TestAbortingHeavyLoadQuery {
|
||||
executionRecord = new ConcurrentLinkedQueue<>();
|
||||
}
|
||||
|
||||
executor = new DataMiningExecutorService(ExecutorPoolSize);
|
||||
executor = ThreadPoolUtil.INSTANCE
|
||||
.createBackgroundTaskThreadPoolExecutor(ExecutorPoolSize, this.getClass().getName());
|
||||
// executor = new ThreadPoolExecutor(ExecutorPoolSize, ExecutorPoolSize, 0, TimeUnit.MILLISECONDS, new PriorityBlockingQueue<>());
|
||||
// executor = new ThreadPoolExecutor(ExecutorPoolSize, ExecutorPoolSize, 0, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>());
|
||||
processors = new ArrayList<>();
|
||||
|
||||
+4
-2
@@ -11,13 +11,15 @@ import java.util.Map.Entry;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import com.sap.sse.datamining.components.Processor;
|
||||
import com.sap.sse.datamining.impl.DataMiningExecutorService;
|
||||
import com.sap.sse.datamining.shared.GroupKey;
|
||||
import com.sap.sse.util.ThreadPoolUtil;
|
||||
|
||||
public class ConcurrencyTestsUtil extends TestsUtil {
|
||||
|
||||
private static final int THREAD_POOL_SIZE = Math.max(Runtime.getRuntime().availableProcessors(), 3);
|
||||
private static final ExecutorService executor = new DataMiningExecutorService(THREAD_POOL_SIZE);
|
||||
private static final ExecutorService executor = ThreadPoolUtil.INSTANCE
|
||||
.createBackgroundTaskThreadPoolExecutor(THREAD_POOL_SIZE, ConcurrencyTestsUtil.class.getName());
|
||||
|
||||
|
||||
public static ExecutorService getSharedExecutor() {
|
||||
return executor;
|
||||
|
||||
Reference in New Issue
Block a user