diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/DialectIngestPositionManager.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/DialectIncrementalPositionManager.java similarity index 94% rename from kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/DialectIngestPositionManager.java rename to kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/DialectIncrementalPositionManager.java index 657bb8f4ab961..0e89cc1385163 100644 --- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/DialectIngestPositionManager.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/DialectIncrementalPositionManager.java @@ -24,10 +24,10 @@ import java.sql.SQLException; /** - * Dialect ingest position manager. + * Dialect incremental position manager. */ @SingletonSPI -public interface DialectIngestPositionManager extends DatabaseTypedSPI { +public interface DialectIncrementalPositionManager extends DatabaseTypedSPI { /** * Init position by string data. diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/job/progress/yaml/swapper/YamlJobItemIncrementalTasksProgressSwapper.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/job/progress/yaml/swapper/YamlJobItemIncrementalTasksProgressSwapper.java index b09a8fd89823b..40cca25094c89 100644 --- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/job/progress/yaml/swapper/YamlJobItemIncrementalTasksProgressSwapper.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/job/progress/yaml/swapper/YamlJobItemIncrementalTasksProgressSwapper.java @@ -20,7 +20,7 @@ import org.apache.shardingsphere.data.pipeline.core.job.progress.JobItemIncrementalTasksProgress; import org.apache.shardingsphere.data.pipeline.core.job.progress.yaml.config.YamlJobItemIncrementalTasksProgress; import org.apache.shardingsphere.data.pipeline.core.task.progress.IncrementalTaskProgress; -import org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager; +import org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager; import org.apache.shardingsphere.infra.database.core.type.DatabaseType; import org.apache.shardingsphere.infra.database.core.spi.DatabaseTypedSPILoader; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; @@ -62,7 +62,7 @@ public JobItemIncrementalTasksProgress swapToObject(final String databaseType, f return new JobItemIncrementalTasksProgress(null); } // TODO consider to remove parameter databaseType - DialectIngestPositionManager positionInitializer = DatabaseTypedSPILoader.getService(DialectIngestPositionManager.class, TypedSPILoader.getService(DatabaseType.class, databaseType)); + DialectIncrementalPositionManager positionInitializer = DatabaseTypedSPILoader.getService(DialectIncrementalPositionManager.class, TypedSPILoader.getService(DatabaseType.class, databaseType)); IncrementalTaskProgress taskProgress = new IncrementalTaskProgress(positionInitializer.init(yamlProgress.getPosition())); taskProgress.setIncrementalTaskDelay(yamlProgress.getDelay()); return new JobItemIncrementalTasksProgress(taskProgress); diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/preparer/incremental/IncrementalTaskPositionManager.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/preparer/incremental/IncrementalTaskPositionManager.java index eda4197fa093a..fd2bab1bc6ae0 100644 --- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/preparer/incremental/IncrementalTaskPositionManager.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/preparer/incremental/IncrementalTaskPositionManager.java @@ -26,7 +26,7 @@ import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.incremental.IncrementalDumperContext; import org.apache.shardingsphere.data.pipeline.core.ingest.position.IngestPosition; import org.apache.shardingsphere.data.pipeline.core.job.progress.JobItemIncrementalTasksProgress; -import org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager; +import org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager; import org.apache.shardingsphere.infra.database.core.spi.DatabaseTypedSPILoader; import org.apache.shardingsphere.infra.database.core.type.DatabaseType; import org.apache.shardingsphere.infra.datasource.pool.creator.DataSourcePoolCreator; @@ -44,11 +44,11 @@ public final class IncrementalTaskPositionManager { private final DatabaseType databaseType; - private final DialectIngestPositionManager positionInitializer; + private final DialectIncrementalPositionManager positionInitializer; public IncrementalTaskPositionManager(final DatabaseType databaseType) { this.databaseType = databaseType; - positionInitializer = DatabaseTypedSPILoader.getService(DialectIngestPositionManager.class, databaseType); + positionInitializer = DatabaseTypedSPILoader.getService(DialectIncrementalPositionManager.class, databaseType); } /** @@ -90,7 +90,7 @@ public void destroyPosition(final String jobId, final PipelineDataSourceConfigur } private void destroyPosition(final String jobId, - final ShardingSpherePipelineDataSourceConfiguration pipelineDataSourceConfig, final DialectIngestPositionManager positionInitializer) throws SQLException { + final ShardingSpherePipelineDataSourceConfiguration pipelineDataSourceConfig, final DialectIncrementalPositionManager positionInitializer) throws SQLException { for (DataSourcePoolProperties each : new YamlDataSourceConfigurationSwapper().getDataSourcePoolPropertiesMap(pipelineDataSourceConfig.getRootConfig()).values()) { try (PipelineDataSourceWrapper dataSource = new PipelineDataSourceWrapper(DataSourcePoolCreator.create(each), databaseType)) { positionInitializer.destroy(dataSource, jobId); @@ -99,7 +99,7 @@ private void destroyPosition(final String jobId, } private void destroyPosition(final String jobId, final StandardPipelineDataSourceConfiguration pipelineDataSourceConfig, - final DialectIngestPositionManager positionInitializer) throws SQLException { + final DialectIncrementalPositionManager positionInitializer) throws SQLException { try ( PipelineDataSourceWrapper dataSource = new PipelineDataSourceWrapper( DataSourcePoolCreator.create((DataSourcePoolProperties) pipelineDataSourceConfig.getDataSourceConfiguration()), databaseType)) { diff --git a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/FixtureIngestPositionManager.java b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/FixtureIncrementalPositionManager.java similarity index 93% rename from kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/FixtureIngestPositionManager.java rename to kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/FixtureIncrementalPositionManager.java index 08d18d6a06e57..0b30148dc8475 100644 --- a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/FixtureIngestPositionManager.java +++ b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/FixtureIncrementalPositionManager.java @@ -21,7 +21,7 @@ import javax.sql.DataSource; -public final class FixtureIngestPositionManager implements DialectIngestPositionManager { +public final class FixtureIncrementalPositionManager implements DialectIncrementalPositionManager { @Override public IngestPlaceholderPosition init(final DataSource dataSource, final String slotNameSuffix) { diff --git a/kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager b/kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager similarity index 96% rename from kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager rename to kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager index af39b04daeec0..779e7527c2486 100644 --- a/kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager +++ b/kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager @@ -15,4 +15,4 @@ # limitations under the License. # -org.apache.shardingsphere.data.pipeline.core.ingest.position.FixtureIngestPositionManager +org.apache.shardingsphere.data.pipeline.core.ingest.position.FixtureIncrementalPositionManager diff --git a/kernel/data-pipeline/dialect/mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/incremental/position/MySQLIngestPositionManager.java b/kernel/data-pipeline/dialect/mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/incremental/position/MySQLIncrementalPositionManager.java similarity index 92% rename from kernel/data-pipeline/dialect/mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/incremental/position/MySQLIngestPositionManager.java rename to kernel/data-pipeline/dialect/mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/incremental/position/MySQLIncrementalPositionManager.java index 523d8cff446da..270353b33020f 100644 --- a/kernel/data-pipeline/dialect/mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/incremental/position/MySQLIngestPositionManager.java +++ b/kernel/data-pipeline/dialect/mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/incremental/position/MySQLIncrementalPositionManager.java @@ -19,7 +19,7 @@ import com.google.common.base.Preconditions; import org.apache.shardingsphere.data.pipeline.mysql.ingest.incremental.binlog.MySQLBinlogPosition; -import org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager; +import org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager; import javax.sql.DataSource; import java.sql.Connection; @@ -28,9 +28,9 @@ import java.sql.SQLException; /** - * Ingest position manager for MySQL. + * Incremental position manager for MySQL. */ -public final class MySQLIngestPositionManager implements DialectIngestPositionManager { +public final class MySQLIncrementalPositionManager implements DialectIncrementalPositionManager { @Override public MySQLBinlogPosition init(final String data) { diff --git a/kernel/data-pipeline/dialect/mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager b/kernel/data-pipeline/dialect/mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager similarity index 95% rename from kernel/data-pipeline/dialect/mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager rename to kernel/data-pipeline/dialect/mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager index 87be4f60730f5..f6fb8e3ab0751 100644 --- a/kernel/data-pipeline/dialect/mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager +++ b/kernel/data-pipeline/dialect/mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager @@ -15,4 +15,4 @@ # limitations under the License. # -org.apache.shardingsphere.data.pipeline.mysql.ingest.incremental.position.MySQLIngestPositionManager +org.apache.shardingsphere.data.pipeline.mysql.ingest.incremental.position.MySQLIncrementalPositionManager diff --git a/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/position/MySQLIngestPositionManagerTest.java b/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/position/MySQLIngestPositionManagerTest.java index c3c5e1fb1d9dc..a00d612e29e87 100644 --- a/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/position/MySQLIngestPositionManagerTest.java +++ b/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/position/MySQLIngestPositionManagerTest.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.data.pipeline.mysql.ingest.position; import org.apache.shardingsphere.data.pipeline.mysql.ingest.incremental.binlog.MySQLBinlogPosition; -import org.apache.shardingsphere.data.pipeline.mysql.ingest.incremental.position.MySQLIngestPositionManager; +import org.apache.shardingsphere.data.pipeline.mysql.ingest.incremental.position.MySQLIncrementalPositionManager; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -58,7 +58,7 @@ void setUp() throws SQLException { @Test void assertGetCurrentPosition() throws SQLException { - MySQLIngestPositionManager positionInitializer = new MySQLIngestPositionManager(); + MySQLIncrementalPositionManager positionInitializer = new MySQLIncrementalPositionManager(); MySQLBinlogPosition actual = positionInitializer.init(dataSource, ""); assertThat(actual.getFilename(), is(LOG_FILE_NAME)); assertThat(actual.getPosition(), is(LOG_POSITION)); diff --git a/kernel/data-pipeline/dialect/opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/incremental/position/OpenGaussIngestPositionManager.java b/kernel/data-pipeline/dialect/opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/incremental/position/OpenGaussIncrementalPositionManager.java similarity index 93% rename from kernel/data-pipeline/dialect/opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/incremental/position/OpenGaussIngestPositionManager.java rename to kernel/data-pipeline/dialect/opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/incremental/position/OpenGaussIncrementalPositionManager.java index 4171482fbd259..776cca7a6b4c1 100644 --- a/kernel/data-pipeline/dialect/opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/incremental/position/OpenGaussIngestPositionManager.java +++ b/kernel/data-pipeline/dialect/opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/incremental/position/OpenGaussIncrementalPositionManager.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.data.pipeline.opengauss.ingest.incremental.position; -import org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager; +import org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager; import org.apache.shardingsphere.data.pipeline.opengauss.ingest.incremental.wal.decode.OpenGaussLogSequenceNumber; import org.apache.shardingsphere.data.pipeline.postgresql.ingest.incremental.position.slot.PostgreSQLSlotManager; import org.apache.shardingsphere.data.pipeline.postgresql.ingest.incremental.wal.WALPosition; @@ -30,9 +30,9 @@ import java.sql.SQLException; /** - * Ingest position manager for openGauss. + * Incremental position manager for openGauss. */ -public final class OpenGaussIngestPositionManager implements DialectIngestPositionManager { +public final class OpenGaussIncrementalPositionManager implements DialectIncrementalPositionManager { private final PostgreSQLSlotManager slotManager = new PostgreSQLSlotManager("mppdb_decoding"); diff --git a/kernel/data-pipeline/dialect/opengauss/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager b/kernel/data-pipeline/dialect/opengauss/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager similarity index 94% rename from kernel/data-pipeline/dialect/opengauss/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager rename to kernel/data-pipeline/dialect/opengauss/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager index e0cb928db5f84..71f7a065b7e95 100644 --- a/kernel/data-pipeline/dialect/opengauss/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager +++ b/kernel/data-pipeline/dialect/opengauss/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager @@ -15,4 +15,4 @@ # limitations under the License. # -org.apache.shardingsphere.data.pipeline.opengauss.ingest.incremental.position.OpenGaussIngestPositionManager +org.apache.shardingsphere.data.pipeline.opengauss.ingest.incremental.position.OpenGaussIncrementalPositionManager diff --git a/kernel/data-pipeline/dialect/postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/position/PostgreSQLIngestPositionManager.java b/kernel/data-pipeline/dialect/postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/position/PostgreSQLIncrementalPositionManager.java similarity index 95% rename from kernel/data-pipeline/dialect/postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/position/PostgreSQLIngestPositionManager.java rename to kernel/data-pipeline/dialect/postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/position/PostgreSQLIncrementalPositionManager.java index 47c3eb457a4af..478cb2dc30d2c 100644 --- a/kernel/data-pipeline/dialect/postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/position/PostgreSQLIngestPositionManager.java +++ b/kernel/data-pipeline/dialect/postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/position/PostgreSQLIncrementalPositionManager.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.data.pipeline.postgresql.ingest.incremental.position; import org.apache.shardingsphere.data.pipeline.core.exception.PipelineInternalException; -import org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager; +import org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager; import org.apache.shardingsphere.data.pipeline.postgresql.ingest.incremental.position.slot.PostgreSQLSlotManager; import org.apache.shardingsphere.data.pipeline.postgresql.ingest.incremental.wal.WALPosition; import org.apache.shardingsphere.data.pipeline.postgresql.ingest.incremental.wal.decode.PostgreSQLLogSequenceNumber; @@ -32,9 +32,9 @@ import java.sql.SQLException; /** - * Ingest position manager for PostgreSQL. + * Incremental position manager for PostgreSQL. */ -public final class PostgreSQLIngestPositionManager implements DialectIngestPositionManager { +public final class PostgreSQLIncrementalPositionManager implements DialectIncrementalPositionManager { private final PostgreSQLSlotManager slotManager = new PostgreSQLSlotManager("test_decoding"); diff --git a/kernel/data-pipeline/dialect/postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager b/kernel/data-pipeline/dialect/postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager similarity index 94% rename from kernel/data-pipeline/dialect/postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager rename to kernel/data-pipeline/dialect/postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager index 53ebbbce05be1..8c3d65e552b8a 100644 --- a/kernel/data-pipeline/dialect/postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager +++ b/kernel/data-pipeline/dialect/postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager @@ -15,4 +15,4 @@ # limitations under the License. # -org.apache.shardingsphere.data.pipeline.postgresql.ingest.incremental.position.PostgreSQLIngestPositionManager +org.apache.shardingsphere.data.pipeline.postgresql.ingest.incremental.position.PostgreSQLIncrementalPositionManager diff --git a/kernel/data-pipeline/dialect/postgresql/src/test/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/dumper/PostgreSQLIncrementalDumperTest.java b/kernel/data-pipeline/dialect/postgresql/src/test/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/dumper/PostgreSQLIncrementalDumperTest.java index 3a4664d96872c..17c6ad20c5e03 100644 --- a/kernel/data-pipeline/dialect/postgresql/src/test/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/dumper/PostgreSQLIncrementalDumperTest.java +++ b/kernel/data-pipeline/dialect/postgresql/src/test/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/dumper/PostgreSQLIncrementalDumperTest.java @@ -26,7 +26,7 @@ import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.mapper.ActualAndLogicTableNameMapper; import org.apache.shardingsphere.data.pipeline.core.ingest.dumper.mapper.TableAndSchemaNameMapper; import org.apache.shardingsphere.data.pipeline.core.metadata.loader.StandardPipelineTableMetaDataLoader; -import org.apache.shardingsphere.data.pipeline.postgresql.ingest.incremental.position.PostgreSQLIngestPositionManager; +import org.apache.shardingsphere.data.pipeline.postgresql.ingest.incremental.position.PostgreSQLIncrementalPositionManager; import org.apache.shardingsphere.data.pipeline.postgresql.ingest.incremental.position.slot.PostgreSQLSlotNameGenerator; import org.apache.shardingsphere.data.pipeline.postgresql.ingest.incremental.wal.PostgreSQLLogicalReplication; import org.apache.shardingsphere.data.pipeline.postgresql.ingest.incremental.wal.WALPosition; @@ -63,7 +63,7 @@ import static org.mockito.Mockito.when; @ExtendWith(AutoMockExtension.class) -@StaticMockSettings({PostgreSQLIngestPositionManager.class, PostgreSQLSlotNameGenerator.class}) +@StaticMockSettings({PostgreSQLIncrementalPositionManager.class, PostgreSQLSlotNameGenerator.class}) @MockitoSettings(strictness = Strictness.LENIENT) class PostgreSQLIncrementalDumperTest { diff --git a/kernel/data-pipeline/dialect/postgresql/src/test/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/position/PostgreSQLIngestPositionManagerTest.java b/kernel/data-pipeline/dialect/postgresql/src/test/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/position/PostgreSQLIngestPositionManagerTest.java index 522d485b16282..93db6a0201f5e 100644 --- a/kernel/data-pipeline/dialect/postgresql/src/test/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/position/PostgreSQLIngestPositionManagerTest.java +++ b/kernel/data-pipeline/dialect/postgresql/src/test/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/position/PostgreSQLIngestPositionManagerTest.java @@ -76,7 +76,7 @@ void assertGetCurrentPositionOnPostgreSQL96() throws SQLException { mockSlotExistsOrNot(false); when(databaseMetaData.getDatabaseMajorVersion()).thenReturn(9); when(databaseMetaData.getDatabaseMinorVersion()).thenReturn(6); - WALPosition actual = new PostgreSQLIngestPositionManager().init(dataSource, ""); + WALPosition actual = new PostgreSQLIncrementalPositionManager().init(dataSource, ""); assertThat(actual.getLogSequenceNumber().get(), is(LogSequenceNumber.valueOf(POSTGRESQL_96_LSN))); } @@ -84,7 +84,7 @@ void assertGetCurrentPositionOnPostgreSQL96() throws SQLException { void assertGetCurrentPositionOnPostgreSQL10() throws SQLException { mockSlotExistsOrNot(false); when(databaseMetaData.getDatabaseMajorVersion()).thenReturn(10); - WALPosition actual = new PostgreSQLIngestPositionManager().init(dataSource, ""); + WALPosition actual = new PostgreSQLIncrementalPositionManager().init(dataSource, ""); assertThat(actual.getLogSequenceNumber().get(), is(LogSequenceNumber.valueOf(POSTGRESQL_10_LSN))); } @@ -93,7 +93,7 @@ void assertGetCurrentPositionThrowException() throws SQLException { mockSlotExistsOrNot(false); when(databaseMetaData.getDatabaseMajorVersion()).thenReturn(9); when(databaseMetaData.getDatabaseMinorVersion()).thenReturn(4); - assertThrows(RuntimeException.class, () -> new PostgreSQLIngestPositionManager().init(dataSource, "")); + assertThrows(RuntimeException.class, () -> new PostgreSQLIncrementalPositionManager().init(dataSource, "")); } @SneakyThrows(SQLException.class) @@ -130,7 +130,7 @@ void assertDestroyWhenSlotExists() throws SQLException { mockSlotExistsOrNot(true); PreparedStatement preparedStatement = mock(PreparedStatement.class); when(connection.prepareStatement("SELECT pg_drop_replication_slot(?)")).thenReturn(preparedStatement); - new PostgreSQLIngestPositionManager().destroy(dataSource, ""); + new PostgreSQLIncrementalPositionManager().destroy(dataSource, ""); verify(preparedStatement).execute(); } } diff --git a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/h2/ingest/position/H2IngestPositionManager.java b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/h2/ingest/position/H2IncrementalPositionManager.java similarity index 89% rename from test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/h2/ingest/position/H2IngestPositionManager.java rename to test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/h2/ingest/position/H2IncrementalPositionManager.java index 2249664992f93..dd092703be09c 100644 --- a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/h2/ingest/position/H2IngestPositionManager.java +++ b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/h2/ingest/position/H2IncrementalPositionManager.java @@ -18,14 +18,14 @@ package org.apache.shardingsphere.test.it.data.pipeline.core.fixture.h2.ingest.position; import org.apache.shardingsphere.data.pipeline.core.ingest.position.type.placeholder.IngestPlaceholderPosition; -import org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager; +import org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager; import javax.sql.DataSource; /** - * Ingest position manager for H2. + * Incremental position manager for H2. */ -public final class H2IngestPositionManager implements DialectIngestPositionManager { +public final class H2IncrementalPositionManager implements DialectIncrementalPositionManager { @Override public IngestPlaceholderPosition init(final DataSource dataSource, final String slotNameSuffix) { diff --git a/test/it/pipeline/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager b/test/it/pipeline/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager similarity index 94% rename from test/it/pipeline/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager rename to test/it/pipeline/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager index c5bca24ceef8f..04756b30756cf 100644 --- a/test/it/pipeline/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIngestPositionManager +++ b/test/it/pipeline/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.ingest.position.DialectIncrementalPositionManager @@ -15,4 +15,4 @@ # limitations under the License. # -org.apache.shardingsphere.test.it.data.pipeline.core.fixture.h2.ingest.position.H2IngestPositionManager +org.apache.shardingsphere.test.it.data.pipeline.core.fixture.h2.ingest.position.H2IncrementalPositionManager