diff --git a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/ral/update/DatabaseAwareRALUpdater.java b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/ral/update/DatabaseAwareUpdatableRALExecutor.java similarity index 88% rename from infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/ral/update/DatabaseAwareRALUpdater.java rename to infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/ral/update/DatabaseAwareUpdatableRALExecutor.java index b15aca45e8b07..39e73285b9977 100644 --- a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/ral/update/DatabaseAwareRALUpdater.java +++ b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/ral/update/DatabaseAwareUpdatableRALExecutor.java @@ -21,11 +21,11 @@ import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; /** - * Database aware RAL updater. + * Database aware updatable RAL executor. * * @param type of SQL statement */ -public interface DatabaseAwareRALUpdater extends RALUpdater { +public interface DatabaseAwareUpdatableRALExecutor extends UpdatableRALExecutor { /** * Set database. diff --git a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/ral/update/RALUpdater.java b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/ral/update/UpdatableRALExecutor.java similarity index 92% rename from infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/ral/update/RALUpdater.java rename to infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/ral/update/UpdatableRALExecutor.java index 89d83a15f7911..e6f1967cf452f 100644 --- a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/ral/update/RALUpdater.java +++ b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/ral/update/UpdatableRALExecutor.java @@ -24,12 +24,12 @@ import java.sql.SQLException; /** - * RAL updater. + * Updatable RAL executor. * * @param type of updatable RAL statement */ @SingletonSPI -public interface RALUpdater extends TypedSPI { +public interface UpdatableRALExecutor extends TypedSPI { /** * Execute update. diff --git a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/distsql/handler/update/DropStreamingUpdater.java b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/distsql/handler/update/DropStreamingExecutor.java similarity index 91% rename from kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/distsql/handler/update/DropStreamingUpdater.java rename to kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/distsql/handler/update/DropStreamingExecutor.java index cd9b0b75fe269..a7219a0bc4be7 100644 --- a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/distsql/handler/update/DropStreamingUpdater.java +++ b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/distsql/handler/update/DropStreamingExecutor.java @@ -20,15 +20,15 @@ import org.apache.shardingsphere.data.pipeline.cdc.distsql.statement.DropStreamingStatement; import org.apache.shardingsphere.data.pipeline.cdc.api.CDCJobAPI; import org.apache.shardingsphere.data.pipeline.core.job.api.TransmissionJobAPI; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; import java.sql.SQLException; /** - * Drop streaming updater. + * Drop streaming executor. */ -public final class DropStreamingUpdater implements RALUpdater { +public final class DropStreamingExecutor implements UpdatableRALExecutor { private final CDCJobAPI jobAPI = (CDCJobAPI) TypedSPILoader.getService(TransmissionJobAPI.class, "STREAMING"); diff --git a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/CheckMigrationJobUpdater.java b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/CheckMigrationJobExecutor.java similarity index 95% rename from kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/CheckMigrationJobUpdater.java rename to kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/CheckMigrationJobExecutor.java index 97f3af0314b6b..9c47c604fe511 100644 --- a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/CheckMigrationJobUpdater.java +++ b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/CheckMigrationJobExecutor.java @@ -27,7 +27,7 @@ import org.apache.shardingsphere.data.pipeline.scenario.consistencycheck.api.CreateConsistencyCheckJobParameter; import org.apache.shardingsphere.data.pipeline.scenario.migration.MigrationJobType; import org.apache.shardingsphere.data.pipeline.scenario.migration.config.MigrationJobConfiguration; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.distsql.segment.AlgorithmSegment; import org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions; import org.apache.shardingsphere.data.pipeline.migration.distsql.statement.CheckMigrationStatement; @@ -36,9 +36,9 @@ import java.util.Properties; /** - * Check migration job updater. + * Check migration job executor. */ -public final class CheckMigrationJobUpdater implements RALUpdater { +public final class CheckMigrationJobExecutor implements UpdatableRALExecutor { private final ConsistencyCheckJobAPI checkJobAPI = new ConsistencyCheckJobAPI(new ConsistencyCheckJobType()); diff --git a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/CommitMigrationUpdater.java b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/CommitMigrationExecutor.java similarity index 91% rename from kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/CommitMigrationUpdater.java rename to kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/CommitMigrationExecutor.java index 3347164ba446f..92ec86d4c2165 100644 --- a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/CommitMigrationUpdater.java +++ b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/CommitMigrationExecutor.java @@ -18,16 +18,16 @@ package org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update; import org.apache.shardingsphere.data.pipeline.core.job.api.TransmissionJobAPI; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; import org.apache.shardingsphere.data.pipeline.migration.distsql.statement.CommitMigrationStatement; import java.sql.SQLException; /** - * Commit migration updater. + * Commit migration executor. */ -public final class CommitMigrationUpdater implements RALUpdater { +public final class CommitMigrationExecutor implements UpdatableRALExecutor { @Override public void executeUpdate(final CommitMigrationStatement sqlStatement) throws SQLException { diff --git a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/DropMigrationCheckUpdater.java b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/DropMigrationCheckExecutor.java similarity index 90% rename from kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/DropMigrationCheckUpdater.java rename to kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/DropMigrationCheckExecutor.java index 29628a4af64ec..80829274fa8cd 100644 --- a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/DropMigrationCheckUpdater.java +++ b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/DropMigrationCheckExecutor.java @@ -19,13 +19,13 @@ import org.apache.shardingsphere.data.pipeline.scenario.consistencycheck.ConsistencyCheckJobType; import org.apache.shardingsphere.data.pipeline.scenario.consistencycheck.api.ConsistencyCheckJobAPI; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.data.pipeline.migration.distsql.statement.DropMigrationCheckStatement; /** - * Drop migration check updater. + * Drop migration check executor. */ -public final class DropMigrationCheckUpdater implements RALUpdater { +public final class DropMigrationCheckExecutor implements UpdatableRALExecutor { private final ConsistencyCheckJobAPI jobAPI = new ConsistencyCheckJobAPI(new ConsistencyCheckJobType()); diff --git a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/MigrateTableUpdater.java b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/MigrateTableExecutor.java similarity index 93% rename from kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/MigrateTableUpdater.java rename to kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/MigrateTableExecutor.java index 447ca9a8f433f..05fc5040baaf9 100644 --- a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/MigrateTableUpdater.java +++ b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/MigrateTableExecutor.java @@ -23,17 +23,17 @@ import org.apache.shardingsphere.data.pipeline.core.job.api.TransmissionJobAPI; import org.apache.shardingsphere.data.pipeline.migration.distsql.statement.MigrateTableStatement; import org.apache.shardingsphere.data.pipeline.scenario.migration.api.MigrationJobAPI; -import org.apache.shardingsphere.distsql.handler.type.ral.update.DatabaseAwareRALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.DatabaseAwareUpdatableRALExecutor; import org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions; import org.apache.shardingsphere.infra.instance.metadata.InstanceType; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; /** - * Migrate table updater. + * Migrate table executor. */ @Setter -public final class MigrateTableUpdater implements DatabaseAwareRALUpdater { +public final class MigrateTableExecutor implements DatabaseAwareUpdatableRALExecutor { private ShardingSphereDatabase database; diff --git a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/RegisterMigrationSourceStorageUnitUpdater.java b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/RegisterMigrationSourceStorageUnitExecutor.java similarity index 94% rename from kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/RegisterMigrationSourceStorageUnitUpdater.java rename to kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/RegisterMigrationSourceStorageUnitExecutor.java index ef5d1c871793a..4f3d4a6a4db40 100644 --- a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/RegisterMigrationSourceStorageUnitUpdater.java +++ b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/RegisterMigrationSourceStorageUnitExecutor.java @@ -20,7 +20,7 @@ import org.apache.shardingsphere.data.pipeline.core.context.PipelineContextKey; import org.apache.shardingsphere.data.pipeline.core.job.api.TransmissionJobAPI; import org.apache.shardingsphere.data.pipeline.scenario.migration.api.MigrationJobAPI; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.distsql.handler.validate.DataSourcePoolPropertiesValidateHandler; import org.apache.shardingsphere.distsql.segment.DataSourceSegment; import org.apache.shardingsphere.distsql.segment.HostnameAndPortBasedDataSourceSegment; @@ -40,9 +40,9 @@ import java.util.Map; /** - * Register migration source storage unit updater. + * Register migration source storage unit executor. */ -public final class RegisterMigrationSourceStorageUnitUpdater implements RALUpdater { +public final class RegisterMigrationSourceStorageUnitExecutor implements UpdatableRALExecutor { private final MigrationJobAPI jobAPI = (MigrationJobAPI) TypedSPILoader.getService(TransmissionJobAPI.class, "MIGRATION"); diff --git a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/RollbackMigrationUpdater.java b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/RollbackMigrationExecutor.java similarity index 90% rename from kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/RollbackMigrationUpdater.java rename to kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/RollbackMigrationExecutor.java index 8ecb941d65e8d..cbc8c62663b78 100644 --- a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/RollbackMigrationUpdater.java +++ b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/RollbackMigrationExecutor.java @@ -18,16 +18,16 @@ package org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update; import org.apache.shardingsphere.data.pipeline.core.job.api.TransmissionJobAPI; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; import org.apache.shardingsphere.data.pipeline.migration.distsql.statement.RollbackMigrationStatement; import java.sql.SQLException; /** - * Rollback migration updater. + * Rollback migration executor. */ -public final class RollbackMigrationUpdater implements RALUpdater { +public final class RollbackMigrationExecutor implements UpdatableRALExecutor { @Override public void executeUpdate(final RollbackMigrationStatement sqlStatement) throws SQLException { diff --git a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StartMigrationCheckUpdater.java b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StartMigrationCheckExecutor.java similarity index 90% rename from kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StartMigrationCheckUpdater.java rename to kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StartMigrationCheckExecutor.java index 413bade43242b..222c69725c4f5 100644 --- a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StartMigrationCheckUpdater.java +++ b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StartMigrationCheckExecutor.java @@ -19,13 +19,13 @@ import org.apache.shardingsphere.data.pipeline.scenario.consistencycheck.ConsistencyCheckJobType; import org.apache.shardingsphere.data.pipeline.scenario.consistencycheck.api.ConsistencyCheckJobAPI; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.data.pipeline.migration.distsql.statement.StartMigrationCheckStatement; /** - * Start migration check updater. + * Start migration check executor. */ -public final class StartMigrationCheckUpdater implements RALUpdater { +public final class StartMigrationCheckExecutor implements UpdatableRALExecutor { private final ConsistencyCheckJobAPI jobAPI = new ConsistencyCheckJobAPI(new ConsistencyCheckJobType()); diff --git a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StartMigrationUpdater.java b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StartMigrationExecutor.java similarity index 91% rename from kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StartMigrationUpdater.java rename to kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StartMigrationExecutor.java index 71d64efc9728f..b14dcbfc40d45 100644 --- a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StartMigrationUpdater.java +++ b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StartMigrationExecutor.java @@ -19,13 +19,13 @@ import org.apache.shardingsphere.data.pipeline.core.job.service.PipelineJobManager; import org.apache.shardingsphere.data.pipeline.scenario.migration.MigrationJobType; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.data.pipeline.migration.distsql.statement.StartMigrationStatement; /** - * Start migration updater. + * Start migration executor. */ -public final class StartMigrationUpdater implements RALUpdater { +public final class StartMigrationExecutor implements UpdatableRALExecutor { private final PipelineJobManager jobManager = new PipelineJobManager(new MigrationJobType()); diff --git a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StopMigrationCheckUpdater.java b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StopMigrationCheckExecutor.java similarity index 90% rename from kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StopMigrationCheckUpdater.java rename to kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StopMigrationCheckExecutor.java index ca0b5b57cf3e2..a6da15c0d54b8 100644 --- a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StopMigrationCheckUpdater.java +++ b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StopMigrationCheckExecutor.java @@ -19,13 +19,13 @@ import org.apache.shardingsphere.data.pipeline.scenario.consistencycheck.ConsistencyCheckJobType; import org.apache.shardingsphere.data.pipeline.scenario.consistencycheck.api.ConsistencyCheckJobAPI; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.data.pipeline.migration.distsql.statement.StopMigrationCheckStatement; /** - * Stop migration check updater. + * Stop migration check executor. */ -public final class StopMigrationCheckUpdater implements RALUpdater { +public final class StopMigrationCheckExecutor implements UpdatableRALExecutor { private final ConsistencyCheckJobAPI jobAPI = new ConsistencyCheckJobAPI(new ConsistencyCheckJobType()); diff --git a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StopMigrationUpdater.java b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StopMigrationExecutor.java similarity index 91% rename from kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StopMigrationUpdater.java rename to kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StopMigrationExecutor.java index 358a47376e88d..a012ba7c778ea 100644 --- a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StopMigrationUpdater.java +++ b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/StopMigrationExecutor.java @@ -19,13 +19,13 @@ import org.apache.shardingsphere.data.pipeline.core.job.service.PipelineJobManager; import org.apache.shardingsphere.data.pipeline.scenario.migration.MigrationJobType; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.data.pipeline.migration.distsql.statement.StopMigrationStatement; /** - * Stop migration updater. + * Stop migration executor. */ -public final class StopMigrationUpdater implements RALUpdater { +public final class StopMigrationExecutor implements UpdatableRALExecutor { private final PipelineJobManager jobManager = new PipelineJobManager(new MigrationJobType()); diff --git a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/UnregisterMigrationSourceStorageUnitUpdater.java b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/UnregisterMigrationSourceStorageUnitExecutor.java similarity index 90% rename from kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/UnregisterMigrationSourceStorageUnitUpdater.java rename to kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/UnregisterMigrationSourceStorageUnitExecutor.java index 348e9c08497dc..01555b5d4a884 100644 --- a/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/UnregisterMigrationSourceStorageUnitUpdater.java +++ b/kernel/data-pipeline/distsql/handler/src/main/java/org/apache/shardingsphere/data/pipeline/migration/distsql/handler/update/UnregisterMigrationSourceStorageUnitExecutor.java @@ -20,15 +20,15 @@ import org.apache.shardingsphere.data.pipeline.core.context.PipelineContextKey; import org.apache.shardingsphere.data.pipeline.core.job.api.TransmissionJobAPI; import org.apache.shardingsphere.data.pipeline.scenario.migration.api.MigrationJobAPI; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.infra.instance.metadata.InstanceType; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; import org.apache.shardingsphere.data.pipeline.migration.distsql.statement.UnregisterMigrationSourceStorageUnitStatement; /** - * Unregister migration source storage unit updater. + * Unregister migration source storage unit executor. */ -public final class UnregisterMigrationSourceStorageUnitUpdater implements RALUpdater { +public final class UnregisterMigrationSourceStorageUnitExecutor implements UpdatableRALExecutor { private final MigrationJobAPI jobAPI = (MigrationJobAPI) TypedSPILoader.getService(TransmissionJobAPI.class, "MIGRATION"); diff --git a/kernel/data-pipeline/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater b/kernel/data-pipeline/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor similarity index 78% rename from kernel/data-pipeline/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater rename to kernel/data-pipeline/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor index b4fef419594c5..ac63ca73456a3 100644 --- a/kernel/data-pipeline/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater +++ b/kernel/data-pipeline/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor @@ -15,15 +15,15 @@ # limitations under the License. # -org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.MigrateTableUpdater -org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.StartMigrationUpdater -org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.StopMigrationUpdater -org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.CommitMigrationUpdater -org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.RollbackMigrationUpdater -org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.RegisterMigrationSourceStorageUnitUpdater -org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.UnregisterMigrationSourceStorageUnitUpdater -org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.CheckMigrationJobUpdater -org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.StartMigrationCheckUpdater -org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.StopMigrationCheckUpdater -org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.DropMigrationCheckUpdater -org.apache.shardingsphere.data.pipeline.cdc.distsql.handler.update.DropStreamingUpdater +org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.MigrateTableExecutor +org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.StartMigrationExecutor +org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.StopMigrationExecutor +org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.CommitMigrationExecutor +org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.RollbackMigrationExecutor +org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.RegisterMigrationSourceStorageUnitExecutor +org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.UnregisterMigrationSourceStorageUnitExecutor +org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.CheckMigrationJobExecutor +org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.StartMigrationCheckExecutor +org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.StopMigrationCheckExecutor +org.apache.shardingsphere.data.pipeline.migration.distsql.handler.update.DropMigrationCheckExecutor +org.apache.shardingsphere.data.pipeline.cdc.distsql.handler.update.DropStreamingExecutor diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/UpdatableRALBackendHandler.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/UpdatableRALBackendHandler.java index f656583e17648..aae7434e2b25d 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/UpdatableRALBackendHandler.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/UpdatableRALBackendHandler.java @@ -18,8 +18,8 @@ package org.apache.shardingsphere.proxy.backend.handler.distsql.ral; import lombok.RequiredArgsConstructor; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; -import org.apache.shardingsphere.distsql.handler.type.ral.update.DatabaseAwareRALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; +import org.apache.shardingsphere.distsql.handler.type.ral.update.DatabaseAwareUpdatableRALExecutor; import org.apache.shardingsphere.distsql.statement.ral.UpdatableRALStatement; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; @@ -45,9 +45,9 @@ public final class UpdatableRALBackendHandler i @SuppressWarnings("unchecked") @Override public ResponseHeader execute() throws SQLException { - RALUpdater updater = TypedSPILoader.getService(RALUpdater.class, sqlStatement.getClass()); - if (updater instanceof DatabaseAwareRALUpdater) { - ((DatabaseAwareRALUpdater) updater).setDatabase(ProxyContext.getInstance().getDatabase(DatabaseNameUtils.getDatabaseName(sqlStatement, connectionSession))); + UpdatableRALExecutor updater = TypedSPILoader.getService(UpdatableRALExecutor.class, sqlStatement.getClass()); + if (updater instanceof DatabaseAwareUpdatableRALExecutor) { + ((DatabaseAwareUpdatableRALExecutor) updater).setDatabase(ProxyContext.getInstance().getDatabase(DatabaseNameUtils.getDatabaseName(sqlStatement, connectionSession))); } updater.executeUpdate((T) sqlStatement); return new UpdateResponseHeader(sqlStatement); diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterReadwriteSplittingStorageUnitStatusStatementUpdater.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterReadwriteSplittingStorageUnitStatusStatementExecutor.java similarity index 98% rename from proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterReadwriteSplittingStorageUnitStatusStatementUpdater.java rename to proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterReadwriteSplittingStorageUnitStatusStatementExecutor.java index c3d348e942595..954ee5b418983 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterReadwriteSplittingStorageUnitStatusStatementUpdater.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterReadwriteSplittingStorageUnitStatusStatementExecutor.java @@ -21,7 +21,7 @@ import com.google.common.base.Strings; import lombok.Setter; import org.apache.shardingsphere.distsql.handler.exception.storageunit.MissingRequiredStorageUnitsException; -import org.apache.shardingsphere.distsql.handler.type.ral.update.DatabaseAwareRALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.DatabaseAwareUpdatableRALExecutor; import org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions; import org.apache.shardingsphere.infra.exception.core.external.sql.type.generic.UnsupportedSQLOperationException; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; @@ -51,10 +51,10 @@ import java.util.stream.Collectors; /** - * Set readwrite-splitting storage unit status updater. + * Set readwrite-splitting storage unit status executor. */ @Setter -public final class AlterReadwriteSplittingStorageUnitStatusStatementUpdater implements DatabaseAwareRALUpdater { +public final class AlterReadwriteSplittingStorageUnitStatusStatementExecutor implements DatabaseAwareUpdatableRALExecutor { private static final String DISABLE = "DISABLE"; diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterTransmissionRuleUpdater.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterTransmissionRuleExecutor.java similarity index 93% rename from proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterTransmissionRuleUpdater.java rename to proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterTransmissionRuleExecutor.java index aa37894846178..183442d933d80 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterTransmissionRuleUpdater.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterTransmissionRuleExecutor.java @@ -21,16 +21,16 @@ import org.apache.shardingsphere.data.pipeline.core.context.PipelineContextKey; import org.apache.shardingsphere.data.pipeline.core.job.type.PipelineJobType; import org.apache.shardingsphere.data.pipeline.core.metadata.PipelineProcessConfigurationPersistService; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.distsql.statement.ral.updatable.AlterTransmissionRuleStatement; import org.apache.shardingsphere.infra.instance.metadata.InstanceType; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; import org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.converter.TransmissionProcessConfigurationSegmentConverter; /** - * Alter transmission rule updater. + * Alter transmission rule executor. */ -public final class AlterTransmissionRuleUpdater implements RALUpdater { +public final class AlterTransmissionRuleExecutor implements UpdatableRALExecutor { private final PipelineProcessConfigurationPersistService processConfigPersistService = new PipelineProcessConfigurationPersistService(); diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportDatabaseConfigurationUpdater.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportDatabaseConfigurationExecutor.java similarity index 92% rename from proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportDatabaseConfigurationUpdater.java rename to proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportDatabaseConfigurationExecutor.java index f8ef29153b8c3..71d046aee7474 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportDatabaseConfigurationUpdater.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportDatabaseConfigurationExecutor.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.distsql.statement.ral.updatable.ImportDatabaseConfigurationStatement; import org.apache.shardingsphere.infra.util.yaml.YamlEngine; import org.apache.shardingsphere.proxy.backend.config.yaml.YamlProxyDatabaseConfiguration; @@ -29,9 +29,9 @@ import java.sql.SQLException; /** - * Import database configuration updater. + * Import database configuration executor. */ -public final class ImportDatabaseConfigurationUpdater implements RALUpdater { +public final class ImportDatabaseConfigurationExecutor implements UpdatableRALExecutor { private final YamlDatabaseConfigurationImportExecutor databaseConfigImportExecutor = new YamlDatabaseConfigurationImportExecutor(); diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportMetaDataUpdater.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportMetaDataExecutor.java similarity index 96% rename from proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportMetaDataUpdater.java rename to proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportMetaDataExecutor.java index 02af5bcc5228e..fecc6d004baad 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportMetaDataUpdater.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportMetaDataExecutor.java @@ -19,7 +19,7 @@ import org.apache.commons.codec.binary.Base64; import org.apache.commons.io.FileUtils; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.distsql.statement.ral.updatable.ImportMetaDataStatement; import org.apache.shardingsphere.infra.config.rule.RuleConfiguration; import org.apache.shardingsphere.infra.util.json.JsonUtils; @@ -40,9 +40,9 @@ import java.util.Collection; /** - * Import meta data updater. + * Import meta data executor. */ -public final class ImportMetaDataUpdater implements RALUpdater { +public final class ImportMetaDataExecutor implements UpdatableRALExecutor { private final YamlRuleConfigurationSwapperEngine ruleConfigSwapperEngine = new YamlRuleConfigurationSwapperEngine(); diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LabelComputeNodeUpdater.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LabelComputeNodeExecutor.java similarity index 95% rename from proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LabelComputeNodeUpdater.java rename to proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LabelComputeNodeExecutor.java index 8f04a1fe4c1c7..7633eabedb411 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LabelComputeNodeUpdater.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LabelComputeNodeExecutor.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.distsql.statement.ral.updatable.LabelComputeNodeStatement; import org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions; import org.apache.shardingsphere.infra.exception.core.external.sql.type.generic.UnsupportedSQLOperationException; @@ -35,9 +35,9 @@ import java.util.Optional; /** - * Label compute node updater. + * Label compute node executor. */ -public final class LabelComputeNodeUpdater implements RALUpdater { +public final class LabelComputeNodeExecutor implements UpdatableRALExecutor { @Override public void executeUpdate(final LabelComputeNodeStatement sqlStatement) throws SQLException { diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterUpdater.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterExecutor.java similarity index 96% rename from proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterUpdater.java rename to proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterExecutor.java index a2ca46e8f8857..5bc9d63c561b8 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterUpdater.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterExecutor.java @@ -20,7 +20,7 @@ import lombok.RequiredArgsConstructor; import lombok.Setter; import org.apache.shardingsphere.distsql.handler.exception.algorithm.MissingRequiredAlgorithmException; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.distsql.statement.ral.updatable.LockClusterStatement; import org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions; import org.apache.shardingsphere.infra.exception.core.external.sql.type.generic.UnsupportedSQLOperationException; @@ -33,11 +33,11 @@ import org.apache.shardingsphere.proxy.backend.lock.spi.ClusterLockStrategy; /** - * Lock cluster updater. + * Lock cluster executor. */ @RequiredArgsConstructor @Setter -public final class LockClusterUpdater implements RALUpdater { +public final class LockClusterExecutor implements UpdatableRALExecutor { @Override @SuppressWarnings({"unchecked", "rawtypes"}) diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshDatabaseMetaDataUpdater.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshDatabaseMetaDataExecutor.java similarity index 92% rename from proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshDatabaseMetaDataUpdater.java rename to proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshDatabaseMetaDataExecutor.java index 2124856b80611..851d334a97a38 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshDatabaseMetaDataUpdater.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshDatabaseMetaDataExecutor.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.distsql.statement.ral.updatable.RefreshDatabaseMetaDataStatement; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.infra.metadata.database.schema.util.SystemSchemaUtils; @@ -29,9 +29,9 @@ import java.util.Optional; /** - * Refresh database meta data updater. + * Refresh database meta data executor. */ -public final class RefreshDatabaseMetaDataUpdater implements RALUpdater { +public final class RefreshDatabaseMetaDataExecutor implements UpdatableRALExecutor { @Override public void executeUpdate(final RefreshDatabaseMetaDataStatement sqlStatement) throws SQLException { diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshTableMetaDataUpdater.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshTableMetaDataExecutor.java similarity index 95% rename from proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshTableMetaDataUpdater.java rename to proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshTableMetaDataExecutor.java index 52c2dad455ecd..83eaab3923506 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshTableMetaDataUpdater.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/RefreshTableMetaDataExecutor.java @@ -20,7 +20,7 @@ import lombok.Setter; import org.apache.shardingsphere.distsql.handler.exception.storageunit.EmptyStorageUnitException; import org.apache.shardingsphere.distsql.handler.exception.storageunit.MissingRequiredStorageUnitsException; -import org.apache.shardingsphere.distsql.handler.type.ral.update.DatabaseAwareRALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.DatabaseAwareUpdatableRALExecutor; import org.apache.shardingsphere.distsql.statement.ral.updatable.RefreshTableMetaDataStatement; import org.apache.shardingsphere.infra.database.core.type.DatabaseTypeRegistry; import org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions; @@ -34,10 +34,10 @@ import java.util.Map; /** - * Refresh table meta data handler. + * Refresh table meta data executor. */ @Setter -public final class RefreshTableMetaDataUpdater implements DatabaseAwareRALUpdater { +public final class RefreshTableMetaDataExecutor implements DatabaseAwareUpdatableRALExecutor { private ShardingSphereDatabase database; diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableUpdater.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableExecutor.java similarity index 97% rename from proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableUpdater.java rename to proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableExecutor.java index 5547a1e38655e..145ba5c0f3750 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableUpdater.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableExecutor.java @@ -20,7 +20,7 @@ import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Logger; import ch.qos.logback.classic.LoggerContext; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.distsql.statement.ral.updatable.SetDistVariableStatement; import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey; import org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationPropertyKey; @@ -41,9 +41,9 @@ import java.util.Properties; /** - * Set dist variable statement updater. + * Set dist variable statement executor. */ -public final class SetDistVariableUpdater implements RALUpdater { +public final class SetDistVariableExecutor implements UpdatableRALExecutor { @Override public void executeUpdate(final SetDistVariableStatement sqlStatement) throws SQLException { diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetInstanceStatusUpdater.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetInstanceStatusExecutor.java similarity index 95% rename from proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetInstanceStatusUpdater.java rename to proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetInstanceStatusExecutor.java index f86abd4b0124f..260fc1030e025 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetInstanceStatusUpdater.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetInstanceStatusExecutor.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.distsql.statement.ral.updatable.SetInstanceStatusStatement; import org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions; import org.apache.shardingsphere.infra.exception.core.external.sql.type.generic.UnsupportedSQLOperationException; @@ -27,9 +27,9 @@ import org.apache.shardingsphere.proxy.backend.context.ProxyContext; /** - * Set instance status updater. + * Set instance status executor. */ -public final class SetInstanceStatusUpdater implements RALUpdater { +public final class SetInstanceStatusExecutor implements UpdatableRALExecutor { @Override public void executeUpdate(final SetInstanceStatusStatement sqlStatement) { diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlabelComputeNodeUpdater.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlabelComputeNodeExecutor.java similarity index 95% rename from proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlabelComputeNodeUpdater.java rename to proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlabelComputeNodeExecutor.java index 807b7bb2f99c0..e24fe8e9ada7a 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlabelComputeNodeUpdater.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlabelComputeNodeExecutor.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.distsql.statement.ral.updatable.UnlabelComputeNodeStatement; import org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions; import org.apache.shardingsphere.infra.exception.core.external.sql.type.generic.UnsupportedSQLOperationException; @@ -35,9 +35,9 @@ import java.util.Optional; /** - * Unlabel compute node updater. + * Unlabel compute node executor. */ -public final class UnlabelComputeNodeUpdater implements RALUpdater { +public final class UnlabelComputeNodeExecutor implements UpdatableRALExecutor { @Override public void executeUpdate(final UnlabelComputeNodeStatement sqlStatement) { diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlockClusterUpdater.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlockClusterExecutor.java similarity index 95% rename from proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlockClusterUpdater.java rename to proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlockClusterExecutor.java index 7772108755cec..ddf02e6734a85 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlockClusterUpdater.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlockClusterExecutor.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable; -import org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater; +import org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor; import org.apache.shardingsphere.distsql.statement.ral.updatable.UnlockClusterStatement; import org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions; import org.apache.shardingsphere.infra.exception.core.external.sql.type.generic.UnsupportedSQLOperationException; @@ -30,9 +30,9 @@ import org.apache.shardingsphere.proxy.backend.context.ProxyContext; /** - * Unlock cluster updater. + * Unlock cluster executor. */ -public final class UnlockClusterUpdater implements RALUpdater { +public final class UnlockClusterExecutor implements UpdatableRALExecutor { @Override @SuppressWarnings({"unchecked", "rawtypes"}) diff --git a/proxy/backend/core/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater b/proxy/backend/core/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor similarity index 78% rename from proxy/backend/core/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater rename to proxy/backend/core/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor index 08d818b269f44..1007dffc32353 100644 --- a/proxy/backend/core/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.ral.update.RALUpdater +++ b/proxy/backend/core/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.ral.update.UpdatableRALExecutor @@ -15,15 +15,15 @@ # limitations under the License. # -org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.AlterTransmissionRuleUpdater -org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.LabelComputeNodeUpdater -org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.UnlabelComputeNodeUpdater -org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.SetInstanceStatusUpdater -org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.ImportDatabaseConfigurationUpdater -org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.ImportMetaDataUpdater -org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.AlterReadwriteSplittingStorageUnitStatusStatementUpdater -org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.SetDistVariableUpdater -org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.RefreshDatabaseMetaDataUpdater -org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.LockClusterUpdater -org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.UnlockClusterUpdater -org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.RefreshTableMetaDataUpdater +org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.AlterTransmissionRuleExecutor +org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.LabelComputeNodeExecutor +org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.UnlabelComputeNodeExecutor +org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.SetInstanceStatusExecutor +org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.ImportDatabaseConfigurationExecutor +org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.ImportMetaDataExecutor +org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.AlterReadwriteSplittingStorageUnitStatusStatementExecutor +org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.SetDistVariableExecutor +org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.RefreshDatabaseMetaDataExecutor +org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.LockClusterExecutor +org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.UnlockClusterExecutor +org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable.RefreshTableMetaDataExecutor diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterReadwriteSplittingStorageUnitStatusStatementUpdaterTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterReadwriteSplittingStorageUnitStatusStatementUpdaterTest.java index 349fec8819776..a5e34fba49526 100644 --- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterReadwriteSplittingStorageUnitStatusStatementUpdaterTest.java +++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterReadwriteSplittingStorageUnitStatusStatementUpdaterTest.java @@ -40,7 +40,7 @@ class AlterReadwriteSplittingStorageUnitStatusStatementUpdaterTest { @Test void assertWithStandaloneMode() { - AlterReadwriteSplittingStorageUnitStatusStatementUpdater updater = new AlterReadwriteSplittingStorageUnitStatusStatementUpdater(); + AlterReadwriteSplittingStorageUnitStatusStatementExecutor updater = new AlterReadwriteSplittingStorageUnitStatusStatementExecutor(); when(ProxyContext.getInstance().getContextManager()).thenReturn(mock(ContextManager.class, RETURNS_DEEP_STUBS)); assertThrows(UnsupportedSQLOperationException.class, () -> updater.executeUpdate(new AlterReadwriteSplittingStorageUnitStatusStatement(new DatabaseSegment(1, 1, new IdentifierValue("foo_db")), "group", "read_ds", "ENABLE"))); @@ -52,7 +52,7 @@ void assertWithNoReadwriteSplittingRule() { when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); ShardingSphereDatabase database = mock(ShardingSphereDatabase.class, RETURNS_DEEP_STUBS); when(ProxyContext.getInstance().getDatabase("foo_db")).thenReturn(database); - AlterReadwriteSplittingStorageUnitStatusStatementUpdater updater = new AlterReadwriteSplittingStorageUnitStatusStatementUpdater(); + AlterReadwriteSplittingStorageUnitStatusStatementExecutor updater = new AlterReadwriteSplittingStorageUnitStatusStatementExecutor(); updater.setDatabase(database); assertThrows(UnsupportedSQLOperationException.class, () -> updater.executeUpdate(new AlterReadwriteSplittingStorageUnitStatusStatement(new DatabaseSegment(1, 1, new IdentifierValue("foo_db")), "group", "read_ds", "ENABLE"))); diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportDatabaseConfigurationUpdaterTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportDatabaseConfigurationUpdaterTest.java index bfd16d107e433..86396c8ef27bc 100644 --- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportDatabaseConfigurationUpdaterTest.java +++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportDatabaseConfigurationUpdaterTest.java @@ -60,7 +60,7 @@ @MockitoSettings(strictness = Strictness.LENIENT) class ImportDatabaseConfigurationUpdaterTest { - private ImportDatabaseConfigurationUpdater importDatabaseConfigUpdater; + private ImportDatabaseConfigurationExecutor importDatabaseConfigUpdater; @BeforeAll static void setUp() throws ClassNotFoundException { @@ -128,7 +128,7 @@ private void assertExecute(final String databaseName, final String filePath) thr private void init(final String databaseName) { ContextManager contextManager = mockContextManager(databaseName); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); - importDatabaseConfigUpdater = new ImportDatabaseConfigurationUpdater(); + importDatabaseConfigUpdater = new ImportDatabaseConfigurationExecutor(); YamlDatabaseConfigurationImportExecutor databaseConfigImportExecutor = new YamlDatabaseConfigurationImportExecutor(); Plugins.getMemberAccessor().set(importDatabaseConfigUpdater.getClass().getDeclaredField("databaseConfigImportExecutor"), importDatabaseConfigUpdater, databaseConfigImportExecutor); Plugins.getMemberAccessor().set(databaseConfigImportExecutor.getClass().getDeclaredField("validateHandler"), databaseConfigImportExecutor, mock(DataSourcePoolPropertiesValidateHandler.class)); diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportMetaDataUpdaterTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportMetaDataUpdaterTest.java index dd960e1414e2d..3b838bad566af 100644 --- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportMetaDataUpdaterTest.java +++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportMetaDataUpdaterTest.java @@ -67,7 +67,7 @@ class ImportMetaDataUpdaterTest { private static final String EMPTY = "empty_metadata"; - private ImportMetaDataUpdater importMetaDataUpdater; + private ImportMetaDataExecutor importMetaDataUpdater; private final Map featureMap = new HashMap<>(1, 1F); @@ -97,7 +97,7 @@ void assertImportExistedMetaDataFromFile() { } private void init(final String feature) { - importMetaDataUpdater = new ImportMetaDataUpdater(); + importMetaDataUpdater = new ImportMetaDataExecutor(); ContextManager contextManager = mockContextManager(feature); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); when(ProxyContext.getInstance().databaseExists(feature)).thenReturn(true); diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LabelComputeNodeUpdaterTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LabelComputeNodeUpdaterTest.java index 164c715812755..8cee76bbaf0d0 100644 --- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LabelComputeNodeUpdaterTest.java +++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LabelComputeNodeUpdaterTest.java @@ -38,6 +38,6 @@ class LabelComputeNodeUpdaterTest { @Test void assertWithStandaloneMode() { when(ProxyContext.getInstance().getContextManager()).thenReturn(mock(ContextManager.class, RETURNS_DEEP_STUBS)); - assertThrows(UnsupportedSQLOperationException.class, () -> new LabelComputeNodeUpdater().executeUpdate(mock(LabelComputeNodeStatement.class))); + assertThrows(UnsupportedSQLOperationException.class, () -> new LabelComputeNodeExecutor().executeUpdate(mock(LabelComputeNodeStatement.class))); } } diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterUpdaterTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterUpdaterTest.java index 28ce87d89dc23..51803669bc6fa 100644 --- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterUpdaterTest.java +++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterUpdaterTest.java @@ -44,7 +44,7 @@ class LockClusterUpdaterTest { void assertExecuteWithNotClusterMode() { ContextManager contextManager = mock(ContextManager.class, RETURNS_DEEP_STUBS); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); - LockClusterUpdater updater = new LockClusterUpdater(); + LockClusterExecutor updater = new LockClusterExecutor(); assertThrows(UnsupportedSQLOperationException.class, () -> updater.executeUpdate(new LockClusterStatement(new AlgorithmSegment("FOO", new Properties())))); } @@ -54,7 +54,7 @@ void assertExecuteWithLockedCluster() { when(contextManager.getInstanceContext().isCluster()).thenReturn(true); when(contextManager.getClusterStateContext().getCurrentState()).thenReturn(ClusterState.UNAVAILABLE); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); - LockClusterUpdater updater = new LockClusterUpdater(); + LockClusterExecutor updater = new LockClusterExecutor(); assertThrows(IllegalStateException.class, () -> updater.executeUpdate(new LockClusterStatement(new AlgorithmSegment("FOO", new Properties())))); } @@ -64,7 +64,7 @@ void assertExecuteWithWrongAlgorithm() { when(contextManager.getInstanceContext().isCluster()).thenReturn(true); when(contextManager.getClusterStateContext().getCurrentState()).thenReturn(ClusterState.OK); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); - LockClusterUpdater updater = new LockClusterUpdater(); + LockClusterExecutor updater = new LockClusterExecutor(); assertThrows(ServiceProviderNotFoundException.class, () -> updater.executeUpdate(new LockClusterStatement(new AlgorithmSegment("FOO", new Properties())))); } } diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableUpdaterTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableUpdaterTest.java index 885233845e114..10af285c9083e 100644 --- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableUpdaterTest.java +++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableUpdaterTest.java @@ -57,7 +57,7 @@ class SetDistVariableUpdaterTest { @Test void assertExecuteWithConfigurationKey() throws SQLException { SetDistVariableStatement statement = new SetDistVariableStatement("proxy_frontend_flush_threshold", "1024"); - SetDistVariableUpdater updater = new SetDistVariableUpdater(); + SetDistVariableExecutor updater = new SetDistVariableExecutor(); ContextManager contextManager = mockContextManager(); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); updater.executeUpdate(statement); @@ -69,7 +69,7 @@ void assertExecuteWithConfigurationKey() throws SQLException { @Test void assertExecuteWithTemporaryConfigurationKey() throws SQLException { SetDistVariableStatement statement = new SetDistVariableStatement("proxy_meta_data_collector_enabled", "false"); - SetDistVariableUpdater updater = new SetDistVariableUpdater(); + SetDistVariableExecutor updater = new SetDistVariableExecutor(); ContextManager contextManager = mockContextManager(); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); updater.executeUpdate(statement); @@ -81,7 +81,7 @@ void assertExecuteWithTemporaryConfigurationKey() throws SQLException { @Test void assertExecuteWithTypedSPI() throws SQLException { SetDistVariableStatement statement = new SetDistVariableStatement("proxy_frontend_database_protocol_type", "MySQL"); - SetDistVariableUpdater updater = new SetDistVariableUpdater(); + SetDistVariableExecutor updater = new SetDistVariableExecutor(); ContextManager contextManager = mockContextManager(); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); updater.executeUpdate(statement); @@ -93,7 +93,7 @@ void assertExecuteWithTypedSPI() throws SQLException { @Test void assertExecuteWithSystemLogLevel() throws SQLException { SetDistVariableStatement statement = new SetDistVariableStatement("system_log_level", "debug"); - SetDistVariableUpdater updater = new SetDistVariableUpdater(); + SetDistVariableExecutor updater = new SetDistVariableExecutor(); ContextManager contextManager = mockContextManager(); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); updater.executeUpdate(statement); @@ -107,7 +107,7 @@ void assertExecuteWithWrongSystemLogLevel() { ContextManager contextManager = mockContextManager(); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); SetDistVariableStatement statement = new SetDistVariableStatement("system_log_level", "invalid"); - SetDistVariableUpdater updater = new SetDistVariableUpdater(); + SetDistVariableExecutor updater = new SetDistVariableExecutor(); assertThrows(InvalidValueException.class, () -> updater.executeUpdate(statement)); } diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetInstanceStatusUpdaterTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetInstanceStatusUpdaterTest.java index ba8f415dce86b..06d8d8c4f54ef 100644 --- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetInstanceStatusUpdaterTest.java +++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetInstanceStatusUpdaterTest.java @@ -40,7 +40,7 @@ class SetInstanceStatusUpdaterTest { void assertExecuteWithNotNotClusterMode() { ContextManager contextManager = mock(ContextManager.class, RETURNS_DEEP_STUBS); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); - SetInstanceStatusUpdater updater = new SetInstanceStatusUpdater(); + SetInstanceStatusExecutor updater = new SetInstanceStatusExecutor(); assertThrows(UnsupportedSQLOperationException.class, () -> updater.executeUpdate(new SetInstanceStatusStatement("ENABLE", "instanceID"))); } @@ -49,7 +49,7 @@ void assertExecuteWithNotExistsInstanceID() { ContextManager contextManager = mock(ContextManager.class, RETURNS_DEEP_STUBS); when(contextManager.getInstanceContext().isCluster()).thenReturn(true); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); - SetInstanceStatusUpdater updater = new SetInstanceStatusUpdater(); + SetInstanceStatusExecutor updater = new SetInstanceStatusExecutor(); assertThrows(UnsupportedSQLOperationException.class, () -> updater.executeUpdate(new SetInstanceStatusStatement("ENABLE", "instanceID"))); } @@ -59,7 +59,7 @@ void assertExecuteWithCurrentUsingInstance() { when(contextManager.getInstanceContext().isCluster()).thenReturn(true); when(contextManager.getInstanceContext().getInstance().getCurrentInstanceId()).thenReturn("instanceID"); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); - SetInstanceStatusUpdater updater = new SetInstanceStatusUpdater(); + SetInstanceStatusExecutor updater = new SetInstanceStatusExecutor(); assertThrows(UnsupportedSQLOperationException.class, () -> updater.executeUpdate(new SetInstanceStatusStatement("DISABLE", "instanceID"))); } @@ -71,7 +71,7 @@ void assertExecuteWithAlreadyDisableInstance() { when(contextManager.getInstanceContext().getComputeNodeInstanceById("instanceID").isPresent()).thenReturn(true); when(contextManager.getInstanceContext().getComputeNodeInstanceById("instanceID").get().getState().getCurrentState()).thenReturn(InstanceState.CIRCUIT_BREAK); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); - SetInstanceStatusUpdater updater = new SetInstanceStatusUpdater(); + SetInstanceStatusExecutor updater = new SetInstanceStatusExecutor(); assertThrows(UnsupportedSQLOperationException.class, () -> updater.executeUpdate(new SetInstanceStatusStatement("DISABLE", "instanceID"))); } } diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlabelComputeNodeUpdaterTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlabelComputeNodeUpdaterTest.java index 37fc268fde075..519ec8e691b04 100644 --- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlabelComputeNodeUpdaterTest.java +++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlabelComputeNodeUpdaterTest.java @@ -38,7 +38,7 @@ class UnlabelComputeNodeUpdaterTest { @Test void assertWithStandaloneMode() { when(ProxyContext.getInstance().getContextManager()).thenReturn(mock(ContextManager.class, RETURNS_DEEP_STUBS)); - UnlabelComputeNodeUpdater updater = new UnlabelComputeNodeUpdater(); + UnlabelComputeNodeExecutor updater = new UnlabelComputeNodeExecutor(); assertThrows(UnsupportedSQLOperationException.class, () -> updater.executeUpdate(mock(UnlabelComputeNodeStatement.class))); } } diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlockClusterUpdaterTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlockClusterUpdaterTest.java index c11316d32a037..78061d9ea4a65 100644 --- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlockClusterUpdaterTest.java +++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlockClusterUpdaterTest.java @@ -40,7 +40,7 @@ class UnlockClusterUpdaterTest { void assertExecuteWithNotClusterMode() { ContextManager contextManager = mock(ContextManager.class, RETURNS_DEEP_STUBS); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); - UnlockClusterUpdater updater = new UnlockClusterUpdater(); + UnlockClusterExecutor updater = new UnlockClusterExecutor(); assertThrows(UnsupportedSQLOperationException.class, () -> updater.executeUpdate(new UnlockClusterStatement())); } @@ -50,7 +50,7 @@ void assertExecuteWithNotLockedCluster() { when(contextManager.getInstanceContext().isCluster()).thenReturn(true); when(contextManager.getClusterStateContext().getCurrentState()).thenReturn(ClusterState.OK); when(ProxyContext.getInstance().getContextManager()).thenReturn(contextManager); - UnlockClusterUpdater updater = new UnlockClusterUpdater(); + UnlockClusterExecutor updater = new UnlockClusterExecutor(); assertThrows(IllegalStateException.class, () -> updater.executeUpdate(new UnlockClusterStatement())); } }