diff --git a/jdbc/core/src/main/java/org/apache/shardingsphere/driver/data/pipeline/datasource/creator/ShardingSpherePipelineDataSourceCreator.java b/jdbc/core/src/main/java/org/apache/shardingsphere/driver/data/pipeline/datasource/creator/ShardingSpherePipelineDataSourceCreator.java index f83ccc5b7a44f..adcaf72dcfbe3 100644 --- a/jdbc/core/src/main/java/org/apache/shardingsphere/driver/data/pipeline/datasource/creator/ShardingSpherePipelineDataSourceCreator.java +++ b/jdbc/core/src/main/java/org/apache/shardingsphere/driver/data/pipeline/datasource/creator/ShardingSpherePipelineDataSourceCreator.java @@ -49,7 +49,7 @@ public final class ShardingSpherePipelineDataSourceCreator implements PipelineDa private static final AtomicInteger STANDALONE_DATABASE_ID = new AtomicInteger(1); @Override - public DataSource createPipelineDataSource(final Object dataSourceConfig) throws SQLException { + public DataSource create(final Object dataSourceConfig) throws SQLException { YamlRootConfiguration rootConfig = YamlEngine.unmarshal(YamlEngine.marshal(dataSourceConfig), YamlRootConfiguration.class); removeAuthorityRule(rootConfig); updateSingleRuleConfiguration(rootConfig); diff --git a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/spi/PipelineDataSourceCreator.java b/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/spi/PipelineDataSourceCreator.java index 5ca69d5b220e9..56d2f528b9200 100644 --- a/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/spi/PipelineDataSourceCreator.java +++ b/kernel/data-pipeline/api/src/main/java/org/apache/shardingsphere/data/pipeline/spi/PipelineDataSourceCreator.java @@ -36,5 +36,5 @@ public interface PipelineDataSourceCreator extends TypedSPI { * @return pipeline data source * @throws SQLException if create data source failed */ - DataSource createPipelineDataSource(Object dataSourceConfig) throws SQLException; + DataSource create(Object dataSourceConfig) throws SQLException; } diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/PipelineDataSourceFactory.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/PipelineDataSourceFactory.java index 748fc6474979e..0e24d28c71f25 100644 --- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/PipelineDataSourceFactory.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/PipelineDataSourceFactory.java @@ -42,7 +42,7 @@ public final class PipelineDataSourceFactory { @SneakyThrows(SQLException.class) public static PipelineDataSourceWrapper newInstance(final PipelineDataSourceConfiguration pipelineDataSourceConfig) { DataSource dataSource = TypedSPILoader.getService( - PipelineDataSourceCreator.class, pipelineDataSourceConfig.getType()).createPipelineDataSource(pipelineDataSourceConfig.getDataSourceConfiguration()); + PipelineDataSourceCreator.class, pipelineDataSourceConfig.getType()).create(pipelineDataSourceConfig.getDataSourceConfiguration()); return new PipelineDataSourceWrapper(dataSource, pipelineDataSourceConfig.getDatabaseType()); } } diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/creator/StandardPipelineDataSourceCreator.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/creator/StandardPipelineDataSourceCreator.java index db786419a72ad..56ec0ff30f3dd 100644 --- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/creator/StandardPipelineDataSourceCreator.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/datasource/creator/StandardPipelineDataSourceCreator.java @@ -30,7 +30,7 @@ public final class StandardPipelineDataSourceCreator implements PipelineDataSourceCreator { @Override - public DataSource createPipelineDataSource(final Object dataSourceConfig) { + public DataSource create(final Object dataSourceConfig) { return DataSourcePoolCreator.create((DataSourcePoolProperties) dataSourceConfig); } diff --git a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/datasource/creator/FixturePipelineDataSourceCreator.java b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/datasource/creator/FixturePipelineDataSourceCreator.java index 93c2c2fa3ef44..eb7201599f986 100644 --- a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/datasource/creator/FixturePipelineDataSourceCreator.java +++ b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/datasource/creator/FixturePipelineDataSourceCreator.java @@ -24,7 +24,7 @@ public final class FixturePipelineDataSourceCreator implements PipelineDataSourceCreator { @Override - public DataSource createPipelineDataSource(final Object dataSourceConfig) { + public DataSource create(final Object dataSourceConfig) { return null; } 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 d9fa308b494da..7017e4e41e38a 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 @@ -211,10 +211,10 @@ private void initTableData(final MigrationJobConfiguration jobConfig) { PipelineDataSourceConfiguration source = jobConfig.getSources().values().iterator().next(); PipelineDataSourceConfiguration sourceDataSourceConfig = PipelineDataSourceConfigurationFactory.newInstance(source.getType(), source.getParameter()); initTableData(TypedSPILoader.getService( - PipelineDataSourceCreator.class, sourceDataSourceConfig.getType()).createPipelineDataSource(sourceDataSourceConfig.getDataSourceConfiguration())); + PipelineDataSourceCreator.class, sourceDataSourceConfig.getType()).create(sourceDataSourceConfig.getDataSourceConfiguration())); PipelineDataSourceConfiguration targetDataSourceConfig = PipelineDataSourceConfigurationFactory.newInstance(jobConfig.getTarget().getType(), jobConfig.getTarget().getParameter()); initTableData(TypedSPILoader.getService( - PipelineDataSourceCreator.class, targetDataSourceConfig.getType()).createPipelineDataSource(targetDataSourceConfig.getDataSourceConfiguration())); + PipelineDataSourceCreator.class, targetDataSourceConfig.getType()).create(targetDataSourceConfig.getDataSourceConfiguration())); } private void initTableData(final DataSource pipelineDataSource) throws SQLException {