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 50ba6389e97 Rename AlgorithmDescription to SPIDescription (#23977)
50ba6389e97 is described below

commit 50ba6389e971334d01e0f606f107886270babc67
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Feb 3 19:25:14 2023 +0800

    Rename AlgorithmDescription to SPIDescription (#23977)
---
 .../shardingsphere/infra/util/spi/annotation/SPIDescription.java}   | 6 +++---
 .../core/api/impl/AbstractInventoryIncrementalJobAPIImpl.java       | 4 ++--
 .../algorithm/CRC32MatchDataConsistencyCalculateAlgorithm.java      | 4 ++--
 .../algorithm/DataMatchDataConsistencyCalculateAlgorithm.java       | 4 ++--
 .../core/fixture/DataConsistencyCalculateAlgorithmFixture.java      | 4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git 
a/infra/common/src/main/java/org/apache/shardingsphere/infra/algorithm/AlgorithmDescription.java
 
b/infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/annotation/SPIDescription.java
similarity index 90%
rename from 
infra/common/src/main/java/org/apache/shardingsphere/infra/algorithm/AlgorithmDescription.java
rename to 
infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/annotation/SPIDescription.java
index fd35e17f343..e54b6939ddc 100644
--- 
a/infra/common/src/main/java/org/apache/shardingsphere/infra/algorithm/AlgorithmDescription.java
+++ 
b/infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/annotation/SPIDescription.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.infra.algorithm;
+package org.apache.shardingsphere.infra.util.spi.annotation;
 
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
@@ -23,11 +23,11 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * Algorithm description.
+ * SPI description.
  */
 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.RUNTIME)
-public @interface AlgorithmDescription {
+public @interface SPIDescription {
     
     /**
      * Get description.
diff --git 
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/api/impl/AbstractInventoryIncrementalJobAPIImpl.java
 
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/api/impl/AbstractInventoryIncrementalJobAPIImpl.java
index 98d26fe701b..24c05731da1 100644
--- 
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/api/impl/AbstractInventoryIncrementalJobAPIImpl.java
+++ 
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/api/impl/AbstractInventoryIncrementalJobAPIImpl.java
@@ -43,7 +43,7 @@ import 
org.apache.shardingsphere.data.pipeline.core.task.IncrementalTask;
 import org.apache.shardingsphere.data.pipeline.core.task.InventoryTask;
 import 
org.apache.shardingsphere.data.pipeline.spi.check.consistency.DataConsistencyCalculateAlgorithm;
 import org.apache.shardingsphere.elasticjob.infra.pojo.JobConfigurationPOJO;
-import org.apache.shardingsphere.infra.algorithm.AlgorithmDescription;
+import org.apache.shardingsphere.infra.util.spi.annotation.SPIDescription;
 import org.apache.shardingsphere.infra.database.type.DatabaseType;
 import 
org.apache.shardingsphere.infra.util.exception.ShardingSpherePreconditions;
 import org.apache.shardingsphere.infra.util.spi.ShardingSphereServiceLoader;
@@ -174,7 +174,7 @@ public abstract class 
AbstractInventoryIncrementalJobAPIImpl extends AbstractPip
         checkModeConfig();
         Collection<DataConsistencyCheckAlgorithmInfo> result = new 
LinkedList<>();
         for (DataConsistencyCalculateAlgorithm each : 
ShardingSphereServiceLoader.getServiceInstances(DataConsistencyCalculateAlgorithm.class))
 {
-            AlgorithmDescription description = 
each.getClass().getAnnotation(AlgorithmDescription.class);
+            SPIDescription description = 
each.getClass().getAnnotation(SPIDescription.class);
             result.add(new DataConsistencyCheckAlgorithmInfo(each.getType(), 
getSupportedDatabaseTypes(each.getSupportedDatabaseTypes()), null == 
description ? "" : description.value()));
         }
         return result;
diff --git 
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/CRC32MatchDataConsistencyCalculateAlgorithm.java
 
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/CRC32MatchDataConsistencyCalculateAlgorithm.java
index 42116c8f0f8..cc872eda2d0 100644
--- 
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/CRC32MatchDataConsistencyCalculateAlgorithm.java
+++ 
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/CRC32MatchDataConsistencyCalculateAlgorithm.java
@@ -25,7 +25,7 @@ import 
org.apache.shardingsphere.data.pipeline.api.check.consistency.DataConsist
 import 
org.apache.shardingsphere.data.pipeline.core.exception.data.PipelineTableDataConsistencyCheckLoadingFailedException;
 import 
org.apache.shardingsphere.data.pipeline.core.exception.data.UnsupportedCRC32DataConsistencyCalculateAlgorithmException;
 import 
org.apache.shardingsphere.data.pipeline.spi.sqlbuilder.PipelineSQLBuilder;
-import org.apache.shardingsphere.infra.algorithm.AlgorithmDescription;
+import org.apache.shardingsphere.infra.util.spi.annotation.SPIDescription;
 import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
 import 
org.apache.shardingsphere.infra.util.exception.ShardingSpherePreconditions;
 import org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader;
@@ -43,7 +43,7 @@ import java.util.stream.Collectors;
 /**
  * CRC32 match data consistency calculate algorithm.
  */
-@AlgorithmDescription("Match CRC32 of records.")
+@SPIDescription("Match CRC32 of records.")
 @Slf4j
 public final class CRC32MatchDataConsistencyCalculateAlgorithm extends 
AbstractDataConsistencyCalculateAlgorithm {
     
diff --git 
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java
 
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java
index 4c40db804dd..f1e9c0f100b 100644
--- 
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java
+++ 
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java
@@ -30,7 +30,7 @@ import 
org.apache.shardingsphere.data.pipeline.core.check.consistency.DataConsis
 import 
org.apache.shardingsphere.data.pipeline.core.exception.data.PipelineTableDataConsistencyCheckLoadingFailedException;
 import 
org.apache.shardingsphere.data.pipeline.spi.ingest.dumper.ColumnValueReader;
 import 
org.apache.shardingsphere.data.pipeline.spi.sqlbuilder.PipelineSQLBuilder;
-import org.apache.shardingsphere.infra.algorithm.AlgorithmDescription;
+import org.apache.shardingsphere.infra.util.spi.annotation.SPIDescription;
 import org.apache.shardingsphere.infra.database.type.DatabaseType;
 import org.apache.shardingsphere.infra.util.spi.ShardingSphereServiceLoader;
 import org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader;
@@ -55,7 +55,7 @@ import java.util.stream.Collectors;
 /**
  * Data match data consistency calculate algorithm.
  */
-@AlgorithmDescription("Match raw data of records.")
+@SPIDescription("Match raw data of records.")
 @Slf4j
 public final class DataMatchDataConsistencyCalculateAlgorithm extends 
AbstractStreamingDataConsistencyCalculateAlgorithm {
     
diff --git 
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/DataConsistencyCalculateAlgorithmFixture.java
 
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/DataConsistencyCalculateAlgorithmFixture.java
index 9415325951a..22bd8a0c3de 100644
--- 
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/DataConsistencyCalculateAlgorithmFixture.java
+++ 
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/DataConsistencyCalculateAlgorithmFixture.java
@@ -20,7 +20,7 @@ package 
org.apache.shardingsphere.test.it.data.pipeline.core.fixture;
 import 
org.apache.shardingsphere.data.pipeline.api.check.consistency.DataConsistencyCalculateParameter;
 import 
org.apache.shardingsphere.data.pipeline.api.check.consistency.DataConsistencyCalculatedResult;
 import 
org.apache.shardingsphere.data.pipeline.spi.check.consistency.DataConsistencyCalculateAlgorithm;
-import org.apache.shardingsphere.infra.algorithm.AlgorithmDescription;
+import org.apache.shardingsphere.infra.util.spi.annotation.SPIDescription;
 import org.apache.shardingsphere.infra.database.type.DatabaseType;
 import org.apache.shardingsphere.infra.util.spi.ShardingSphereServiceLoader;
 
@@ -28,7 +28,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.stream.Collectors;
 
-@AlgorithmDescription("Fixture description.")
+@SPIDescription("Fixture description.")
 public final class DataConsistencyCalculateAlgorithmFixture implements 
DataConsistencyCalculateAlgorithm {
     
     @Override

Reply via email to