You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2024/09/08 13:23:36 UTC
(shardingsphere) branch master updated: Rename PipelineExecuteEngine (#32805)
This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new a4bbe8f9438 Rename PipelineExecuteEngine (#32805)
a4bbe8f9438 is described below
commit a4bbe8f9438d87b18968c50568b13ff1db78c536
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sun Sep 8 21:23:30 2024 +0800
Rename PipelineExecuteEngine (#32805)
* Refactor ShowTableStatusMergedResult
* Rename PipelineExecuteEngine
---
.../core/context/TransmissionProcessContext.java | 34 +++++++++++-----------
...ecuteEngine.java => PipelineExecuteEngine.java} | 12 ++++----
.../data/pipeline/core/task/IncrementalTask.java | 4 +--
.../data/pipeline/core/task/InventoryTask.java | 6 ++--
.../core/task/runner/TransmissionTasksRunner.java | 6 ++--
...ineTest.java => PipelineExecuteEngineTest.java} | 14 ++++-----
.../progress/PipelineJobProgressDetectorTest.java | 10 +++----
.../shardingsphere/data/pipeline/cdc/CDCJob.java | 6 ++--
.../pipeline/cdc/core/task/CDCIncrementalTask.java | 4 +--
.../pipeline/cdc/core/task/CDCInventoryTask.java | 6 ++--
.../context/ConsistencyCheckProcessContext.java | 12 ++++----
.../task/ConsistencyCheckTasksRunner.java | 4 +--
.../migration/preparer/MigrationJobPreparer.java | 4 +--
.../pipeline/core/util/PipelineContextUtils.java | 6 ++--
14 files changed, 64 insertions(+), 64 deletions(-)
diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/context/TransmissionProcessContext.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/context/TransmissionProcessContext.java
index ba741ccb8df..c17c26209bd 100644
--- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/context/TransmissionProcessContext.java
+++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/context/TransmissionProcessContext.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.data.pipeline.core.context;
import lombok.Getter;
import lombok.SneakyThrows;
import org.apache.commons.lang3.concurrent.ConcurrentException;
-import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine;
+import org.apache.shardingsphere.data.pipeline.core.execute.PipelineExecuteEngine;
import org.apache.shardingsphere.data.pipeline.core.job.progress.config.PipelineProcessConfiguration;
import org.apache.shardingsphere.data.pipeline.core.job.progress.config.PipelineProcessConfigurationUtils;
import org.apache.shardingsphere.data.pipeline.core.job.progress.config.PipelineReadConfiguration;
@@ -44,11 +44,11 @@ public final class TransmissionProcessContext implements PipelineProcessContext
@Getter
private final JobRateLimitAlgorithm writeRateLimitAlgorithm;
- private final PipelineLazyInitializer<ExecuteEngine> inventoryDumperExecuteEngineLazyInitializer;
+ private final PipelineLazyInitializer<PipelineExecuteEngine> inventoryDumperExecuteEngineLazyInitializer;
- private final PipelineLazyInitializer<ExecuteEngine> inventoryImporterExecuteEngineLazyInitializer;
+ private final PipelineLazyInitializer<PipelineExecuteEngine> inventoryImporterExecuteEngineLazyInitializer;
- private final PipelineLazyInitializer<ExecuteEngine> incrementalExecuteEngineLazyInitializer;
+ private final PipelineLazyInitializer<PipelineExecuteEngine> incrementalExecuteEngineLazyInitializer;
public TransmissionProcessContext(final String jobId, final PipelineProcessConfiguration originalProcessConfig) {
processConfiguration = PipelineProcessConfigurationUtils.fillInDefaultValue(originalProcessConfig);
@@ -58,25 +58,25 @@ public final class TransmissionProcessContext implements PipelineProcessContext
PipelineWriteConfiguration writeConfig = processConfiguration.getWrite();
AlgorithmConfiguration writeRateLimiter = writeConfig.getRateLimiter();
writeRateLimitAlgorithm = null == writeRateLimiter ? null : TypedSPILoader.getService(JobRateLimitAlgorithm.class, writeRateLimiter.getType(), writeRateLimiter.getProps());
- inventoryDumperExecuteEngineLazyInitializer = new PipelineLazyInitializer<ExecuteEngine>() {
+ inventoryDumperExecuteEngineLazyInitializer = new PipelineLazyInitializer<PipelineExecuteEngine>() {
@Override
- protected ExecuteEngine doInitialize() {
- return ExecuteEngine.newFixedThreadInstance(readConfig.getWorkerThread(), "Inventory-" + jobId);
+ protected PipelineExecuteEngine doInitialize() {
+ return PipelineExecuteEngine.newFixedThreadInstance(readConfig.getWorkerThread(), "Inventory-" + jobId);
}
};
- inventoryImporterExecuteEngineLazyInitializer = new PipelineLazyInitializer<ExecuteEngine>() {
+ inventoryImporterExecuteEngineLazyInitializer = new PipelineLazyInitializer<PipelineExecuteEngine>() {
@Override
- protected ExecuteEngine doInitialize() {
- return ExecuteEngine.newFixedThreadInstance(writeConfig.getWorkerThread(), "Importer-" + jobId);
+ protected PipelineExecuteEngine doInitialize() {
+ return PipelineExecuteEngine.newFixedThreadInstance(writeConfig.getWorkerThread(), "Importer-" + jobId);
}
};
- incrementalExecuteEngineLazyInitializer = new PipelineLazyInitializer<ExecuteEngine>() {
+ incrementalExecuteEngineLazyInitializer = new PipelineLazyInitializer<PipelineExecuteEngine>() {
@Override
- protected ExecuteEngine doInitialize() {
- return ExecuteEngine.newCachedThreadInstance("Incremental-" + jobId);
+ protected PipelineExecuteEngine doInitialize() {
+ return PipelineExecuteEngine.newCachedThreadInstance("Incremental-" + jobId);
}
};
}
@@ -87,7 +87,7 @@ public final class TransmissionProcessContext implements PipelineProcessContext
* @return inventory dumper execute engine
*/
@SneakyThrows(ConcurrentException.class)
- public ExecuteEngine getInventoryDumperExecuteEngine() {
+ public PipelineExecuteEngine getInventoryDumperExecuteEngine() {
return inventoryDumperExecuteEngineLazyInitializer.get();
}
@@ -97,7 +97,7 @@ public final class TransmissionProcessContext implements PipelineProcessContext
* @return inventory importer execute engine
*/
@SneakyThrows(ConcurrentException.class)
- public ExecuteEngine getInventoryImporterExecuteEngine() {
+ public PipelineExecuteEngine getInventoryImporterExecuteEngine() {
return inventoryImporterExecuteEngineLazyInitializer.get();
}
@@ -107,7 +107,7 @@ public final class TransmissionProcessContext implements PipelineProcessContext
* @return incremental execute engine
*/
@SneakyThrows(ConcurrentException.class)
- public ExecuteEngine getIncrementalExecuteEngine() {
+ public PipelineExecuteEngine getIncrementalExecuteEngine() {
return incrementalExecuteEngineLazyInitializer.get();
}
@@ -118,7 +118,7 @@ public final class TransmissionProcessContext implements PipelineProcessContext
shutdownExecuteEngine(incrementalExecuteEngineLazyInitializer);
}
- private void shutdownExecuteEngine(final PipelineLazyInitializer<ExecuteEngine> lazyInitializer) throws ConcurrentException {
+ private void shutdownExecuteEngine(final PipelineLazyInitializer<PipelineExecuteEngine> lazyInitializer) throws ConcurrentException {
if (lazyInitializer.isInitialized()) {
lazyInitializer.get().shutdown();
}
diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/execute/ExecuteEngine.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/execute/PipelineExecuteEngine.java
similarity index 90%
rename from kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/execute/ExecuteEngine.java
rename to kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/execute/PipelineExecuteEngine.java
index 30aa72f512e..7a83eb87089 100644
--- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/execute/ExecuteEngine.java
+++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/execute/PipelineExecuteEngine.java
@@ -33,10 +33,10 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.function.BiConsumer;
/**
- * Executor engine.
+ * Pipeline executor engine.
*/
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
-public final class ExecuteEngine {
+public final class PipelineExecuteEngine {
private static final String THREAD_PREFIX = "pipeline-";
@@ -52,9 +52,9 @@ public final class ExecuteEngine {
* @param threadName thread name
* @return task execute engine instance
*/
- public static ExecuteEngine newCachedThreadInstance(final String threadName) {
+ public static PipelineExecuteEngine newCachedThreadInstance(final String threadName) {
String threadNameFormat = THREAD_PREFIX + threadName + THREAD_SUFFIX;
- return new ExecuteEngine(Executors.newCachedThreadPool(ExecutorThreadFactoryBuilder.build(threadNameFormat)));
+ return new PipelineExecuteEngine(Executors.newCachedThreadPool(ExecutorThreadFactoryBuilder.build(threadNameFormat)));
}
/**
@@ -64,9 +64,9 @@ public final class ExecuteEngine {
* @param threadName thread name
* @return task execute engine instance
*/
- public static ExecuteEngine newFixedThreadInstance(final int threadNumber, final String threadName) {
+ public static PipelineExecuteEngine newFixedThreadInstance(final int threadNumber, final String threadName) {
String threadNameFormat = THREAD_PREFIX + threadName + THREAD_SUFFIX;
- return new ExecuteEngine(Executors.newFixedThreadPool(threadNumber, ExecutorThreadFactoryBuilder.build(threadNameFormat)));
+ return new PipelineExecuteEngine(Executors.newFixedThreadPool(threadNumber, ExecutorThreadFactoryBuilder.build(threadNameFormat)));
}
/**
diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/task/IncrementalTask.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/task/IncrementalTask.java
index ed6255bef0c..1fe7258f6a6 100644
--- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/task/IncrementalTask.java
+++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/task/IncrementalTask.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.data.pipeline.core.task;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
-import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine;
+import org.apache.shardingsphere.data.pipeline.core.execute.PipelineExecuteEngine;
import org.apache.shardingsphere.data.pipeline.core.importer.Importer;
import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.Dumper;
import org.apache.shardingsphere.data.pipeline.core.task.progress.IncrementalTaskProgress;
@@ -39,7 +39,7 @@ public final class IncrementalTask implements PipelineTask {
@Getter
private final String taskId;
- private final ExecuteEngine incrementalExecuteEngine;
+ private final PipelineExecuteEngine incrementalExecuteEngine;
private final Dumper dumper;
diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/task/InventoryTask.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/task/InventoryTask.java
index afe20fc1e3d..613e47b69e4 100644
--- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/task/InventoryTask.java
+++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/task/InventoryTask.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.data.pipeline.core.task;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
-import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine;
+import org.apache.shardingsphere.data.pipeline.core.execute.PipelineExecuteEngine;
import org.apache.shardingsphere.data.pipeline.core.importer.Importer;
import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.Dumper;
import org.apache.shardingsphere.data.pipeline.core.ingest.position.IngestPosition;
@@ -41,9 +41,9 @@ public final class InventoryTask implements PipelineTask {
@Getter
private final String taskId;
- private final ExecuteEngine inventoryDumperExecuteEngine;
+ private final PipelineExecuteEngine inventoryDumperExecuteEngine;
- private final ExecuteEngine inventoryImporterExecuteEngine;
+ private final PipelineExecuteEngine inventoryImporterExecuteEngine;
private final Dumper dumper;
diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/task/runner/TransmissionTasksRunner.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/task/runner/TransmissionTasksRunner.java
index 0d1a2647c5e..062946f7e60 100644
--- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/task/runner/TransmissionTasksRunner.java
+++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/task/runner/TransmissionTasksRunner.java
@@ -23,7 +23,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.data.pipeline.core.context.TransmissionJobItemContext;
import org.apache.shardingsphere.data.pipeline.core.exception.PipelineJobCancelingException;
import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteCallback;
-import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine;
+import org.apache.shardingsphere.data.pipeline.core.execute.PipelineExecuteEngine;
import org.apache.shardingsphere.data.pipeline.core.ingest.position.type.finished.IngestFinishedPosition;
import org.apache.shardingsphere.data.pipeline.core.job.JobStatus;
import org.apache.shardingsphere.data.pipeline.core.job.id.PipelineJobIdUtils;
@@ -88,7 +88,7 @@ public final class TransmissionTasksRunner implements PipelineTasksRunner {
}
futures.addAll(each.start());
}
- ExecuteEngine.trigger(futures, new InventoryTaskExecuteCallback());
+ PipelineExecuteEngine.trigger(futures, new InventoryTaskExecuteCallback());
}
private synchronized void executeIncrementalTasks() {
@@ -109,7 +109,7 @@ public final class TransmissionTasksRunner implements PipelineTasksRunner {
}
futures.addAll(each.start());
}
- ExecuteEngine.trigger(futures, new IncrementalExecuteCallback());
+ PipelineExecuteEngine.trigger(futures, new IncrementalExecuteCallback());
}
private void updateJobItemStatus(final JobStatus jobStatus) {
diff --git a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/execute/ExecuteEngineTest.java b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/execute/PipelineExecuteEngineTest.java
similarity index 88%
rename from kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/execute/ExecuteEngineTest.java
rename to kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/execute/PipelineExecuteEngineTest.java
index bb0cf6dbc62..5050c1a0244 100644
--- a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/execute/ExecuteEngineTest.java
+++ b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/execute/PipelineExecuteEngineTest.java
@@ -40,13 +40,13 @@ import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
-class ExecuteEngineTest {
+class PipelineExecuteEngineTest {
@Test
void assertSubmitAndTaskSucceeded() {
PipelineLifecycleRunnable pipelineLifecycleRunnable = mock(PipelineLifecycleRunnable.class);
ExecuteCallback callback = mock(ExecuteCallback.class);
- ExecuteEngine executeEngine = ExecuteEngine.newCachedThreadInstance(ExecuteEngineTest.class.getSimpleName());
+ PipelineExecuteEngine executeEngine = PipelineExecuteEngine.newCachedThreadInstance(PipelineExecuteEngineTest.class.getSimpleName());
Future<?> future = executeEngine.submit(pipelineLifecycleRunnable, callback);
assertTimeout(Duration.ofSeconds(30L), () -> future.get());
shutdownAndAwaitTerminal(executeEngine);
@@ -60,7 +60,7 @@ class ExecuteEngineTest {
RuntimeException expectedException = new RuntimeException("Expected");
doThrow(expectedException).when(pipelineLifecycleRunnable).run();
ExecuteCallback callback = mock(ExecuteCallback.class);
- ExecuteEngine executeEngine = ExecuteEngine.newCachedThreadInstance(ExecuteEngineTest.class.getSimpleName());
+ PipelineExecuteEngine executeEngine = PipelineExecuteEngine.newCachedThreadInstance(PipelineExecuteEngineTest.class.getSimpleName());
Future<?> future = executeEngine.submit(pipelineLifecycleRunnable, callback);
Optional<Throwable> actualCause = assertTimeout(Duration.ofSeconds(30L), () -> execute(future));
assertTrue(actualCause.isPresent());
@@ -79,8 +79,8 @@ class ExecuteEngineTest {
}
@SneakyThrows({ReflectiveOperationException.class, InterruptedException.class})
- private void shutdownAndAwaitTerminal(final ExecuteEngine executeEngine) {
- ExecutorService executorService = (ExecutorService) Plugins.getMemberAccessor().get(ExecuteEngine.class.getDeclaredField("executorService"), executeEngine);
+ private void shutdownAndAwaitTerminal(final PipelineExecuteEngine executeEngine) {
+ ExecutorService executorService = (ExecutorService) Plugins.getMemberAccessor().get(PipelineExecuteEngine.class.getDeclaredField("executorService"), executeEngine);
executorService.shutdown();
executorService.awaitTermination(30L, TimeUnit.SECONDS);
}
@@ -90,7 +90,7 @@ class ExecuteEngineTest {
CompletableFuture<?> future1 = CompletableFuture.runAsync(new FixtureRunnable(true));
CompletableFuture<?> future2 = CompletableFuture.runAsync(new FixtureRunnable(true));
FixtureExecuteCallback executeCallback = new FixtureExecuteCallback();
- ExecuteEngine.trigger(Arrays.asList(future1, future2), executeCallback);
+ PipelineExecuteEngine.trigger(Arrays.asList(future1, future2), executeCallback);
assertThat(executeCallback.successCount.get(), is(1));
assertThat(executeCallback.failureCount.get(), is(0));
}
@@ -101,7 +101,7 @@ class ExecuteEngineTest {
CompletableFuture<?> future2 = CompletableFuture.runAsync(new FixtureRunnable(false));
FixtureExecuteCallback executeCallback = new FixtureExecuteCallback();
try {
- ExecuteEngine.trigger(Arrays.asList(future1, future2), executeCallback);
+ PipelineExecuteEngine.trigger(Arrays.asList(future1, future2), executeCallback);
// CHECKSTYLE:OFF
} catch (final RuntimeException ignored) {
// CHECKSTYLE:ON
diff --git a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/job/progress/PipelineJobProgressDetectorTest.java b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/job/progress/PipelineJobProgressDetectorTest.java
index 9a3bfdd5971..57ee254b7df 100644
--- a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/job/progress/PipelineJobProgressDetectorTest.java
+++ b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/job/progress/PipelineJobProgressDetectorTest.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.data.pipeline.core.job.progress;
-import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine;
+import org.apache.shardingsphere.data.pipeline.core.execute.PipelineExecuteEngine;
import org.apache.shardingsphere.data.pipeline.core.importer.Importer;
import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.Dumper;
import org.apache.shardingsphere.data.pipeline.core.ingest.position.IngestPosition;
@@ -46,16 +46,16 @@ class PipelineJobProgressDetectorTest {
void assertAllInventoryTasksAreFinishedWhenNotAllTasksAreFinished() {
AtomicReference<IngestPosition> finishedPosition = new AtomicReference<>(new IngestFinishedPosition());
AtomicReference<IngestPosition> unfinishedPosition = new AtomicReference<>(new IngestPlaceholderPosition());
- InventoryTask actualTask1 = new InventoryTask("foo_id_1", mock(ExecuteEngine.class), mock(ExecuteEngine.class), mock(Dumper.class), mock(Importer.class), finishedPosition);
- InventoryTask actualTask2 = new InventoryTask("foo_id_2", mock(ExecuteEngine.class), mock(ExecuteEngine.class), mock(Dumper.class), mock(Importer.class), unfinishedPosition);
+ InventoryTask actualTask1 = new InventoryTask("foo_id_1", mock(PipelineExecuteEngine.class), mock(PipelineExecuteEngine.class), mock(Dumper.class), mock(Importer.class), finishedPosition);
+ InventoryTask actualTask2 = new InventoryTask("foo_id_2", mock(PipelineExecuteEngine.class), mock(PipelineExecuteEngine.class), mock(Dumper.class), mock(Importer.class), unfinishedPosition);
assertFalse(PipelineJobProgressDetector.isAllInventoryTasksFinished(Arrays.asList(actualTask1, actualTask2)));
}
@Test
void assertAllInventoryTasksAreFinished() {
AtomicReference<IngestPosition> finishedPosition = new AtomicReference<>(new IngestFinishedPosition());
- InventoryTask actualTask1 = new InventoryTask("foo_id_1", mock(ExecuteEngine.class), mock(ExecuteEngine.class), mock(Dumper.class), mock(Importer.class), finishedPosition);
- InventoryTask actualTask2 = new InventoryTask("foo_id_2", mock(ExecuteEngine.class), mock(ExecuteEngine.class), mock(Dumper.class), mock(Importer.class), finishedPosition);
+ InventoryTask actualTask1 = new InventoryTask("foo_id_1", mock(PipelineExecuteEngine.class), mock(PipelineExecuteEngine.class), mock(Dumper.class), mock(Importer.class), finishedPosition);
+ InventoryTask actualTask2 = new InventoryTask("foo_id_2", mock(PipelineExecuteEngine.class), mock(PipelineExecuteEngine.class), mock(Dumper.class), mock(Importer.class), finishedPosition);
assertTrue(PipelineJobProgressDetector.isAllInventoryTasksFinished(Arrays.asList(actualTask1, actualTask2)));
}
diff --git a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/CDCJob.java b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/CDCJob.java
index 6768dc0c261..4c873eaad5d 100644
--- a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/CDCJob.java
+++ b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/CDCJob.java
@@ -39,7 +39,7 @@ import org.apache.shardingsphere.data.pipeline.core.datanode.JobDataNodeLine;
import org.apache.shardingsphere.data.pipeline.core.datanode.JobDataNodeLineConvertUtils;
import org.apache.shardingsphere.data.pipeline.core.datasource.config.PipelineDataSourceConfigurationFactory;
import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteCallback;
-import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine;
+import org.apache.shardingsphere.data.pipeline.core.execute.PipelineExecuteEngine;
import org.apache.shardingsphere.data.pipeline.core.importer.ImporterConfiguration;
import org.apache.shardingsphere.data.pipeline.core.importer.sink.PipelineSink;
import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.DumperCommonContext;
@@ -193,7 +193,7 @@ public final class CDCJob implements PipelineJob {
if (futures.isEmpty()) {
return;
}
- ExecuteEngine.trigger(futures, new CDCExecuteCallback("inventory", jobItemContexts.iterator().next()));
+ PipelineExecuteEngine.trigger(futures, new CDCExecuteCallback("inventory", jobItemContexts.iterator().next()));
}
private void executeIncrementalTasks(final Collection<CDCJobItemContext> jobItemContexts, final PipelineJobItemManager<TransmissionJobItemProgress> jobItemManager) {
@@ -211,7 +211,7 @@ public final class CDCJob implements PipelineJob {
futures.addAll(task.start());
}
}
- ExecuteEngine.trigger(futures, new CDCExecuteCallback("incremental", jobItemContexts.iterator().next()));
+ PipelineExecuteEngine.trigger(futures, new CDCExecuteCallback("incremental", jobItemContexts.iterator().next()));
}
private void updateJobItemStatus(final CDCJobItemContext jobItemContext, final JobStatus jobStatus, final PipelineJobItemManager<TransmissionJobItemProgress> jobItemManager) {
diff --git a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/core/task/CDCIncrementalTask.java b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/core/task/CDCIncrementalTask.java
index bad45b3ed20..f3700cbb2de 100644
--- a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/core/task/CDCIncrementalTask.java
+++ b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/core/task/CDCIncrementalTask.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.data.pipeline.cdc.core.task;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
-import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine;
+import org.apache.shardingsphere.data.pipeline.core.execute.PipelineExecuteEngine;
import org.apache.shardingsphere.data.pipeline.core.importer.Importer;
import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.Dumper;
import org.apache.shardingsphere.data.pipeline.core.task.PipelineTask;
@@ -42,7 +42,7 @@ public final class CDCIncrementalTask implements PipelineTask {
@Getter
private final String taskId;
- private final ExecuteEngine incrementalExecuteEngine;
+ private final PipelineExecuteEngine incrementalExecuteEngine;
private final Dumper dumper;
diff --git a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/core/task/CDCInventoryTask.java b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/core/task/CDCInventoryTask.java
index 841b3da6cc9..2226ae09044 100644
--- a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/core/task/CDCInventoryTask.java
+++ b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/core/task/CDCInventoryTask.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.data.pipeline.cdc.core.task;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
-import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine;
+import org.apache.shardingsphere.data.pipeline.core.execute.PipelineExecuteEngine;
import org.apache.shardingsphere.data.pipeline.core.importer.Importer;
import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.Dumper;
import org.apache.shardingsphere.data.pipeline.core.ingest.position.IngestPosition;
@@ -46,9 +46,9 @@ public final class CDCInventoryTask implements PipelineTask {
@Getter
private final String taskId;
- private final ExecuteEngine inventoryDumperExecuteEngine;
+ private final PipelineExecuteEngine inventoryDumperExecuteEngine;
- private final ExecuteEngine inventoryImporterExecuteEngine;
+ private final PipelineExecuteEngine inventoryImporterExecuteEngine;
private final Dumper dumper;
diff --git a/kernel/data-pipeline/scenario/consistencycheck/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/context/ConsistencyCheckProcessContext.java b/kernel/data-pipeline/scenario/consistencycheck/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/context/ConsistencyCheckProcessContext.java
index db2ffde2735..69b8c4de696 100644
--- a/kernel/data-pipeline/scenario/consistencycheck/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/context/ConsistencyCheckProcessContext.java
+++ b/kernel/data-pipeline/scenario/consistencycheck/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/context/ConsistencyCheckProcessContext.java
@@ -23,7 +23,7 @@ import org.apache.commons.lang3.concurrent.ConcurrentException;
import org.apache.shardingsphere.data.pipeline.core.job.progress.config.PipelineProcessConfiguration;
import org.apache.shardingsphere.data.pipeline.core.job.progress.config.PipelineProcessConfigurationUtils;
import org.apache.shardingsphere.data.pipeline.core.context.PipelineProcessContext;
-import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine;
+import org.apache.shardingsphere.data.pipeline.core.execute.PipelineExecuteEngine;
import org.apache.shardingsphere.data.pipeline.core.util.PipelineLazyInitializer;
/**
@@ -32,14 +32,14 @@ import org.apache.shardingsphere.data.pipeline.core.util.PipelineLazyInitializer
@Getter
public final class ConsistencyCheckProcessContext implements PipelineProcessContext {
- private final PipelineLazyInitializer<ExecuteEngine> consistencyCheckExecuteEngineLazyInitializer;
+ private final PipelineLazyInitializer<PipelineExecuteEngine> consistencyCheckExecuteEngineLazyInitializer;
public ConsistencyCheckProcessContext(final String jobId) {
- consistencyCheckExecuteEngineLazyInitializer = new PipelineLazyInitializer<ExecuteEngine>() {
+ consistencyCheckExecuteEngineLazyInitializer = new PipelineLazyInitializer<PipelineExecuteEngine>() {
@Override
- protected ExecuteEngine doInitialize() {
- return ExecuteEngine.newFixedThreadInstance(1, jobId + "-check");
+ protected PipelineExecuteEngine doInitialize() {
+ return PipelineExecuteEngine.newFixedThreadInstance(1, jobId + "-check");
}
};
}
@@ -55,7 +55,7 @@ public final class ConsistencyCheckProcessContext implements PipelineProcessCont
* @return consistency check execute engine
*/
@SneakyThrows(ConcurrentException.class)
- public ExecuteEngine getConsistencyCheckExecuteEngine() {
+ public PipelineExecuteEngine getConsistencyCheckExecuteEngine() {
return consistencyCheckExecuteEngineLazyInitializer.get();
}
diff --git a/kernel/data-pipeline/scenario/consistencycheck/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/task/ConsistencyCheckTasksRunner.java b/kernel/data-pipeline/scenario/consistencycheck/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/task/ConsistencyCheckTasksRunner.java
index 7b88ec54a54..e348747462c 100644
--- a/kernel/data-pipeline/scenario/consistencycheck/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/task/ConsistencyCheckTasksRunner.java
+++ b/kernel/data-pipeline/scenario/consistencycheck/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/task/ConsistencyCheckTasksRunner.java
@@ -24,7 +24,7 @@ import org.apache.shardingsphere.data.pipeline.core.consistencycheck.result.Tabl
import org.apache.shardingsphere.data.pipeline.core.context.TransmissionProcessContext;
import org.apache.shardingsphere.data.pipeline.core.execute.AbstractPipelineLifecycleRunnable;
import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteCallback;
-import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine;
+import org.apache.shardingsphere.data.pipeline.core.execute.PipelineExecuteEngine;
import org.apache.shardingsphere.data.pipeline.core.execute.PipelineLifecycleRunnable;
import org.apache.shardingsphere.data.pipeline.core.job.JobStatus;
import org.apache.shardingsphere.data.pipeline.core.job.api.PipelineAPIFactory;
@@ -92,7 +92,7 @@ public final class ConsistencyCheckTasksRunner implements PipelineTasksRunner {
new PipelineJobItemManager<>(TypedSPILoader.getService(PipelineJobType.class, PipelineJobIdUtils.parseJobType(jobItemContext.getJobId()).getType())
.getYamlJobItemProgressSwapper()).persistProgress(jobItemContext);
CompletableFuture<?> future = jobItemContext.getProcessContext().getConsistencyCheckExecuteEngine().submit(checkExecutor);
- ExecuteEngine.trigger(Collections.singletonList(future), new CheckExecuteCallback());
+ PipelineExecuteEngine.trigger(Collections.singletonList(future), new CheckExecuteCallback());
}
@Override
diff --git a/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/preparer/MigrationJobPreparer.java b/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/preparer/MigrationJobPreparer.java
index 981473f86ba..a8e7e6c85e6 100644
--- a/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/preparer/MigrationJobPreparer.java
+++ b/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/preparer/MigrationJobPreparer.java
@@ -28,7 +28,7 @@ import org.apache.shardingsphere.data.pipeline.core.datasource.PipelineDataSourc
import org.apache.shardingsphere.data.pipeline.core.datasource.PipelineDataSource;
import org.apache.shardingsphere.data.pipeline.core.exception.PipelineJobCancelingException;
import org.apache.shardingsphere.data.pipeline.core.exception.job.PrepareJobWithGetBinlogPositionException;
-import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine;
+import org.apache.shardingsphere.data.pipeline.core.execute.PipelineExecuteEngine;
import org.apache.shardingsphere.data.pipeline.core.importer.Importer;
import org.apache.shardingsphere.data.pipeline.core.importer.SingleChannelConsumerImporter;
import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.Dumper;
@@ -185,7 +185,7 @@ public final class MigrationJobPreparer implements PipelineJobPreparer<Migration
private void initIncrementalTasks(final MigrationJobItemContext jobItemContext) {
MigrationTaskConfiguration taskConfig = jobItemContext.getTaskConfig();
IncrementalDumperContext dumperContext = taskConfig.getDumperContext();
- ExecuteEngine incrementalExecuteEngine = jobItemContext.getJobProcessContext().getIncrementalExecuteEngine();
+ PipelineExecuteEngine incrementalExecuteEngine = jobItemContext.getJobProcessContext().getIncrementalExecuteEngine();
IncrementalTaskProgress taskProgress = PipelineTaskUtils.createIncrementalTaskProgress(dumperContext.getCommonContext().getPosition(), jobItemContext.getInitProgress());
PipelineChannel channel = IncrementalChannelCreator.create(jobItemContext.getJobProcessContext().getProcessConfiguration().getStreamChannel(), taskProgress);
CreateIncrementalDumperParameter param = new CreateIncrementalDumperParameter(
diff --git a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/PipelineContextUtils.java b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/PipelineContextUtils.java
index 20fb9217c84..1506b3fa66e 100644
--- a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/PipelineContextUtils.java
+++ b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/PipelineContextUtils.java
@@ -26,7 +26,7 @@ import org.apache.shardingsphere.data.pipeline.core.context.PipelineContextManag
import org.apache.shardingsphere.data.pipeline.core.context.TransmissionProcessContext;
import org.apache.shardingsphere.data.pipeline.core.datanode.JobDataNodeEntry;
import org.apache.shardingsphere.data.pipeline.core.datasource.PipelineDataSourceManager;
-import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine;
+import org.apache.shardingsphere.data.pipeline.core.execute.PipelineExecuteEngine;
import org.apache.shardingsphere.data.pipeline.core.importer.ImporterConfiguration;
import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.incremental.IncrementalDumperContext;
import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.mapper.TableAndSchemaNameMapper;
@@ -92,7 +92,7 @@ public final class PipelineContextUtils {
private static final PipelineContextKey CONTEXT_KEY = new PipelineContextKey(InstanceType.PROXY);
- private static final ExecuteEngine EXECUTE_ENGINE = ExecuteEngine.newCachedThreadInstance(PipelineContextUtils.class.getSimpleName());
+ private static final PipelineExecuteEngine EXECUTE_ENGINE = PipelineExecuteEngine.newCachedThreadInstance(PipelineContextUtils.class.getSimpleName());
/**
* Mock mode configuration and context manager.
@@ -181,7 +181,7 @@ public final class PipelineContextUtils {
*
* @return execute engine
*/
- public static ExecuteEngine getExecuteEngine() {
+ public static PipelineExecuteEngine getExecuteEngine() {
return EXECUTE_ENGINE;
}