This is an automated email from the ASF dual-hosted git repository.

zhangliang 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 80e25d237b2 Remove useless methods on PipelineJobType (#37107)
80e25d237b2 is described below

commit 80e25d237b278d7c0a06ac78ec7796294c30253f
Author: Liang Zhang <[email protected]>
AuthorDate: Sat Nov 15 11:04:12 2025 +0800

    Remove useless methods on PipelineJobType (#37107)
---
 .../pipeline/core/job/type/PipelineJobType.java    | 82 ----------------------
 .../pipeline/core/job/type/FixtureJobType.java     | 32 ---------
 .../data/pipeline/cdc/CDCJobType.java              | 32 ---------
 .../consistencycheck/ConsistencyCheckJobType.java  | 32 ---------
 .../scenario/migration/MigrationJobType.java       | 38 ----------
 5 files changed, 216 deletions(-)

diff --git 
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/job/type/PipelineJobType.java
 
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/job/type/PipelineJobType.java
index 9eee123683c..dfe627d89cf 100644
--- 
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/job/type/PipelineJobType.java
+++ 
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/job/type/PipelineJobType.java
@@ -21,18 +21,10 @@ import com.fasterxml.jackson.annotation.JsonIgnoreType;
 import 
org.apache.shardingsphere.data.pipeline.core.consistencycheck.ConsistencyCheckJobItemProgressContext;
 import 
org.apache.shardingsphere.data.pipeline.core.consistencycheck.PipelineDataConsistencyChecker;
 import 
org.apache.shardingsphere.data.pipeline.core.context.TransmissionProcessContext;
-import org.apache.shardingsphere.data.pipeline.core.job.PipelineJob;
 import 
org.apache.shardingsphere.data.pipeline.core.job.config.PipelineJobConfiguration;
-import 
org.apache.shardingsphere.data.pipeline.core.job.config.yaml.swapper.YamlPipelineJobConfigurationSwapper;
-import 
org.apache.shardingsphere.data.pipeline.core.job.progress.PipelineJobItemProgress;
-import 
org.apache.shardingsphere.data.pipeline.core.job.progress.yaml.config.YamlPipelineJobItemProgressConfiguration;
-import 
org.apache.shardingsphere.data.pipeline.core.job.progress.yaml.swapper.YamlPipelineJobItemProgressSwapper;
 import org.apache.shardingsphere.data.pipeline.core.pojo.PipelineJobInfo;
 import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;
 import org.apache.shardingsphere.infra.spi.type.typed.TypedSPI;
-import org.apache.shardingsphere.infra.util.yaml.YamlConfiguration;
-
-import java.util.Optional;
 
 /**
  * Pipeline job type.
@@ -48,80 +40,6 @@ public interface PipelineJobType extends TypedSPI {
      */
     PipelineJobOption getOption();
     
-    /**
-     * Get job type code.
-     *
-     * @return job type code
-     */
-    String getCode();
-    
-    /**
-     * Whether transmission job.
-     *
-     * @return is transmission job or not
-     */
-    boolean isTransmissionJob();
-    
-    /**
-     * Get YAML pipeline job configuration swapper.
-     *
-     * @param <T> type of YAML configuration
-     * @param <Y> type of pipeline job configuration
-     * @return YAML pipeline job configuration swapper
-     */
-    <Y extends YamlConfiguration, T extends PipelineJobConfiguration> 
YamlPipelineJobConfigurationSwapper<Y, T> getYamlJobConfigurationSwapper();
-    
-    /**
-     * Get YAML pipeline job item progress swapper.
-     *
-     * @param <T> type of pipeline job item progress
-     * @return YAML pipeline job item progress swapper
-     */
-    <T extends PipelineJobItemProgress> 
YamlPipelineJobItemProgressSwapper<YamlPipelineJobItemProgressConfiguration, T> 
getYamlJobItemProgressSwapper();
-    
-    /**
-     * Get pipeline job class.
-     *
-     * @return pipeline job class
-     */
-    Class<? extends PipelineJob> getJobClass();
-    
-    /**
-     * Whether to ignore to start disabled job when job item progress is 
finished.
-     *
-     * @return ignore to start disabled job when job item progress is finished 
or not
-     */
-    default boolean isIgnoreToStartDisabledJobWhenJobItemProgressIsFinished() {
-        return false;
-    }
-    
-    /**
-     * Get to be start disabled next job type.
-     *
-     * @return to be start disabled next job type
-     */
-    default Optional<String> getToBeStartDisabledNextJobType() {
-        return Optional.empty();
-    }
-    
-    /**
-     * Get to be stopped previous job type.
-     *
-     * @return to be stopped previous job type
-     */
-    default Optional<String> getToBeStoppedPreviousJobType() {
-        return Optional.empty();
-    }
-    
-    /**
-     * Whether to force no sharding when convert to job configuration POJO.
-     *
-     * @return without sharding or not
-     */
-    default boolean isForceNoShardingWhenConvertToJobConfigurationPOJO() {
-        return false;
-    }
-    
     /**
      * Get pipeline job info.
      *
diff --git 
a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/job/type/FixtureJobType.java
 
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/job/type/FixtureJobType.java
index cbc3e3c555f..1be08c3f9da 100644
--- 
a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/job/type/FixtureJobType.java
+++ 
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/job/type/FixtureJobType.java
@@ -17,14 +17,7 @@
 
 package org.apache.shardingsphere.data.pipeline.core.job.type;
 
-import org.apache.shardingsphere.data.pipeline.core.job.PipelineJob;
-import 
org.apache.shardingsphere.data.pipeline.core.job.config.PipelineJobConfiguration;
-import 
org.apache.shardingsphere.data.pipeline.core.job.config.yaml.swapper.YamlPipelineJobConfigurationSwapper;
-import 
org.apache.shardingsphere.data.pipeline.core.job.progress.PipelineJobItemProgress;
-import 
org.apache.shardingsphere.data.pipeline.core.job.progress.yaml.config.YamlPipelineJobItemProgressConfiguration;
-import 
org.apache.shardingsphere.data.pipeline.core.job.progress.yaml.swapper.YamlPipelineJobItemProgressSwapper;
 import org.apache.shardingsphere.data.pipeline.core.pojo.PipelineJobInfo;
-import org.apache.shardingsphere.infra.util.yaml.YamlConfiguration;
 
 /**
  * Fixture job type.
@@ -36,31 +29,6 @@ public final class FixtureJobType implements PipelineJobType 
{
         return new PipelineJobOption("00", true, null, null, null, false, 
null, null, false);
     }
     
-    @Override
-    public String getCode() {
-        return "00";
-    }
-    
-    @Override
-    public boolean isTransmissionJob() {
-        return true;
-    }
-    
-    @Override
-    public <Y extends YamlConfiguration, T extends PipelineJobConfiguration> 
YamlPipelineJobConfigurationSwapper<Y, T> getYamlJobConfigurationSwapper() {
-        return null;
-    }
-    
-    @Override
-    public <T extends PipelineJobItemProgress> 
YamlPipelineJobItemProgressSwapper<YamlPipelineJobItemProgressConfiguration, T> 
getYamlJobItemProgressSwapper() {
-        return null;
-    }
-    
-    @Override
-    public Class<? extends PipelineJob> getJobClass() {
-        return null;
-    }
-    
     @Override
     public PipelineJobInfo getJobInfo(final String jobId) {
         return null;
diff --git 
a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/CDCJobType.java
 
b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/CDCJobType.java
index 1aeaa5b5636..793e6e77e48 100644
--- 
a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/CDCJobType.java
+++ 
b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/CDCJobType.java
@@ -37,38 +37,6 @@ public final class CDCJobType implements PipelineJobType {
         return new PipelineJobOption("03", true, new 
YamlCDCJobConfigurationSwapper(), new YamlTransmissionJobItemProgressSwapper(), 
CDCJob.class, false, null, null, true);
     }
     
-    @Override
-    public String getCode() {
-        return "03";
-    }
-    
-    @Override
-    public boolean isTransmissionJob() {
-        return true;
-    }
-    
-    @SuppressWarnings("unchecked")
-    @Override
-    public YamlCDCJobConfigurationSwapper getYamlJobConfigurationSwapper() {
-        return new YamlCDCJobConfigurationSwapper();
-    }
-    
-    @SuppressWarnings("unchecked")
-    @Override
-    public YamlTransmissionJobItemProgressSwapper 
getYamlJobItemProgressSwapper() {
-        return new YamlTransmissionJobItemProgressSwapper();
-    }
-    
-    @Override
-    public Class<CDCJob> getJobClass() {
-        return CDCJob.class;
-    }
-    
-    @Override
-    public boolean isForceNoShardingWhenConvertToJobConfigurationPOJO() {
-        return true;
-    }
-    
     @Override
     public PipelineJobInfo getJobInfo(final String jobId) {
         PipelineJobMetaData jobMetaData = new 
PipelineJobMetaData(PipelineJobIdUtils.getElasticJobConfigurationPOJO(jobId));
diff --git 
a/kernel/data-pipeline/scenario/consistency-check/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/ConsistencyCheckJobType.java
 
b/kernel/data-pipeline/scenario/consistency-check/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/ConsistencyCheckJobType.java
index e01448b4243..1254f8497e5 100644
--- 
a/kernel/data-pipeline/scenario/consistency-check/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/ConsistencyCheckJobType.java
+++ 
b/kernel/data-pipeline/scenario/consistency-check/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/ConsistencyCheckJobType.java
@@ -34,38 +34,6 @@ public final class ConsistencyCheckJobType implements 
PipelineJobType {
                 false, new YamlConsistencyCheckJobConfigurationSwapper(), new 
YamlConsistencyCheckJobItemProgressSwapper(), ConsistencyCheckJob.class, true, 
null, null, false);
     }
     
-    @Override
-    public String getCode() {
-        return "02";
-    }
-    
-    @Override
-    public boolean isTransmissionJob() {
-        return false;
-    }
-    
-    @SuppressWarnings("unchecked")
-    @Override
-    public YamlConsistencyCheckJobConfigurationSwapper 
getYamlJobConfigurationSwapper() {
-        return new YamlConsistencyCheckJobConfigurationSwapper();
-    }
-    
-    @SuppressWarnings("unchecked")
-    @Override
-    public YamlConsistencyCheckJobItemProgressSwapper 
getYamlJobItemProgressSwapper() {
-        return new YamlConsistencyCheckJobItemProgressSwapper();
-    }
-    
-    @Override
-    public Class<ConsistencyCheckJob> getJobClass() {
-        return ConsistencyCheckJob.class;
-    }
-    
-    @Override
-    public boolean isIgnoreToStartDisabledJobWhenJobItemProgressIsFinished() {
-        return true;
-    }
-    
     @Override
     public PipelineJobInfo getJobInfo(final String jobId) {
         return null;
diff --git 
a/kernel/data-pipeline/scenario/migration/core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/MigrationJobType.java
 
b/kernel/data-pipeline/scenario/migration/core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/MigrationJobType.java
index a3fc87e7144..040a844d58b 100644
--- 
a/kernel/data-pipeline/scenario/migration/core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/MigrationJobType.java
+++ 
b/kernel/data-pipeline/scenario/migration/core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/MigrationJobType.java
@@ -34,7 +34,6 @@ import 
org.apache.shardingsphere.data.pipeline.scenario.migration.config.yaml.sw
 
 import java.util.Collection;
 import java.util.LinkedList;
-import java.util.Optional;
 
 /**
  * Migration job type.
@@ -47,43 +46,6 @@ public final class MigrationJobType implements 
PipelineJobType {
                 true, new YamlMigrationJobConfigurationSwapper(), new 
YamlTransmissionJobItemProgressSwapper(), MigrationJob.class, false, 
"CONSISTENCY_CHECK", "CONSISTENCY_CHECK", false);
     }
     
-    @Override
-    public String getCode() {
-        return "01";
-    }
-    
-    @Override
-    public boolean isTransmissionJob() {
-        return true;
-    }
-    
-    @SuppressWarnings("unchecked")
-    @Override
-    public YamlMigrationJobConfigurationSwapper 
getYamlJobConfigurationSwapper() {
-        return new YamlMigrationJobConfigurationSwapper();
-    }
-    
-    @SuppressWarnings("unchecked")
-    @Override
-    public YamlTransmissionJobItemProgressSwapper 
getYamlJobItemProgressSwapper() {
-        return new YamlTransmissionJobItemProgressSwapper();
-    }
-    
-    @Override
-    public Class<MigrationJob> getJobClass() {
-        return MigrationJob.class;
-    }
-    
-    @Override
-    public Optional<String> getToBeStartDisabledNextJobType() {
-        return Optional.of("CONSISTENCY_CHECK");
-    }
-    
-    @Override
-    public Optional<String> getToBeStoppedPreviousJobType() {
-        return Optional.of("CONSISTENCY_CHECK");
-    }
-    
     @Override
     public PipelineJobInfo getJobInfo(final String jobId) {
         PipelineJobMetaData jobMetaData = new 
PipelineJobMetaData(PipelineJobIdUtils.getElasticJobConfigurationPOJO(jobId));

Reply via email to