From d665dbbc3e466a8e5a29bd05f82135845bff5f79 Mon Sep 17 00:00:00 2001 From: zhangliang Date: Tue, 7 Nov 2023 17:56:58 +0800 Subject: [PATCH] Move YamlPipelineDataSourceConfiguration into core module --- .../datasource}/PipelineDataSourceConfigurationFactory.java | 3 ++- .../datasource}/yaml/YamlPipelineDataSourceConfiguration.java | 2 +- .../yaml/YamlPipelineDataSourceConfigurationSwapper.java | 4 ++-- .../shardingsphere/data/pipeline/cdc/api/impl/CDCJobAPI.java | 4 ++-- .../pipeline/cdc/yaml/config/YamlCDCJobConfiguration.java | 2 +- .../cdc/yaml/swapper/YamlCDCJobConfigurationSwapper.java | 2 +- .../pipeline/scenario/migration/api/impl/MigrationJobAPI.java | 2 +- .../data/pipeline/yaml/job/YamlMigrationJobConfiguration.java | 2 +- .../yaml/job/YamlMigrationJobConfigurationSwapper.java | 2 +- .../pipeline/common/DefaultPipelineDataSourceManagerTest.java | 2 +- .../it/data/pipeline/core/util/JobConfigurationBuilder.java | 2 +- .../scenario/migration/api/impl/MigrationJobAPITest.java | 2 +- 12 files changed, 15 insertions(+), 14 deletions(-) rename kernel/data-pipeline/{api/src/main/java/org/apache/shardingsphere/data/pipeline/api => core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource}/PipelineDataSourceConfigurationFactory.java (93%) rename kernel/data-pipeline/{api/src/main/java/org/apache/shardingsphere/data/pipeline/api => core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource}/yaml/YamlPipelineDataSourceConfiguration.java (94%) rename kernel/data-pipeline/{api/src/main/java/org/apache/shardingsphere/data/pipeline/api => core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource}/yaml/YamlPipelineDataSourceConfigurationSwapper.java (91%) diff --git a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/PipelineDataSourceConfigurationFactory.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/PipelineDataSourceConfigurationFactory.java similarity index 93% rename from kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/PipelineDataSourceConfigurationFactory.java rename to kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/PipelineDataSourceConfigurationFactory.java index 6755ab3ec382c..2a97ff566c3f9 100644 --- a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/PipelineDataSourceConfigurationFactory.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/PipelineDataSourceConfigurationFactory.java @@ -15,10 +15,11 @@ * limitations under the License. */ -package org.apache.shardingsphere.data.pipeline.api; +package org.apache.shardingsphere.data.pipeline.common.datasource; import lombok.AccessLevel; import lombok.NoArgsConstructor; +import org.apache.shardingsphere.data.pipeline.api.PipelineDataSourceConfiguration; import org.apache.shardingsphere.data.pipeline.api.type.ShardingSpherePipelineDataSourceConfiguration; import org.apache.shardingsphere.data.pipeline.api.type.StandardPipelineDataSourceConfiguration; import org.apache.shardingsphere.infra.exception.core.external.sql.type.generic.UnsupportedSQLOperationException; diff --git a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/yaml/YamlPipelineDataSourceConfiguration.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/yaml/YamlPipelineDataSourceConfiguration.java similarity index 94% rename from kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/yaml/YamlPipelineDataSourceConfiguration.java rename to kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/yaml/YamlPipelineDataSourceConfiguration.java index 3a5166b734f1a..e2a7f4a4ba0f1 100644 --- a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/yaml/YamlPipelineDataSourceConfiguration.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/yaml/YamlPipelineDataSourceConfiguration.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.data.pipeline.api.yaml; +package org.apache.shardingsphere.data.pipeline.common.datasource.yaml; import lombok.Getter; import lombok.Setter; diff --git a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/yaml/YamlPipelineDataSourceConfigurationSwapper.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/yaml/YamlPipelineDataSourceConfigurationSwapper.java similarity index 91% rename from kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/yaml/YamlPipelineDataSourceConfigurationSwapper.java rename to kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/yaml/YamlPipelineDataSourceConfigurationSwapper.java index d59bc525972cf..d7b297f059926 100644 --- a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/api/yaml/YamlPipelineDataSourceConfigurationSwapper.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/yaml/YamlPipelineDataSourceConfigurationSwapper.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package org.apache.shardingsphere.data.pipeline.api.yaml; +package org.apache.shardingsphere.data.pipeline.common.datasource.yaml; import org.apache.shardingsphere.data.pipeline.api.PipelineDataSourceConfiguration; -import org.apache.shardingsphere.data.pipeline.api.PipelineDataSourceConfigurationFactory; +import org.apache.shardingsphere.data.pipeline.common.datasource.PipelineDataSourceConfigurationFactory; import org.apache.shardingsphere.infra.util.yaml.swapper.YamlConfigurationSwapper; /** diff --git a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/api/impl/CDCJobAPI.java b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/api/impl/CDCJobAPI.java index d0d2dccd0e9d0..96ea1edd71603 100644 --- a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/api/impl/CDCJobAPI.java +++ b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/api/impl/CDCJobAPI.java @@ -22,10 +22,10 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.codec.digest.DigestUtils; import org.apache.shardingsphere.data.pipeline.api.PipelineDataSourceConfiguration; -import org.apache.shardingsphere.data.pipeline.api.PipelineDataSourceConfigurationFactory; +import org.apache.shardingsphere.data.pipeline.common.datasource.PipelineDataSourceConfigurationFactory; import org.apache.shardingsphere.data.pipeline.api.type.ShardingSpherePipelineDataSourceConfiguration; import org.apache.shardingsphere.data.pipeline.api.type.StandardPipelineDataSourceConfiguration; -import org.apache.shardingsphere.data.pipeline.api.yaml.YamlPipelineDataSourceConfigurationSwapper; +import org.apache.shardingsphere.data.pipeline.common.datasource.yaml.YamlPipelineDataSourceConfigurationSwapper; import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.context.DumperCommonContext; import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.context.IncrementalDumperContext; import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.context.mapper.ActualAndLogicTableNameMapper; diff --git a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/yaml/config/YamlCDCJobConfiguration.java b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/yaml/config/YamlCDCJobConfiguration.java index ef5382744a0c8..d2a0083fca36f 100644 --- a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/yaml/config/YamlCDCJobConfiguration.java +++ b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/yaml/config/YamlCDCJobConfiguration.java @@ -19,7 +19,7 @@ import lombok.Getter; import lombok.Setter; -import org.apache.shardingsphere.data.pipeline.api.yaml.YamlPipelineDataSourceConfiguration; +import org.apache.shardingsphere.data.pipeline.common.datasource.yaml.YamlPipelineDataSourceConfiguration; import org.apache.shardingsphere.data.pipeline.common.config.job.yaml.YamlPipelineJobConfiguration; import java.util.List; diff --git a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/yaml/swapper/YamlCDCJobConfigurationSwapper.java b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/yaml/swapper/YamlCDCJobConfigurationSwapper.java index d3698e196b8d9..871ed0eb7eb1d 100644 --- a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/yaml/swapper/YamlCDCJobConfigurationSwapper.java +++ b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/yaml/swapper/YamlCDCJobConfigurationSwapper.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.data.pipeline.cdc.yaml.swapper; import org.apache.shardingsphere.data.pipeline.api.type.ShardingSpherePipelineDataSourceConfiguration; -import org.apache.shardingsphere.data.pipeline.api.yaml.YamlPipelineDataSourceConfigurationSwapper; +import org.apache.shardingsphere.data.pipeline.common.datasource.yaml.YamlPipelineDataSourceConfigurationSwapper; import org.apache.shardingsphere.data.pipeline.cdc.config.job.CDCJobConfiguration; import org.apache.shardingsphere.data.pipeline.cdc.config.job.CDCJobConfiguration.SinkConfiguration; import org.apache.shardingsphere.data.pipeline.cdc.constant.CDCSinkType; diff --git a/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/api/impl/MigrationJobAPI.java b/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/api/impl/MigrationJobAPI.java index b458aac531309..987620ee6303b 100644 --- a/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/api/impl/MigrationJobAPI.java +++ b/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/api/impl/MigrationJobAPI.java @@ -24,7 +24,7 @@ import org.apache.shardingsphere.data.pipeline.api.PipelineDataSourceConfiguration; import org.apache.shardingsphere.data.pipeline.api.type.ShardingSpherePipelineDataSourceConfiguration; import org.apache.shardingsphere.data.pipeline.api.type.StandardPipelineDataSourceConfiguration; -import org.apache.shardingsphere.data.pipeline.api.yaml.YamlPipelineDataSourceConfiguration; +import org.apache.shardingsphere.data.pipeline.common.datasource.yaml.YamlPipelineDataSourceConfiguration; import org.apache.shardingsphere.data.pipeline.common.metadata.LogicTableName; import org.apache.shardingsphere.data.pipeline.common.metadata.SchemaTableName; import org.apache.shardingsphere.data.pipeline.common.config.CreateTableConfiguration; diff --git a/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/yaml/job/YamlMigrationJobConfiguration.java b/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/yaml/job/YamlMigrationJobConfiguration.java index 8dbeaa5b0a6b5..4cec4ee3c1b14 100644 --- a/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/yaml/job/YamlMigrationJobConfiguration.java +++ b/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/yaml/job/YamlMigrationJobConfiguration.java @@ -20,7 +20,7 @@ import com.google.common.base.Preconditions; import lombok.Getter; import lombok.Setter; -import org.apache.shardingsphere.data.pipeline.api.yaml.YamlPipelineDataSourceConfiguration; +import org.apache.shardingsphere.data.pipeline.common.datasource.yaml.YamlPipelineDataSourceConfiguration; import org.apache.shardingsphere.data.pipeline.common.config.job.yaml.YamlPipelineJobConfiguration; import java.util.List; diff --git a/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/yaml/job/YamlMigrationJobConfigurationSwapper.java b/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/yaml/job/YamlMigrationJobConfigurationSwapper.java index 401b9fa527c26..c5dce6c130669 100644 --- a/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/yaml/job/YamlMigrationJobConfigurationSwapper.java +++ b/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/yaml/job/YamlMigrationJobConfigurationSwapper.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.data.pipeline.yaml.job; -import org.apache.shardingsphere.data.pipeline.api.yaml.YamlPipelineDataSourceConfigurationSwapper; +import org.apache.shardingsphere.data.pipeline.common.datasource.yaml.YamlPipelineDataSourceConfigurationSwapper; import org.apache.shardingsphere.data.pipeline.common.datanode.JobDataNodeLine; import org.apache.shardingsphere.data.pipeline.scenario.migration.config.MigrationJobConfiguration; import org.apache.shardingsphere.infra.database.core.type.DatabaseType; diff --git a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/common/DefaultPipelineDataSourceManagerTest.java b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/common/DefaultPipelineDataSourceManagerTest.java index 34851ee5a2450..4fcbd7ec22935 100644 --- a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/common/DefaultPipelineDataSourceManagerTest.java +++ b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/common/DefaultPipelineDataSourceManagerTest.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.test.it.data.pipeline.common; import org.apache.shardingsphere.data.pipeline.api.PipelineDataSourceConfiguration; -import org.apache.shardingsphere.data.pipeline.api.PipelineDataSourceConfigurationFactory; +import org.apache.shardingsphere.data.pipeline.common.datasource.PipelineDataSourceConfigurationFactory; import org.apache.shardingsphere.data.pipeline.common.datasource.DefaultPipelineDataSourceManager; import org.apache.shardingsphere.data.pipeline.common.datasource.PipelineDataSourceManager; import org.apache.shardingsphere.data.pipeline.common.datasource.PipelineDataSourceWrapper; diff --git a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/JobConfigurationBuilder.java b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/JobConfigurationBuilder.java index edd9fa20da405..9a44512b41d6d 100644 --- a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/JobConfigurationBuilder.java +++ b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/JobConfigurationBuilder.java @@ -23,7 +23,7 @@ import org.apache.shardingsphere.data.pipeline.api.PipelineDataSourceConfiguration; import org.apache.shardingsphere.data.pipeline.api.type.ShardingSpherePipelineDataSourceConfiguration; import org.apache.shardingsphere.data.pipeline.api.type.StandardPipelineDataSourceConfiguration; -import org.apache.shardingsphere.data.pipeline.api.yaml.YamlPipelineDataSourceConfiguration; +import org.apache.shardingsphere.data.pipeline.common.datasource.yaml.YamlPipelineDataSourceConfiguration; import org.apache.shardingsphere.data.pipeline.common.context.PipelineContextKey; import org.apache.shardingsphere.data.pipeline.common.datasource.PipelineDataSourceFactory; import org.apache.shardingsphere.data.pipeline.common.datasource.PipelineDataSourceWrapper; diff --git a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/api/impl/MigrationJobAPITest.java b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/api/impl/MigrationJobAPITest.java index 1bfe022f99247..4c4c5570879df 100644 --- a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/api/impl/MigrationJobAPITest.java +++ b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/api/impl/MigrationJobAPITest.java @@ -19,7 +19,7 @@ import lombok.SneakyThrows; import org.apache.shardingsphere.data.pipeline.api.PipelineDataSourceConfiguration; -import org.apache.shardingsphere.data.pipeline.api.PipelineDataSourceConfigurationFactory; +import org.apache.shardingsphere.data.pipeline.common.datasource.PipelineDataSourceConfigurationFactory; import org.apache.shardingsphere.data.pipeline.common.datanode.JobDataNodeEntry; import org.apache.shardingsphere.data.pipeline.common.datanode.JobDataNodeLine; import org.apache.shardingsphere.data.pipeline.common.datasource.PipelineDataSourceWrapper;