diff --git a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/context/ingest/BaseDumperContext.java b/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/context/ingest/DumperCommonContext.java similarity index 98% rename from kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/context/ingest/BaseDumperContext.java rename to kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/context/ingest/DumperCommonContext.java index afff4f01023b1..31d5f33abbed8 100644 --- a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/context/ingest/BaseDumperContext.java +++ b/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/context/ingest/DumperCommonContext.java @@ -39,7 +39,7 @@ @Getter @Setter @ToString(exclude = {"dataSourceConfig", "tableNameSchemaNameMapping"}) -public abstract class BaseDumperContext { +public abstract class DumperCommonContext { private String dataSourceName; diff --git a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/context/ingest/IncrementalDumperContext.java b/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/context/ingest/IncrementalDumperContext.java index 127ea801c7994..6f568ebceaeac 100644 --- a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/context/ingest/IncrementalDumperContext.java +++ b/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/context/ingest/IncrementalDumperContext.java @@ -27,7 +27,7 @@ @Getter @Setter @ToString(callSuper = true) -public class IncrementalDumperContext extends BaseDumperContext { +public final class IncrementalDumperContext extends DumperCommonContext { private String jobId; diff --git a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/context/ingest/InventoryDumperContext.java b/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/context/ingest/InventoryDumperContext.java index b1afd6f052933..5b4b723b4487c 100644 --- a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/context/ingest/InventoryDumperContext.java +++ b/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/context/ingest/InventoryDumperContext.java @@ -31,7 +31,7 @@ @Getter @Setter @ToString(callSuper = true) -public final class InventoryDumperContext extends BaseDumperContext { +public final class InventoryDumperContext extends DumperCommonContext { private String actualTableName; @@ -51,7 +51,7 @@ public final class InventoryDumperContext extends BaseDumperContext { private JobRateLimitAlgorithm rateLimitAlgorithm; - public InventoryDumperContext(final BaseDumperContext dumperContext) { + public InventoryDumperContext(final DumperCommonContext dumperContext) { setDataSourceName(dumperContext.getDataSourceName()); setDataSourceConfig(dumperContext.getDataSourceConfig()); setTableNameMap(dumperContext.getTableNameMap()); diff --git a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/prepare/InventoryTaskSplitterTest.java b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/prepare/InventoryTaskSplitterTest.java index dee50d57eef9a..aaa5e01acdd7c 100644 --- a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/prepare/InventoryTaskSplitterTest.java +++ b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/prepare/InventoryTaskSplitterTest.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.test.it.data.pipeline.core.prepare; -import org.apache.shardingsphere.data.pipeline.api.context.ingest.BaseDumperContext; +import org.apache.shardingsphere.data.pipeline.api.context.ingest.DumperCommonContext; import org.apache.shardingsphere.data.pipeline.api.context.ingest.InventoryDumperContext; import org.apache.shardingsphere.data.pipeline.api.metadata.model.PipelineColumnMetaData; import org.apache.shardingsphere.data.pipeline.common.datasource.PipelineDataSourceManager; @@ -143,7 +143,7 @@ void assertSplitInventoryDataWithoutPrimaryAndUniqueIndex() throws SQLException } } - private void initEmptyTablePrimaryEnvironment(final BaseDumperContext dumperContext) throws SQLException { + private void initEmptyTablePrimaryEnvironment(final DumperCommonContext dumperContext) throws SQLException { DataSource dataSource = dataSourceManager.getDataSource(dumperContext.getDataSourceConfig()); try ( Connection connection = dataSource.getConnection(); @@ -153,7 +153,7 @@ private void initEmptyTablePrimaryEnvironment(final BaseDumperContext dumperCont } } - private void initIntPrimaryEnvironment(final BaseDumperContext dumperContext) throws SQLException { + private void initIntPrimaryEnvironment(final DumperCommonContext dumperContext) throws SQLException { DataSource dataSource = dataSourceManager.getDataSource(dumperContext.getDataSourceConfig()); try ( Connection connection = dataSource.getConnection(); @@ -166,7 +166,7 @@ private void initIntPrimaryEnvironment(final BaseDumperContext dumperContext) th } } - private void initCharPrimaryEnvironment(final BaseDumperContext dumperContext) throws SQLException { + private void initCharPrimaryEnvironment(final DumperCommonContext dumperContext) throws SQLException { DataSource dataSource = dataSourceManager.getDataSource(dumperContext.getDataSourceConfig()); try ( Connection connection = dataSource.getConnection(); @@ -177,7 +177,7 @@ private void initCharPrimaryEnvironment(final BaseDumperContext dumperContext) t } } - private void initUnionPrimaryEnvironment(final BaseDumperContext dumperContext) throws SQLException { + private void initUnionPrimaryEnvironment(final DumperCommonContext dumperContext) throws SQLException { DataSource dataSource = dataSourceManager.getDataSource(dumperContext.getDataSourceConfig()); try ( Connection connection = dataSource.getConnection(); @@ -188,7 +188,7 @@ private void initUnionPrimaryEnvironment(final BaseDumperContext dumperContext) } } - private void initNoPrimaryEnvironment(final BaseDumperContext dumperContext) throws SQLException { + private void initNoPrimaryEnvironment(final DumperCommonContext dumperContext) throws SQLException { DataSource dataSource = dataSourceManager.getDataSource(dumperContext.getDataSourceConfig()); try ( Connection connection = dataSource.getConnection(); @@ -199,7 +199,7 @@ private void initNoPrimaryEnvironment(final BaseDumperContext dumperContext) thr } } - private void initUniqueIndexOnNotNullColumnEnvironment(final BaseDumperContext dumperContext) throws SQLException { + private void initUniqueIndexOnNotNullColumnEnvironment(final DumperCommonContext dumperContext) throws SQLException { DataSource dataSource = dataSourceManager.getDataSource(dumperContext.getDataSourceConfig()); try ( Connection connection = dataSource.getConnection();