From cb5dc166fa606d8ffd22ec4aca6b3774e994226b Mon Sep 17 00:00:00 2001 From: Chuxin Chen Date: Mon, 14 Nov 2022 10:15:00 +0800 Subject: [PATCH] Move ShardingSphereDataCollector from pipeline to infra. (#22158) --- .../metadata/data/ShardingStatisticsTableCollector.java | 2 +- ...infra.metadata.data.collector.ShardingSphereDataCollector} | 0 .../metadata}/data/collector/ShardingSphereDataCollector.java | 2 +- .../data/collector/ShardingSphereDataCollectorFactory.java | 2 +- .../core/execute/ShardingSphereDataScheduleCollector.java | 4 ++-- .../core/execute/ShardingSphereDataCollectorFixture.java | 2 +- ...infra.metadata.data.collector.ShardingSphereDataCollector} | 0 7 files changed, 6 insertions(+), 6 deletions(-) rename features/sharding/core/src/main/resources/META-INF/services/{org.apache.shardingsphere.data.pipeline.spi.data.collector.ShardingSphereDataCollector => org.apache.shardingsphere.infra.metadata.data.collector.ShardingSphereDataCollector} (100%) rename {kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/spi => infra/common/src/main/java/org/apache/shardingsphere/infra/metadata}/data/collector/ShardingSphereDataCollector.java (96%) rename {kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/spi => infra/common/src/main/java/org/apache/shardingsphere/infra/metadata}/data/collector/ShardingSphereDataCollectorFactory.java (96%) rename kernel/data-pipeline/core/src/test/resources/META-INF/services/{org.apache.shardingsphere.data.pipeline.spi.data.collector.ShardingSphereDataCollector => org.apache.shardingsphere.infra.metadata.data.collector.ShardingSphereDataCollector} (100%) diff --git a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/metadata/data/ShardingStatisticsTableCollector.java b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/metadata/data/ShardingStatisticsTableCollector.java index 21b8472e96878..5d2436002962d 100644 --- a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/metadata/data/ShardingStatisticsTableCollector.java +++ b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/metadata/data/ShardingStatisticsTableCollector.java @@ -17,7 +17,6 @@ package org.apache.shardingsphere.sharding.metadata.data; -import org.apache.shardingsphere.data.pipeline.spi.data.collector.ShardingSphereDataCollector; import org.apache.shardingsphere.infra.database.type.DatabaseType; import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType; import org.apache.shardingsphere.infra.database.type.dialect.OpenGaussDatabaseType; @@ -25,6 +24,7 @@ import org.apache.shardingsphere.infra.datanode.DataNode; import org.apache.shardingsphere.infra.metadata.data.ShardingSphereRowData; import org.apache.shardingsphere.infra.metadata.data.ShardingSphereTableData; +import org.apache.shardingsphere.infra.metadata.data.collector.ShardingSphereDataCollector; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereTable; import org.apache.shardingsphere.sharding.rule.ShardingRule; diff --git a/features/sharding/core/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.data.collector.ShardingSphereDataCollector b/features/sharding/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.metadata.data.collector.ShardingSphereDataCollector similarity index 100% rename from features/sharding/core/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.data.collector.ShardingSphereDataCollector rename to features/sharding/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.metadata.data.collector.ShardingSphereDataCollector diff --git a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/spi/data/collector/ShardingSphereDataCollector.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/data/collector/ShardingSphereDataCollector.java similarity index 96% rename from kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/spi/data/collector/ShardingSphereDataCollector.java rename to infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/data/collector/ShardingSphereDataCollector.java index e7334848cc498..65bd503731b7b 100644 --- a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/spi/data/collector/ShardingSphereDataCollector.java +++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/data/collector/ShardingSphereDataCollector.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.data.pipeline.spi.data.collector; +package org.apache.shardingsphere.infra.metadata.data.collector; import org.apache.shardingsphere.infra.metadata.data.ShardingSphereTableData; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; diff --git a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/spi/data/collector/ShardingSphereDataCollectorFactory.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/data/collector/ShardingSphereDataCollectorFactory.java similarity index 96% rename from kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/spi/data/collector/ShardingSphereDataCollectorFactory.java rename to infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/data/collector/ShardingSphereDataCollectorFactory.java index b3554a6d57ae4..70c26f49f3416 100644 --- a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/spi/data/collector/ShardingSphereDataCollectorFactory.java +++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/data/collector/ShardingSphereDataCollectorFactory.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.data.pipeline.spi.data.collector; +package org.apache.shardingsphere.infra.metadata.data.collector; import lombok.AccessLevel; import lombok.NoArgsConstructor; diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/execute/ShardingSphereDataScheduleCollector.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/execute/ShardingSphereDataScheduleCollector.java index 6acde3ab0c418..31b3a4a16ded8 100644 --- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/execute/ShardingSphereDataScheduleCollector.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/execute/ShardingSphereDataScheduleCollector.java @@ -19,14 +19,14 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.shardingsphere.data.pipeline.spi.data.collector.ShardingSphereDataCollector; -import org.apache.shardingsphere.data.pipeline.spi.data.collector.ShardingSphereDataCollectorFactory; import org.apache.shardingsphere.infra.executor.kernel.thread.ExecutorThreadFactoryBuilder; import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData; import org.apache.shardingsphere.infra.metadata.data.ShardingSphereData; import org.apache.shardingsphere.infra.metadata.data.ShardingSphereDatabaseData; import org.apache.shardingsphere.infra.metadata.data.ShardingSphereSchemaData; import org.apache.shardingsphere.infra.metadata.data.ShardingSphereTableData; +import org.apache.shardingsphere.infra.metadata.data.collector.ShardingSphereDataCollector; +import org.apache.shardingsphere.infra.metadata.data.collector.ShardingSphereDataCollectorFactory; import org.apache.shardingsphere.infra.metadata.data.event.ShardingSphereSchemaDataAlteredEvent; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereTable; diff --git a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/execute/ShardingSphereDataCollectorFixture.java b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/execute/ShardingSphereDataCollectorFixture.java index 47f22a6b13d02..4b98bcfbedeb2 100644 --- a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/execute/ShardingSphereDataCollectorFixture.java +++ b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/execute/ShardingSphereDataCollectorFixture.java @@ -17,9 +17,9 @@ package org.apache.shardingsphere.data.pipeline.core.execute; -import org.apache.shardingsphere.data.pipeline.spi.data.collector.ShardingSphereDataCollector; import org.apache.shardingsphere.infra.metadata.data.ShardingSphereRowData; import org.apache.shardingsphere.infra.metadata.data.ShardingSphereTableData; +import org.apache.shardingsphere.infra.metadata.data.collector.ShardingSphereDataCollector; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereTable; diff --git a/kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.data.collector.ShardingSphereDataCollector b/kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.metadata.data.collector.ShardingSphereDataCollector similarity index 100% rename from kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.data.collector.ShardingSphereDataCollector rename to kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.metadata.data.collector.ShardingSphereDataCollector