This is an automated email from the ASF dual-hosted git repository.
sunnianjun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new b6c72ad0c74 Rename GlobalRuleRDLExecutor (#29774)
b6c72ad0c74 is described below
commit b6c72ad0c743adc3323c977063ab35ae4e27ea17
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Jan 19 12:19:04 2024 +0800
Rename GlobalRuleRDLExecutor (#29774)
---
.../GlobalRuleRDLExecutor.java} | 8 ++++----
...tUpdater.java => AlterGlobalClockRuleExecutor.java} | 6 +++---
...tsql.handler.type.rdl.global.GlobalRuleRDLExecutor} | 2 +-
...Test.java => AlterGlobalClockRuleExecutorTest.java} | 6 +++---
...pdater.java => AlterSQLFederationRuleExecutor.java} | 6 +++---
...tsql.handler.type.rdl.global.GlobalRuleRDLExecutor} | 2 +-
...st.java => AlterSQLFederationRuleExecutorTest.java} | 6 +++---
...entUpdater.java => AlterSQLParserRuleExecutor.java} | 6 +++---
...tsql.handler.type.rdl.global.GlobalRuleRDLExecutor} | 2 +-
...erTest.java => AlterSQLParserRuleExecutorTest.java} | 6 +++---
...pdater.java => AlterSQLTranslatorRuleExecutor.java} | 6 +++---
...tsql.handler.type.rdl.global.GlobalRuleRDLExecutor} | 2 +-
...st.java => AlterSQLTranslatorRuleExecutorTest.java} | 6 +++---
...ementUpdater.java => AlterTrafficRuleExecutor.java} | 6 +++---
...tsql.handler.type.rdl.global.GlobalRuleRDLExecutor} | 2 +-
...aterTest.java => AlterTrafficRuleExecutorTest.java} | 18 +++++++++---------
...tUpdater.java => AlterTransactionRuleExecutor.java} | 6 +++---
...tsql.handler.type.rdl.global.GlobalRuleRDLExecutor} | 2 +-
...Test.java => AlterTransactionRuleExecutorTest.java} | 10 +++++-----
.../distsql/ral/GlobalRuleRDLBackendHandler.java | 6 +++---
.../distsql/ral/NewGlobalRuleRDLBackendHandler.java | 6 +++---
21 files changed, 60 insertions(+), 60 deletions(-)
diff --git
a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/rdl/GlobalRuleRDLUpdater.java
b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/rdl/global/GlobalRuleRDLExecutor.java
similarity index 87%
rename from
infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/rdl/GlobalRuleRDLUpdater.java
rename to
infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/rdl/global/GlobalRuleRDLExecutor.java
index 2c97f1a7ec2..9456ed2cb38 100644
---
a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/rdl/GlobalRuleRDLUpdater.java
+++
b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/type/rdl/global/GlobalRuleRDLExecutor.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.distsql.handler.type.rdl;
+package org.apache.shardingsphere.distsql.handler.type.rdl.global;
import org.apache.shardingsphere.distsql.statement.rdl.RuleDefinitionStatement;
import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
@@ -23,13 +23,13 @@ import
org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPI;
/**
- * RDL updater for global rule.
+ * Global rule RDL executor.
*
- * @param <T> type of SQL statement
+ * @param <T> type of rule definition statement
* @param <R> type of rule configuration
*/
@SingletonSPI
-public interface GlobalRuleRDLUpdater<T extends RuleDefinitionStatement, R
extends RuleConfiguration> extends TypedSPI {
+public interface GlobalRuleRDLExecutor<T extends RuleDefinitionStatement, R
extends RuleConfiguration> extends TypedSPI {
/**
* Check SQL statement.
diff --git
a/kernel/global-clock/distsql/handler/src/main/java/org/apache/shardingsphere/globalclock/distsql/handler/update/AlterGlobalClockRuleStatementUpdater.java
b/kernel/global-clock/distsql/handler/src/main/java/org/apache/shardingsphere/globalclock/distsql/handler/update/AlterGlobalClockRuleExecutor.java
similarity index 87%
rename from
kernel/global-clock/distsql/handler/src/main/java/org/apache/shardingsphere/globalclock/distsql/handler/update/AlterGlobalClockRuleStatementUpdater.java
rename to
kernel/global-clock/distsql/handler/src/main/java/org/apache/shardingsphere/globalclock/distsql/handler/update/AlterGlobalClockRuleExecutor.java
index 10c00c55790..38989612d02 100644
---
a/kernel/global-clock/distsql/handler/src/main/java/org/apache/shardingsphere/globalclock/distsql/handler/update/AlterGlobalClockRuleStatementUpdater.java
+++
b/kernel/global-clock/distsql/handler/src/main/java/org/apache/shardingsphere/globalclock/distsql/handler/update/AlterGlobalClockRuleExecutor.java
@@ -17,14 +17,14 @@
package org.apache.shardingsphere.globalclock.distsql.handler.update;
-import org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater;
+import
org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor;
import
org.apache.shardingsphere.globalclock.api.config.GlobalClockRuleConfiguration;
import
org.apache.shardingsphere.globalclock.distsql.statement.updatable.AlterGlobalClockRuleStatement;
/**
- * Alter global clock rule statement updater.
+ * Alter global clock rule executor.
*/
-public final class AlterGlobalClockRuleStatementUpdater implements
GlobalRuleRDLUpdater<AlterGlobalClockRuleStatement,
GlobalClockRuleConfiguration> {
+public final class AlterGlobalClockRuleExecutor implements
GlobalRuleRDLExecutor<AlterGlobalClockRuleStatement,
GlobalClockRuleConfiguration> {
@Override
public void checkSQLStatement(final GlobalClockRuleConfiguration
currentRuleConfig, final AlterGlobalClockRuleStatement sqlStatement) {
diff --git
a/kernel/global-clock/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
b/kernel/global-clock/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
similarity index 96%
rename from
kernel/global-clock/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
rename to
kernel/global-clock/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
index 28385329f6d..2dd73f681ac 100644
---
a/kernel/global-clock/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
+++
b/kernel/global-clock/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.globalclock.distsql.handler.update.AlterGlobalClockRuleStatementUpdater
+org.apache.shardingsphere.globalclock.distsql.handler.update.AlterGlobalClockRuleExecutor
diff --git
a/kernel/global-clock/distsql/handler/src/test/java/org/apache/shardingsphere/globalclock/distsql/handler/update/AlterGlobalClockRuleStatementUpdaterTest.java
b/kernel/global-clock/distsql/handler/src/test/java/org/apache/shardingsphere/globalclock/distsql/handler/update/AlterGlobalClockRuleExecutorTest.java
similarity index 88%
rename from
kernel/global-clock/distsql/handler/src/test/java/org/apache/shardingsphere/globalclock/distsql/handler/update/AlterGlobalClockRuleStatementUpdaterTest.java
rename to
kernel/global-clock/distsql/handler/src/test/java/org/apache/shardingsphere/globalclock/distsql/handler/update/AlterGlobalClockRuleExecutorTest.java
index 084fedfb2be..7e15f7630c9 100644
---
a/kernel/global-clock/distsql/handler/src/test/java/org/apache/shardingsphere/globalclock/distsql/handler/update/AlterGlobalClockRuleStatementUpdaterTest.java
+++
b/kernel/global-clock/distsql/handler/src/test/java/org/apache/shardingsphere/globalclock/distsql/handler/update/AlterGlobalClockRuleExecutorTest.java
@@ -28,13 +28,13 @@ import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertTrue;
-class AlterGlobalClockRuleStatementUpdaterTest {
+class AlterGlobalClockRuleExecutorTest {
@Test
void assertExecute() {
- AlterGlobalClockRuleStatementUpdater updater = new
AlterGlobalClockRuleStatementUpdater();
+ AlterGlobalClockRuleExecutor executor = new
AlterGlobalClockRuleExecutor();
AlterGlobalClockRuleStatement sqlStatement = new
AlterGlobalClockRuleStatement("TSO", "redis", Boolean.TRUE,
PropertiesBuilder.build(new Property("host", "127.0.0.1")));
- GlobalClockRuleConfiguration actual =
updater.buildAlteredRuleConfiguration(getSQLParserRuleConfiguration(),
sqlStatement);
+ GlobalClockRuleConfiguration actual =
executor.buildAlteredRuleConfiguration(getSQLParserRuleConfiguration(),
sqlStatement);
assertThat(actual.getType(), is("TSO"));
assertThat(actual.getProvider(), is("redis"));
assertTrue(actual.isEnabled());
diff --git
a/kernel/sql-federation/distsql/handler/src/main/java/org/apache/shardingsphere/sqlfederation/distsql/handler/update/AlterSQLFederationRuleStatementUpdater.java
b/kernel/sql-federation/distsql/handler/src/main/java/org/apache/shardingsphere/sqlfederation/distsql/handler/update/AlterSQLFederationRuleExecutor.java
similarity index 91%
rename from
kernel/sql-federation/distsql/handler/src/main/java/org/apache/shardingsphere/sqlfederation/distsql/handler/update/AlterSQLFederationRuleStatementUpdater.java
rename to
kernel/sql-federation/distsql/handler/src/main/java/org/apache/shardingsphere/sqlfederation/distsql/handler/update/AlterSQLFederationRuleExecutor.java
index 13a1795bb7d..e61885f362d 100644
---
a/kernel/sql-federation/distsql/handler/src/main/java/org/apache/shardingsphere/sqlfederation/distsql/handler/update/AlterSQLFederationRuleStatementUpdater.java
+++
b/kernel/sql-federation/distsql/handler/src/main/java/org/apache/shardingsphere/sqlfederation/distsql/handler/update/AlterSQLFederationRuleExecutor.java
@@ -17,16 +17,16 @@
package org.apache.shardingsphere.sqlfederation.distsql.handler.update;
-import org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater;
+import
org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor;
import org.apache.shardingsphere.sql.parser.api.CacheOption;
import
org.apache.shardingsphere.sqlfederation.api.config.SQLFederationRuleConfiguration;
import
org.apache.shardingsphere.sqlfederation.distsql.segment.CacheOptionSegment;
import
org.apache.shardingsphere.sqlfederation.distsql.statement.updatable.AlterSQLFederationRuleStatement;
/**
- * Alter SQL federation rule statement updater.
+ * Alter SQL federation rule executor.
*/
-public final class AlterSQLFederationRuleStatementUpdater implements
GlobalRuleRDLUpdater<AlterSQLFederationRuleStatement,
SQLFederationRuleConfiguration> {
+public final class AlterSQLFederationRuleExecutor implements
GlobalRuleRDLExecutor<AlterSQLFederationRuleStatement,
SQLFederationRuleConfiguration> {
@Override
public void checkSQLStatement(final SQLFederationRuleConfiguration
currentRuleConfig, final AlterSQLFederationRuleStatement sqlStatement) {
diff --git
a/kernel/sql-federation/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
b/kernel/sql-federation/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
similarity index 95%
rename from
kernel/sql-federation/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
rename to
kernel/sql-federation/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
index 6b2edd1ce45..2287e22980d 100644
---
a/kernel/sql-federation/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
+++
b/kernel/sql-federation/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.sqlfederation.distsql.handler.update.AlterSQLFederationRuleStatementUpdater
+org.apache.shardingsphere.sqlfederation.distsql.handler.update.AlterSQLFederationRuleExecutor
diff --git
a/kernel/sql-federation/distsql/handler/src/test/java/org/apache/shardingsphere/sqlfederation/distsql/handler/update/AlterSQLFederationRuleStatementUpdaterTest.java
b/kernel/sql-federation/distsql/handler/src/test/java/org/apache/shardingsphere/sqlfederation/distsql/handler/update/AlterSQLFederationRuleExecutorTest.java
similarity index 87%
rename from
kernel/sql-federation/distsql/handler/src/test/java/org/apache/shardingsphere/sqlfederation/distsql/handler/update/AlterSQLFederationRuleStatementUpdaterTest.java
rename to
kernel/sql-federation/distsql/handler/src/test/java/org/apache/shardingsphere/sqlfederation/distsql/handler/update/AlterSQLFederationRuleExecutorTest.java
index 16db4ecae35..c5af8da6149 100644
---
a/kernel/sql-federation/distsql/handler/src/test/java/org/apache/shardingsphere/sqlfederation/distsql/handler/update/AlterSQLFederationRuleStatementUpdaterTest.java
+++
b/kernel/sql-federation/distsql/handler/src/test/java/org/apache/shardingsphere/sqlfederation/distsql/handler/update/AlterSQLFederationRuleExecutorTest.java
@@ -27,13 +27,13 @@ import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertTrue;
-class AlterSQLFederationRuleStatementUpdaterTest {
+class AlterSQLFederationRuleExecutorTest {
@Test
void assertExecute() {
- AlterSQLFederationRuleStatementUpdater updater = new
AlterSQLFederationRuleStatementUpdater();
+ AlterSQLFederationRuleExecutor executor = new
AlterSQLFederationRuleExecutor();
AlterSQLFederationRuleStatement sqlStatement = new
AlterSQLFederationRuleStatement(true, true, new CacheOptionSegment(64, 512L));
- SQLFederationRuleConfiguration actual =
updater.buildAlteredRuleConfiguration(getSQLFederationRuleConfiguration(),
sqlStatement);
+ SQLFederationRuleConfiguration actual =
executor.buildAlteredRuleConfiguration(getSQLFederationRuleConfiguration(),
sqlStatement);
assertTrue(actual.isSqlFederationEnabled());
assertTrue(actual.isAllQueryUseSQLFederation());
assertThat(actual.getExecutionPlanCache().getInitialCapacity(),
is(64));
diff --git
a/kernel/sql-parser/distsql/handler/src/main/java/org/apache/shardingsphere/parser/distsql/handler/update/AlterSQLParserRuleStatementUpdater.java
b/kernel/sql-parser/distsql/handler/src/main/java/org/apache/shardingsphere/parser/distsql/handler/update/AlterSQLParserRuleExecutor.java
similarity index 91%
rename from
kernel/sql-parser/distsql/handler/src/main/java/org/apache/shardingsphere/parser/distsql/handler/update/AlterSQLParserRuleStatementUpdater.java
rename to
kernel/sql-parser/distsql/handler/src/main/java/org/apache/shardingsphere/parser/distsql/handler/update/AlterSQLParserRuleExecutor.java
index 5f25db71f32..9bb0e92a669 100644
---
a/kernel/sql-parser/distsql/handler/src/main/java/org/apache/shardingsphere/parser/distsql/handler/update/AlterSQLParserRuleStatementUpdater.java
+++
b/kernel/sql-parser/distsql/handler/src/main/java/org/apache/shardingsphere/parser/distsql/handler/update/AlterSQLParserRuleExecutor.java
@@ -17,16 +17,16 @@
package org.apache.shardingsphere.parser.distsql.handler.update;
-import org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater;
+import
org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor;
import org.apache.shardingsphere.parser.config.SQLParserRuleConfiguration;
import org.apache.shardingsphere.parser.distsql.segment.CacheOptionSegment;
import
org.apache.shardingsphere.parser.distsql.statement.updatable.AlterSQLParserRuleStatement;
import org.apache.shardingsphere.sql.parser.api.CacheOption;
/**
- * Alter SQL parser rule statement updater.
+ * Alter SQL parser rule executor.
*/
-public final class AlterSQLParserRuleStatementUpdater implements
GlobalRuleRDLUpdater<AlterSQLParserRuleStatement, SQLParserRuleConfiguration> {
+public final class AlterSQLParserRuleExecutor implements
GlobalRuleRDLExecutor<AlterSQLParserRuleStatement, SQLParserRuleConfiguration> {
@Override
public void checkSQLStatement(final SQLParserRuleConfiguration
currentRuleConfig, final AlterSQLParserRuleStatement sqlStatement) {
diff --git
a/kernel/sql-parser/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
b/kernel/sql-parser/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
similarity index 96%
rename from
kernel/sql-parser/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
rename to
kernel/sql-parser/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
index 691a753a8ca..b5db8e65257 100644
---
a/kernel/sql-parser/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
+++
b/kernel/sql-parser/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.parser.distsql.handler.update.AlterSQLParserRuleStatementUpdater
+org.apache.shardingsphere.parser.distsql.handler.update.AlterSQLParserRuleExecutor
diff --git
a/kernel/sql-parser/distsql/handler/src/test/java/org/apache/shardingsphere/parser/distsql/handler/update/AlterSQLParserRuleStatementUpdaterTest.java
b/kernel/sql-parser/distsql/handler/src/test/java/org/apache/shardingsphere/parser/distsql/handler/update/AlterSQLParserRuleExecutorTest.java
similarity index 88%
rename from
kernel/sql-parser/distsql/handler/src/test/java/org/apache/shardingsphere/parser/distsql/handler/update/AlterSQLParserRuleStatementUpdaterTest.java
rename to
kernel/sql-parser/distsql/handler/src/test/java/org/apache/shardingsphere/parser/distsql/handler/update/AlterSQLParserRuleExecutorTest.java
index 58c4211d2d7..4bd7dcdde81 100644
---
a/kernel/sql-parser/distsql/handler/src/test/java/org/apache/shardingsphere/parser/distsql/handler/update/AlterSQLParserRuleStatementUpdaterTest.java
+++
b/kernel/sql-parser/distsql/handler/src/test/java/org/apache/shardingsphere/parser/distsql/handler/update/AlterSQLParserRuleExecutorTest.java
@@ -26,13 +26,13 @@ import org.junit.jupiter.api.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
-class AlterSQLParserRuleStatementUpdaterTest {
+class AlterSQLParserRuleExecutorTest {
@Test
void assertExecute() {
- AlterSQLParserRuleStatementUpdater updater = new
AlterSQLParserRuleStatementUpdater();
+ AlterSQLParserRuleExecutor executor = new AlterSQLParserRuleExecutor();
AlterSQLParserRuleStatement sqlStatement = new
AlterSQLParserRuleStatement(new CacheOptionSegment(64, 512L), new
CacheOptionSegment(1000, 1000L));
- SQLParserRuleConfiguration actual =
updater.buildAlteredRuleConfiguration(getSQLParserRuleConfiguration(),
sqlStatement);
+ SQLParserRuleConfiguration actual =
executor.buildAlteredRuleConfiguration(getSQLParserRuleConfiguration(),
sqlStatement);
assertThat(actual.getSqlStatementCache().getInitialCapacity(),
is(1000));
assertThat(actual.getSqlStatementCache().getMaximumSize(), is(1000L));
assertThat(actual.getParseTreeCache().getInitialCapacity(), is(64));
diff --git
a/kernel/sql-translator/distsql/handler/src/main/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleStatementUpdater.java
b/kernel/sql-translator/distsql/handler/src/main/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleExecutor.java
similarity index 89%
rename from
kernel/sql-translator/distsql/handler/src/main/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleStatementUpdater.java
rename to
kernel/sql-translator/distsql/handler/src/main/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleExecutor.java
index 97c4fc9f9e6..6703b5bda48 100644
---
a/kernel/sql-translator/distsql/handler/src/main/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleStatementUpdater.java
+++
b/kernel/sql-translator/distsql/handler/src/main/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleExecutor.java
@@ -17,16 +17,16 @@
package org.apache.shardingsphere.sqltranslator.distsql.handler.update;
-import org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater;
+import
org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
import
org.apache.shardingsphere.sqltranslator.api.config.SQLTranslatorRuleConfiguration;
import
org.apache.shardingsphere.sqltranslator.distsql.statement.updateable.AlterSQLTranslatorRuleStatement;
import org.apache.shardingsphere.sqltranslator.spi.SQLTranslator;
/**
- * Alter SQL translator rule statement updater.
+ * Alter SQL translator rule executor.
*/
-public final class AlterSQLTranslatorRuleStatementUpdater implements
GlobalRuleRDLUpdater<AlterSQLTranslatorRuleStatement,
SQLTranslatorRuleConfiguration> {
+public final class AlterSQLTranslatorRuleExecutor implements
GlobalRuleRDLExecutor<AlterSQLTranslatorRuleStatement,
SQLTranslatorRuleConfiguration> {
@Override
public void checkSQLStatement(final SQLTranslatorRuleConfiguration
currentRuleConfig, final AlterSQLTranslatorRuleStatement sqlStatement) {
diff --git
a/kernel/sql-translator/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
b/kernel/sql-translator/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
similarity index 95%
rename from
kernel/sql-translator/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
rename to
kernel/sql-translator/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
index ef36ed5349e..977e6d4bfee 100644
---
a/kernel/sql-translator/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
+++
b/kernel/sql-translator/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.sqltranslator.distsql.handler.update.AlterSQLTranslatorRuleStatementUpdater
+org.apache.shardingsphere.sqltranslator.distsql.handler.update.AlterSQLTranslatorRuleExecutor
diff --git
a/kernel/sql-translator/distsql/handler/src/test/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleStatementUpdaterTest.java
b/kernel/sql-translator/distsql/handler/src/test/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleExecutorTest.java
similarity index 89%
rename from
kernel/sql-translator/distsql/handler/src/test/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleStatementUpdaterTest.java
rename to
kernel/sql-translator/distsql/handler/src/test/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleExecutorTest.java
index 71646986809..187be0c3290 100644
---
a/kernel/sql-translator/distsql/handler/src/test/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleStatementUpdaterTest.java
+++
b/kernel/sql-translator/distsql/handler/src/test/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleExecutorTest.java
@@ -32,12 +32,12 @@ import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
-class AlterSQLTranslatorRuleStatementUpdaterTest {
+class AlterSQLTranslatorRuleExecutorTest {
@Test
void assertExecute() {
- AlterSQLTranslatorRuleStatementUpdater updater = new
AlterSQLTranslatorRuleStatementUpdater();
- SQLTranslatorRuleConfiguration actual =
updater.buildAlteredRuleConfiguration(createSQLTranslatorRuleConfiguration(),
+ AlterSQLTranslatorRuleExecutor executor = new
AlterSQLTranslatorRuleExecutor();
+ SQLTranslatorRuleConfiguration actual =
executor.buildAlteredRuleConfiguration(createSQLTranslatorRuleConfiguration(),
new AlterSQLTranslatorRuleStatement(new
AlgorithmSegment("JOOQ", PropertiesBuilder.build(new Property("foo", "bar"))),
null));
assertThat(actual.getType(), is("JOOQ"));
assertFalse(actual.getProps().isEmpty());
diff --git
a/kernel/traffic/distsql/handler/src/main/java/org/apache/shardingsphere/traffic/distsql/handler/update/AlterTrafficRuleStatementUpdater.java
b/kernel/traffic/distsql/handler/src/main/java/org/apache/shardingsphere/traffic/distsql/handler/update/AlterTrafficRuleExecutor.java
similarity index 96%
rename from
kernel/traffic/distsql/handler/src/main/java/org/apache/shardingsphere/traffic/distsql/handler/update/AlterTrafficRuleStatementUpdater.java
rename to
kernel/traffic/distsql/handler/src/main/java/org/apache/shardingsphere/traffic/distsql/handler/update/AlterTrafficRuleExecutor.java
index 21e6a8a0529..291dbbb9792 100644
---
a/kernel/traffic/distsql/handler/src/main/java/org/apache/shardingsphere/traffic/distsql/handler/update/AlterTrafficRuleStatementUpdater.java
+++
b/kernel/traffic/distsql/handler/src/main/java/org/apache/shardingsphere/traffic/distsql/handler/update/AlterTrafficRuleExecutor.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.traffic.distsql.handler.update;
import
org.apache.shardingsphere.distsql.handler.exception.rule.MissingRequiredRuleException;
-import org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater;
+import
org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor;
import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration;
import
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
@@ -37,9 +37,9 @@ import java.util.Map;
import java.util.stream.Collectors;
/**
- * Alter traffic rule statement updater.
+ * Alter traffic rule executor.
*/
-public final class AlterTrafficRuleStatementUpdater implements
GlobalRuleRDLUpdater<AlterTrafficRuleStatement, TrafficRuleConfiguration> {
+public final class AlterTrafficRuleExecutor implements
GlobalRuleRDLExecutor<AlterTrafficRuleStatement, TrafficRuleConfiguration> {
@Override
public void checkSQLStatement(final TrafficRuleConfiguration
currentRuleConfig, final AlterTrafficRuleStatement sqlStatement) {
diff --git
a/kernel/traffic/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
b/kernel/traffic/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
similarity index 97%
rename from
kernel/traffic/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
rename to
kernel/traffic/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
index 7ac314a7ead..a8b36dbd597 100644
---
a/kernel/traffic/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
+++
b/kernel/traffic/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.traffic.distsql.handler.update.AlterTrafficRuleStatementUpdater
+org.apache.shardingsphere.traffic.distsql.handler.update.AlterTrafficRuleExecutor
diff --git
a/kernel/traffic/distsql/handler/src/test/java/org/apache/shardingsphere/traffic/distsql/handler/update/AlterTrafficRuleStatementUpdaterTest.java
b/kernel/traffic/distsql/handler/src/test/java/org/apache/shardingsphere/traffic/distsql/handler/update/AlterTrafficRuleExecutorTest.java
similarity index 82%
rename from
kernel/traffic/distsql/handler/src/test/java/org/apache/shardingsphere/traffic/distsql/handler/update/AlterTrafficRuleStatementUpdaterTest.java
rename to
kernel/traffic/distsql/handler/src/test/java/org/apache/shardingsphere/traffic/distsql/handler/update/AlterTrafficRuleExecutorTest.java
index c4a8834a7b4..43592cc01df 100644
---
a/kernel/traffic/distsql/handler/src/test/java/org/apache/shardingsphere/traffic/distsql/handler/update/AlterTrafficRuleStatementUpdaterTest.java
+++
b/kernel/traffic/distsql/handler/src/test/java/org/apache/shardingsphere/traffic/distsql/handler/update/AlterTrafficRuleExecutorTest.java
@@ -38,32 +38,32 @@ import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
-class AlterTrafficRuleStatementUpdaterTest {
+class AlterTrafficRuleExecutorTest {
@Test
void assertExecuteWithNotExistRuleName() {
TrafficRuleSegment trafficRuleSegment = new TrafficRuleSegment(
"rule_name_3", Arrays.asList("olap", "order_by"), new
AlgorithmSegment("DISTSQL.FIXTURE", new Properties()), new
AlgorithmSegment("DISTSQL.FIXTURE", new Properties()));
- AlterTrafficRuleStatementUpdater updater = new
AlterTrafficRuleStatementUpdater();
+ AlterTrafficRuleExecutor executor = new AlterTrafficRuleExecutor();
assertThrows(MissingRequiredRuleException.class,
- () ->
updater.checkSQLStatement(createTrafficRuleConfiguration(), new
AlterTrafficRuleStatement(Collections.singleton(trafficRuleSegment))));
+ () ->
executor.checkSQLStatement(createTrafficRuleConfiguration(), new
AlterTrafficRuleStatement(Collections.singleton(trafficRuleSegment))));
}
@Test
void assertExecuteWithInvalidAlgorithmType() {
TrafficRuleSegment trafficRuleSegment = new TrafficRuleSegment(
"rule_name_1", Arrays.asList("olap", "order_by"), new
AlgorithmSegment("invalid", new Properties()), new AlgorithmSegment("invalid",
new Properties()));
- AlterTrafficRuleStatementUpdater updater = new
AlterTrafficRuleStatementUpdater();
+ AlterTrafficRuleExecutor executor = new AlterTrafficRuleExecutor();
assertThrows(ServiceProviderNotFoundException.class,
- () ->
updater.checkSQLStatement(createTrafficRuleConfiguration(), new
AlterTrafficRuleStatement(Collections.singleton(trafficRuleSegment))));
+ () ->
executor.checkSQLStatement(createTrafficRuleConfiguration(), new
AlterTrafficRuleStatement(Collections.singleton(trafficRuleSegment))));
}
@Test
void assertExecuteWithLoadBalancerCannotBeNull() {
TrafficRuleSegment trafficRuleSegment = new
TrafficRuleSegment("rule_name_1", Arrays.asList("olap", "order_by"),
new AlgorithmSegment("DISTSQL.FIXTURE", new Properties()),
null);
- AlterTrafficRuleStatementUpdater updater = new
AlterTrafficRuleStatementUpdater();
- TrafficRuleConfiguration actual =
updater.buildAlteredRuleConfiguration(createTrafficRuleConfiguration(), new
AlterTrafficRuleStatement(Collections.singleton(trafficRuleSegment)));
+ AlterTrafficRuleExecutor executor = new AlterTrafficRuleExecutor();
+ TrafficRuleConfiguration actual =
executor.buildAlteredRuleConfiguration(createTrafficRuleConfiguration(), new
AlterTrafficRuleStatement(Collections.singleton(trafficRuleSegment)));
assertThat(actual.getTrafficStrategies().size(), is(2));
assertThat(actual.getTrafficAlgorithms().size(), is(2));
assertThat(actual.getLoadBalancers().size(), is(1));
@@ -75,9 +75,9 @@ class AlterTrafficRuleStatementUpdaterTest {
"rule_name_1", Arrays.asList("olap", "order_by"), new
AlgorithmSegment("DISTSQL.FIXTURE", new Properties()), new
AlgorithmSegment("DISTSQL.FIXTURE", new Properties()));
TrafficRuleSegment trafficRuleSegment2 = new TrafficRuleSegment(
"rule_name_2", Collections.emptyList(), new
AlgorithmSegment("DISTSQL.FIXTURE", new Properties()), new
AlgorithmSegment("DISTSQL.FIXTURE", new Properties()));
- AlterTrafficRuleStatementUpdater updater = new
AlterTrafficRuleStatementUpdater();
+ AlterTrafficRuleExecutor executor = new AlterTrafficRuleExecutor();
TrafficRuleConfiguration actual =
-
updater.buildAlteredRuleConfiguration(createTrafficRuleConfiguration(), new
AlterTrafficRuleStatement(Arrays.asList(trafficRuleSegment1,
trafficRuleSegment2)));
+
executor.buildAlteredRuleConfiguration(createTrafficRuleConfiguration(), new
AlterTrafficRuleStatement(Arrays.asList(trafficRuleSegment1,
trafficRuleSegment2)));
assertThat(actual.getTrafficStrategies().size(), is(2));
assertThat(actual.getTrafficAlgorithms().size(), is(2));
assertThat(actual.getLoadBalancers().size(), is(2));
diff --git
a/kernel/transaction/distsql/handler/src/main/java/org/apache/shardingsphere/transaction/distsql/handler/update/AlterTransactionRuleStatementUpdater.java
b/kernel/transaction/distsql/handler/src/main/java/org/apache/shardingsphere/transaction/distsql/handler/update/AlterTransactionRuleExecutor.java
similarity index 94%
rename from
kernel/transaction/distsql/handler/src/main/java/org/apache/shardingsphere/transaction/distsql/handler/update/AlterTransactionRuleStatementUpdater.java
rename to
kernel/transaction/distsql/handler/src/main/java/org/apache/shardingsphere/transaction/distsql/handler/update/AlterTransactionRuleExecutor.java
index d86ef467a72..931e6c3a734 100644
---
a/kernel/transaction/distsql/handler/src/main/java/org/apache/shardingsphere/transaction/distsql/handler/update/AlterTransactionRuleStatementUpdater.java
+++
b/kernel/transaction/distsql/handler/src/main/java/org/apache/shardingsphere/transaction/distsql/handler/update/AlterTransactionRuleExecutor.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.transaction.distsql.handler.update;
import
org.apache.shardingsphere.distsql.handler.exception.rule.InvalidRuleConfigurationException;
-import org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater;
+import
org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor;
import
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.transaction.api.TransactionType;
@@ -30,9 +30,9 @@ import java.util.Collection;
import java.util.Optional;
/**
- * Alter transaction rule statement updater.
+ * Alter transaction rule executor.
*/
-public final class AlterTransactionRuleStatementUpdater implements
GlobalRuleRDLUpdater<AlterTransactionRuleStatement,
TransactionRuleConfiguration> {
+public final class AlterTransactionRuleExecutor implements
GlobalRuleRDLExecutor<AlterTransactionRuleStatement,
TransactionRuleConfiguration> {
@Override
public void checkSQLStatement(final TransactionRuleConfiguration
currentRuleConfig, final AlterTransactionRuleStatement sqlStatement) {
diff --git
a/kernel/transaction/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
b/kernel/transaction/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
similarity index 96%
rename from
kernel/transaction/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
rename to
kernel/transaction/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
index 481663dfe8a..d37a991ec59 100644
---
a/kernel/transaction/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater
+++
b/kernel/transaction/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.transaction.distsql.handler.update.AlterTransactionRuleStatementUpdater
+org.apache.shardingsphere.transaction.distsql.handler.update.AlterTransactionRuleExecutor
diff --git
a/kernel/transaction/distsql/handler/src/test/java/org/apache/shardingsphere/transaction/distsql/handler/update/AlterTransactionRuleStatementUpdaterTest.java
b/kernel/transaction/distsql/handler/src/test/java/org/apache/shardingsphere/transaction/distsql/handler/update/AlterTransactionRuleExecutorTest.java
similarity index 84%
rename from
kernel/transaction/distsql/handler/src/test/java/org/apache/shardingsphere/transaction/distsql/handler/update/AlterTransactionRuleStatementUpdaterTest.java
rename to
kernel/transaction/distsql/handler/src/test/java/org/apache/shardingsphere/transaction/distsql/handler/update/AlterTransactionRuleExecutorTest.java
index cbf543c2e5c..16c1f51a67c 100644
---
a/kernel/transaction/distsql/handler/src/test/java/org/apache/shardingsphere/transaction/distsql/handler/update/AlterTransactionRuleStatementUpdaterTest.java
+++
b/kernel/transaction/distsql/handler/src/test/java/org/apache/shardingsphere/transaction/distsql/handler/update/AlterTransactionRuleExecutorTest.java
@@ -42,13 +42,13 @@ import static org.mockito.Mockito.when;
@ExtendWith(AutoMockExtension.class)
@StaticMockSettings(ShardingSphereServiceLoader.class)
-class AlterTransactionRuleStatementUpdaterTest {
+class AlterTransactionRuleExecutorTest {
@Test
void assertExecuteWithXA() {
when(ShardingSphereServiceLoader.getServiceInstances(ShardingSphereTransactionManager.class)).thenReturn(Collections.singleton(new
ShardingSphereTransactionManagerFixture()));
- AlterTransactionRuleStatementUpdater updater = new
AlterTransactionRuleStatementUpdater();
- TransactionRuleConfiguration actual =
updater.buildAlteredRuleConfiguration(createTransactionRuleConfiguration(), new
AlterTransactionRuleStatement("XA",
+ AlterTransactionRuleExecutor executor = new
AlterTransactionRuleExecutor();
+ TransactionRuleConfiguration actual =
executor.buildAlteredRuleConfiguration(createTransactionRuleConfiguration(),
new AlterTransactionRuleStatement("XA",
new TransactionProviderSegment("Atomikos",
PropertiesBuilder.build(new Property("host", "127.0.0.1"), new
Property("databaseName", "jbossts")))));
assertThat(actual.getDefaultType(), is("XA"));
assertThat(actual.getProviderType(), is("Atomikos"));
@@ -60,9 +60,9 @@ class AlterTransactionRuleStatementUpdaterTest {
@Test
void assertExecuteWithLocal() {
- AlterTransactionRuleStatementUpdater updater = new
AlterTransactionRuleStatementUpdater();
+ AlterTransactionRuleExecutor executor = new
AlterTransactionRuleExecutor();
TransactionRuleConfiguration actual =
-
updater.buildAlteredRuleConfiguration(createTransactionRuleConfiguration(), new
AlterTransactionRuleStatement("LOCAL", new TransactionProviderSegment("", new
Properties())));
+
executor.buildAlteredRuleConfiguration(createTransactionRuleConfiguration(),
new AlterTransactionRuleStatement("LOCAL", new TransactionProviderSegment("",
new Properties())));
assertThat(actual.getDefaultType(), is("LOCAL"));
assertThat(actual.getProviderType(), is(""));
}
diff --git
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/GlobalRuleRDLBackendHandler.java
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/GlobalRuleRDLBackendHandler.java
index c813726d590..39535b0aec8 100644
---
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/GlobalRuleRDLBackendHandler.java
+++
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/GlobalRuleRDLBackendHandler.java
@@ -19,7 +19,7 @@ package
org.apache.shardingsphere.proxy.backend.handler.distsql.ral;
import lombok.RequiredArgsConstructor;
import
org.apache.shardingsphere.distsql.handler.exception.rule.MissingRequiredRuleException;
-import org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater;
+import
org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor;
import org.apache.shardingsphere.distsql.statement.rdl.RuleDefinitionStatement;
import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
@@ -43,7 +43,7 @@ public final class GlobalRuleRDLBackendHandler implements
DistSQLBackendHandler
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
public ResponseHeader execute() {
- GlobalRuleRDLUpdater globalRuleUpdater =
TypedSPILoader.getService(GlobalRuleRDLUpdater.class, sqlStatement.getClass());
+ GlobalRuleRDLExecutor globalRuleUpdater =
TypedSPILoader.getService(GlobalRuleRDLExecutor.class, sqlStatement.getClass());
Class<? extends RuleConfiguration> ruleConfigClass =
globalRuleUpdater.getRuleConfigurationClass();
ContextManager contextManager =
ProxyContext.getInstance().getContextManager();
Collection<RuleConfiguration> ruleConfigs =
contextManager.getMetaDataContexts().getMetaData().getGlobalRuleMetaData().getConfigurations();
@@ -64,7 +64,7 @@ public final class GlobalRuleRDLBackendHandler implements
DistSQLBackendHandler
@SuppressWarnings({"rawtypes", "unchecked"})
private Collection<RuleConfiguration> processUpdate(final
Collection<RuleConfiguration> ruleConfigurations,
- final
RuleDefinitionStatement sqlStatement, final GlobalRuleRDLUpdater
globalRuleUpdater, final RuleConfiguration currentRuleConfig) {
+ final
RuleDefinitionStatement sqlStatement, final GlobalRuleRDLExecutor
globalRuleUpdater, final RuleConfiguration currentRuleConfig) {
Collection<RuleConfiguration> result = new
LinkedList<>(ruleConfigurations);
result.remove(currentRuleConfig);
result.add(globalRuleUpdater.buildAlteredRuleConfiguration(currentRuleConfig,
sqlStatement));
diff --git
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/NewGlobalRuleRDLBackendHandler.java
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/NewGlobalRuleRDLBackendHandler.java
index ab61671c107..2895643ad4e 100644
---
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/NewGlobalRuleRDLBackendHandler.java
+++
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/NewGlobalRuleRDLBackendHandler.java
@@ -19,7 +19,7 @@ package
org.apache.shardingsphere.proxy.backend.handler.distsql.ral;
import lombok.RequiredArgsConstructor;
import
org.apache.shardingsphere.distsql.handler.exception.rule.MissingRequiredRuleException;
-import org.apache.shardingsphere.distsql.handler.type.rdl.GlobalRuleRDLUpdater;
+import
org.apache.shardingsphere.distsql.handler.type.rdl.global.GlobalRuleRDLExecutor;
import org.apache.shardingsphere.distsql.statement.rdl.RuleDefinitionStatement;
import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
@@ -42,7 +42,7 @@ public final class NewGlobalRuleRDLBackendHandler implements
DistSQLBackendHandl
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
public ResponseHeader execute() {
- GlobalRuleRDLUpdater globalRuleUpdater =
TypedSPILoader.getService(GlobalRuleRDLUpdater.class, sqlStatement.getClass());
+ GlobalRuleRDLExecutor globalRuleUpdater =
TypedSPILoader.getService(GlobalRuleRDLExecutor.class, sqlStatement.getClass());
Class<? extends RuleConfiguration> ruleConfigClass =
globalRuleUpdater.getRuleConfigurationClass();
ContextManager contextManager =
ProxyContext.getInstance().getContextManager();
Collection<RuleConfiguration> ruleConfigs =
contextManager.getMetaDataContexts().getMetaData().getGlobalRuleMetaData().getConfigurations();
@@ -62,7 +62,7 @@ public final class NewGlobalRuleRDLBackendHandler implements
DistSQLBackendHandl
}
@SuppressWarnings({"rawtypes", "unchecked"})
- private RuleConfiguration processUpdate(final
Collection<RuleConfiguration> ruleConfigurations, final RuleDefinitionStatement
sqlStatement, final GlobalRuleRDLUpdater globalRuleUpdater,
+ private RuleConfiguration processUpdate(final
Collection<RuleConfiguration> ruleConfigurations, final RuleDefinitionStatement
sqlStatement, final GlobalRuleRDLExecutor globalRuleUpdater,
final RuleConfiguration
currentRuleConfig) {
RuleConfiguration result =
globalRuleUpdater.buildAlteredRuleConfiguration(currentRuleConfig,
sqlStatement);
ruleConfigurations.remove(currentRuleConfig);