You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2024/04/29 01:01:36 UTC

(shardingsphere) branch master updated: Rename RepositoryTupleSwapperEngine (#31051)

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

duanzhengqiang 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 a6962d22810 Rename RepositoryTupleSwapperEngine (#31051)
a6962d22810 is described below

commit a6962d22810968c758f5cb56df7755cc3f4d1b6a
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Mon Apr 29 09:01:29 2024 +0800

    Rename RepositoryTupleSwapperEngine (#31051)
    
    * Rename RepositoryTupleSwapper
    
    * Rename RepositoryTupleSwapperEngine
    
    * Rename RepositoryTupleSwapperEngine
    
    * Move RepositoryTupleSwapper
---
 ...astRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 ...yptRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 ...askRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 ...ingRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 ...dowRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 ...ingRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 .../database/type/DropDatabaseRuleOperator.java    |  4 +-
 .../reflect-config.json                            | 90 +++++++++++-----------
 ...ityRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 ...ockRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 ...ingRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 .../config/RepositoryTupleSwapperEngine.java       | 22 +++---
 .../database/rule/DatabaseRulePersistService.java  | 13 ++--
 .../config/global/GlobalPersistService.java        |  6 +-
 .../config/global/GlobalRulePersistService.java    | 16 ++--
 ...gleRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 ...ionRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 ...serRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 ...torRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 ...ficRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 ...ionRuleConfigurationRepositoryTupleSwapper.java |  4 +-
 ...shardingsphere.mode.spi.RepositoryTupleSwapper} |  0
 .../mode/spi/RepositoryTupleSwapper.java           |  6 +-
 .../context/ConfigurationContextManager.java       |  6 +-
 .../subscriber/ConfigurationChangedSubscriber.java |  5 +-
 39 files changed, 116 insertions(+), 112 deletions(-)

diff --git a/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/yaml/swapper/BroadcastRuleConfigurationRepositoryTupleSwapper.java b/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/yaml/swapper/BroadcastRuleConfigurationRepositoryTupleSwapper.java
index 3ca51504dd5..c76c142ee4a 100644
--- a/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/yaml/swapper/BroadcastRuleConfigurationRepositoryTupleSwapper.java
+++ b/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/yaml/swapper/BroadcastRuleConfigurationRepositoryTupleSwapper.java
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.broadcast.metadata.nodepath.BroadcastRuleNodePa
 import org.apache.shardingsphere.broadcast.yaml.config.YamlBroadcastRuleConfiguration;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.mode.path.RuleNodePath;
 
 import java.util.Collection;
@@ -35,7 +35,7 @@ import java.util.stream.Collectors;
 /**
  * Broadcast rule configuration repository tuple swapper.
  */
-public final class BroadcastRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<BroadcastRuleConfiguration> {
+public final class BroadcastRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<BroadcastRuleConfiguration> {
     
     private final RuleNodePath broadcastRuleNodePath = new BroadcastRuleNodePathProvider().getRuleNodePath();
     
diff --git a/features/broadcast/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/features/broadcast/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from features/broadcast/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to features/broadcast/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationRepositoryTupleSwapper.java b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationRepositoryTupleSwapper.java
index 5a7c47d6b51..50ccaff714e 100644
--- a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationRepositoryTupleSwapper.java
+++ b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationRepositoryTupleSwapper.java
@@ -28,7 +28,7 @@ import org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfigur
 import org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfigurationSwapper;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.mode.path.RuleNodePath;
 
 import java.util.Collection;
@@ -43,7 +43,7 @@ import java.util.stream.Collectors;
 /**
  * Encrypt rule configuration repository tuple swapper.
  */
-public final class EncryptRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<EncryptRuleConfiguration> {
+public final class EncryptRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<EncryptRuleConfiguration> {
     
     private final YamlEncryptTableRuleConfigurationSwapper tableSwapper = new YamlEncryptTableRuleConfigurationSwapper();
     
diff --git a/features/encrypt/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/features/encrypt/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from features/encrypt/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to features/encrypt/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/features/mask/core/src/main/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapper.java b/features/mask/core/src/main/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapper.java
index 46c2bbe3b44..9ed31e5bdf9 100644
--- a/features/mask/core/src/main/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapper.java
+++ b/features/mask/core/src/main/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapper.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfigur
 import org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfigurationSwapper;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.mask.api.config.MaskRuleConfiguration;
 import org.apache.shardingsphere.mask.api.config.rule.MaskTableRuleConfiguration;
 import org.apache.shardingsphere.mask.constant.MaskOrder;
@@ -43,7 +43,7 @@ import java.util.stream.Collectors;
 /**
  * Mask rule configuration repository tuple swapper.
  */
-public final class MaskRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<MaskRuleConfiguration> {
+public final class MaskRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<MaskRuleConfiguration> {
     
     private final YamlMaskTableRuleConfigurationSwapper tableSwapper = new YamlMaskTableRuleConfigurationSwapper();
     
diff --git a/features/mask/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/features/mask/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from features/mask/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to features/mask/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper.java b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper.java
index 3e4cdd87f7b..5f91cfd64f3 100644
--- a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper.java
+++ b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper.java
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfigur
 import org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfigurationSwapper;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.mode.path.RuleNodePath;
 import org.apache.shardingsphere.readwritesplitting.api.ReadwriteSplittingRuleConfiguration;
 import org.apache.shardingsphere.readwritesplitting.api.rule.ReadwriteSplittingDataSourceGroupRuleConfiguration;
@@ -44,7 +44,7 @@ import java.util.stream.Collectors;
 /**
  * Readwrite-splitting rule configuration repository tuple swapper.
  */
-public final class ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<ReadwriteSplittingRuleConfiguration> {
+public final class ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<ReadwriteSplittingRuleConfiguration> {
     
     private final YamlAlgorithmConfigurationSwapper algorithmSwapper = new YamlAlgorithmConfigurationSwapper();
     
diff --git a/features/readwrite-splitting/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/features/readwrite-splitting/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from features/readwrite-splitting/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to features/readwrite-splitting/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationRepositoryTupleSwapper.java b/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationRepositoryTupleSwapper.java
index 64640dbc017..e27954a6867 100644
--- a/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationRepositoryTupleSwapper.java
+++ b/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationRepositoryTupleSwapper.java
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfigur
 import org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfigurationSwapper;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.mode.path.RuleNodePath;
 import org.apache.shardingsphere.shadow.api.config.ShadowRuleConfiguration;
 import org.apache.shardingsphere.shadow.api.config.datasource.ShadowDataSourceConfiguration;
@@ -44,7 +44,7 @@ import java.util.stream.Collectors;
 /**
  * Shadow rule configuration repository tuple swapper.
  */
-public final class ShadowRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<ShadowRuleConfiguration> {
+public final class ShadowRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<ShadowRuleConfiguration> {
     
     private final YamlShadowTableConfigurationSwapper tableSwapper = new YamlShadowTableConfigurationSwapper();
     
diff --git a/features/shadow/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/features/shadow/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from features/shadow/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to features/shadow/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationRepositoryTupleSwapper.java b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationRepositoryTupleSwapper.java
index 53dca25f87f..352a5d44095 100644
--- a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationRepositoryTupleSwapper.java
+++ b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationRepositoryTupleSwapper.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfigur
 import org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfigurationSwapper;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.mode.path.RuleNodePath;
 import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
 import org.apache.shardingsphere.sharding.api.config.rule.ShardingAutoTableRuleConfiguration;
@@ -54,7 +54,7 @@ import java.util.stream.Collectors;
 /**
  * Sharding rule configuration repository tuple swapper.
  */
-public final class ShardingRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<ShardingRuleConfiguration> {
+public final class ShardingRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<ShardingRuleConfiguration> {
     
     private final YamlShardingTableRuleConfigurationSwapper tableSwapper = new YamlShardingTableRuleConfigurationSwapper();
     
diff --git a/features/sharding/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/features/sharding/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from features/sharding/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to features/sharding/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/update/rdl/rule/engine/database/type/DropDatabaseRuleOperator.java b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/update/rdl/rule/engine/database/type/DropDatabaseRuleOperator.java
index 495530bdfd1..f81641764fc 100644
--- a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/update/rdl/rule/engine/database/type/DropDatabaseRuleOperator.java
+++ b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/update/rdl/rule/engine/database/type/DropDatabaseRuleOperator.java
@@ -29,7 +29,7 @@ import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.metadata.version.MetaDataVersion;
 import org.apache.shardingsphere.infra.rule.attribute.datasource.StaticDataSourceRuleAttribute;
 import org.apache.shardingsphere.infra.spi.type.ordered.OrderedSPILoader;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.mode.manager.ContextManager;
 
 import java.util.Collection;
@@ -63,7 +63,7 @@ public final class DropDatabaseRuleOperator implements DatabaseRuleOperator {
         modeContextManager.removeRuleConfigurationItem(database.getName(), toBeDroppedRuleConfig);
         RuleConfiguration toBeAlteredRuleConfig = executor.buildToBeAlteredRuleConfiguration(sqlStatement);
         if (null != toBeAlteredRuleConfig && ((DatabaseRuleConfiguration) toBeAlteredRuleConfig).isEmpty()) {
-            OrderedSPILoader.getServices(RepositoryTupleConfigurationSwapper.class, Collections.singleton(currentRuleConfig)).values().stream().findFirst()
+            OrderedSPILoader.getServices(RepositoryTupleSwapper.class, Collections.singleton(currentRuleConfig)).values().stream().findFirst()
                     .ifPresent(optional -> modeContextManager.removeRuleConfiguration(database.getName(), optional.getRuleTagName().toLowerCase()));
             return Collections.emptyList();
         }
diff --git a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json
index 71ff6cbc0bf..a3221a978bc 100644
--- a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json
+++ b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json
@@ -25,8 +25,8 @@
   "name":"org.apache.shardingsphere.authority.yaml.config.YamlAuthorityRuleConfiguration"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeGlobalRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.authority.yaml.swapper.YamlAuthorityDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.authority.yaml.swapper.AuthorityRuleConfigurationRepositoryTupleSwapper"
 },
 {
   "condition":{"typeReachable":"org.apache.shardingsphere.mode.metadata.builder.RuleConfigurationEventBuilder"},
@@ -41,7 +41,7 @@
   "name":"org.apache.shardingsphere.broadcast.rule.builder.BroadcastRuleBuilder"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.broadcast.yaml.swapper.YamlBroadcastDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.broadcast.yaml.swapper.BroadcastRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.broadcast.yaml.config.YamlBroadcastRuleConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getTables","parameterTypes":[] }]
@@ -66,8 +66,8 @@
   "name":"org.apache.shardingsphere.broadcast.yaml.config.YamlBroadcastRuleConfigurationCustomizer"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.broadcast.yaml.swapper.YamlBroadcastDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.broadcast.yaml.swapper.BroadcastRuleConfigurationRepositoryTupleSwapper"
 },
 {
   "condition":{"typeReachable":"org.apache.shardingsphere.infra.database.DatabaseTypeEngine"},
@@ -212,7 +212,7 @@
   "name":"org.apache.shardingsphere.encrypt.yaml.config.rule.YamlEncryptColumnRuleConfigurationCustomizer"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.encrypt.yaml.swapper.YamlEncryptDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.encrypt.yaml.swapper.EncryptRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.encrypt.yaml.config.rule.YamlEncryptTableRuleConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getColumns","parameterTypes":[] }, {"name":"getName","parameterTypes":[] }]
@@ -233,8 +233,8 @@
   "name":"org.apache.shardingsphere.encrypt.yaml.config.rule.YamlEncryptTableRuleConfigurationCustomizer"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.encrypt.yaml.swapper.YamlEncryptDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.encrypt.yaml.swapper.EncryptRuleConfigurationRepositoryTupleSwapper"
 },
 {
   "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"},
@@ -249,11 +249,11 @@
   "name":"org.apache.shardingsphere.globalclock.core.yaml.config.YamlGlobalClockRuleConfiguration"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeGlobalRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.globalclock.core.yaml.swapper.YamlGlobalClockDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.globalclock.core.yaml.swapper.GlobalClockRuleConfigurationRepositoryTupleSwapper"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.encrypt.yaml.swapper.YamlEncryptDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.encrypt.yaml.swapper.EncryptRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getProps","parameterTypes":[] }, {"name":"getType","parameterTypes":[] }]
@@ -266,19 +266,19 @@
   "methods":[{"name":"<init>","parameterTypes":[] }, {"name":"setProps","parameterTypes":["java.util.Properties"] }, {"name":"setType","parameterTypes":["java.lang.String"] }]
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.mask.yaml.swapper.YamlMaskDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.mask.yaml.swapper.MaskRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getProps","parameterTypes":[] }, {"name":"getType","parameterTypes":[] }]
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.shadow.yaml.swapper.YamlShadowDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.shadow.yaml.swapper.ShadowRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getProps","parameterTypes":[] }, {"name":"getType","parameterTypes":[] }]
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sharding.yaml.swapper.YamlShardingDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.sharding.yaml.swapper.ShardingRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getProps","parameterTypes":[] }, {"name":"getType","parameterTypes":[] }]
@@ -717,8 +717,8 @@
   "name":"org.apache.shardingsphere.logging.yaml.config.YamlLoggingRuleConfiguration"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeGlobalRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.logging.yaml.swapper.YamlLoggingDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.logging.yaml.swapper.LoggingRuleConfigurationRepositoryTupleSwapper"
 },
 {
   "condition":{"typeReachable":"org.apache.shardingsphere.mask.checker.MaskRuleConfigurationChecker"},
@@ -858,7 +858,7 @@
   "methods":[{"name":"<init>","parameterTypes":[] }, {"name":"setColumns","parameterTypes":["java.util.Map"] }]
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.mask.yaml.swapper.YamlMaskDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.mask.yaml.swapper.MaskRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.mask.yaml.config.rule.YamlMaskTableRuleConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getColumns","parameterTypes":[] }, {"name":"getName","parameterTypes":[] }]
@@ -872,8 +872,8 @@
   "name":"org.apache.shardingsphere.mask.yaml.config.rule.YamlMaskTableRuleConfigurationCustomizer"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.mask.yaml.swapper.YamlMaskDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.mask.yaml.swapper.MaskRuleConfigurationRepositoryTupleSwapper"
 },
 {
   "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"},
@@ -1074,7 +1074,7 @@
   "name":"org.apache.shardingsphere.parser.yaml.config.YamlSQLParserRuleConfiguration"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.parser.yaml.swapper.YamlSQLParserDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.parser.yaml.swapper.SQLParserRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.parser.yaml.config.YamlSQLParserRuleConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getParseTreeCache","parameterTypes":[] }, {"name":"getSqlStatementCache","parameterTypes":[] }]
@@ -1088,8 +1088,8 @@
   "name":"org.apache.shardingsphere.parser.yaml.config.YamlSQLParserRuleConfigurationCustomizer"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeGlobalRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.parser.yaml.swapper.YamlSQLParserDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.parser.yaml.swapper.SQLParserRuleConfigurationRepositoryTupleSwapper"
 },
 {
   "condition":{"typeReachable":"org.apache.shardingsphere.infra.spi.type.ordered.OrderedSPILoader"},
@@ -1142,7 +1142,7 @@
   "methods":[{"name":"<init>","parameterTypes":[] }, {"name":"setReadDataSourceNames","parameterTypes":["java.util.List"] }, {"name":"setWriteDataSourceName","parameterTypes":["java.lang.String"] }]
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.readwritesplitting.yaml.swapper.YamlReadwriteSplittingDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.readwritesplitting.yaml.swapper.ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceGroupRuleConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getLoadBalancerName","parameterTypes":[] }, {"name":"getReadDataSourceNames","parameterTypes":[] }, {"name":"getTransactionalReadQueryStrategy","parameterTypes":[] }, {"name":"getWriteDataSourceName","parameterTypes":[] }]
@@ -1156,8 +1156,8 @@
   "name":"org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceGroupRuleConfigurationCustomizer"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.readwritesplitting.yaml.swapper.YamlReadwriteSplittingDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.readwritesplitting.yaml.swapper.ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper"
 },
 {
   "condition":{"typeReachable":"org.apache.shardingsphere.shadow.checker.ShadowRuleConfigurationChecker"},
@@ -1236,7 +1236,7 @@
   "methods":[{"name":"<init>","parameterTypes":[] }, {"name":"setProductionDataSourceName","parameterTypes":["java.lang.String"] }, {"name":"setShadowDataSourceName","parameterTypes":["java.lang.String"] }]
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.shadow.yaml.swapper.YamlShadowDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.shadow.yaml.swapper.ShadowRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.shadow.yaml.config.datasource.YamlShadowDataSourceConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getProductionDataSourceName","parameterTypes":[] }, {"name":"getShadowDataSourceName","parameterTypes":[] }]
@@ -1257,7 +1257,7 @@
   "methods":[{"name":"<init>","parameterTypes":[] }, {"name":"setDataSourceNames","parameterTypes":["java.util.Collection"] }, {"name":"setShadowAlgorithmNames","parameterTypes":["java.util.Collection"] }]
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.shadow.yaml.swapper.YamlShadowDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.shadow.yaml.swapper.ShadowRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.shadow.yaml.config.table.YamlShadowTableConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getDataSourceNames","parameterTypes":[] }, {"name":"getShadowAlgorithmNames","parameterTypes":[] }]
@@ -1271,8 +1271,8 @@
   "name":"org.apache.shardingsphere.shadow.yaml.config.table.YamlShadowTableConfigurationCustomizer"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.shadow.yaml.swapper.YamlShadowDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.shadow.yaml.swapper.ShadowRuleConfigurationRepositoryTupleSwapper"
 },
 {
   "condition":{"typeReachable":"org.apache.shardingsphere.sharding.rule.ShardingRule"},
@@ -1442,7 +1442,7 @@
   "methods":[{"name":"<init>","parameterTypes":[] }, {"name":"setActualDataNodes","parameterTypes":["java.lang.String"] }, {"name":"setKeyGenerateStrategy","parameterTypes":["org.apache.shardingsphere.sharding.yaml.config.strategy.keygen.YamlKeyGenerateStrategyConfiguration"] }]
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sharding.yaml.swapper.YamlShardingDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.sharding.yaml.swapper.ShardingRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.sharding.yaml.config.rule.YamlTableRuleConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getActualDataNodes","parameterTypes":[] }, {"name":"getAuditStrategy","parameterTypes":[] }, {"name":"getDatabaseStrategy","parameterTypes":[] }, {"name":"getKeyGenerateStrategy","parameterTypes":[] }, {"name":"getLogicTable","parameterTypes":[] }, {"name":"getTableStrategy","parameterTypes":[] }]
@@ -1483,7 +1483,7 @@
   "methods":[{"name":"<init>","parameterTypes":[] }, {"name":"setStandard","parameterTypes":["org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlStandardShardingStrategyConfiguration"] }]
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.sharding.yaml.swapper.YamlShardingDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.sharding.yaml.swapper.ShardingRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getComplex","parameterTypes":[] }, {"name":"getHint","parameterTypes":[] }, {"name":"getNone","parameterTypes":[] }, {"name":"getStandard","parameterTypes":[] }]
@@ -1516,8 +1516,8 @@
   "name":"org.apache.shardingsphere.sharding.yaml.engine.construct.NoneShardingStrategyConfigurationYamlConstruct"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.sharding.yaml.swapper.YamlShardingDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.sharding.yaml.swapper.ShardingRuleConfigurationRepositoryTupleSwapper"
 },
 {
   "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.engine.SQLFederationEngine"},
@@ -1557,7 +1557,7 @@
   "queryAllPublicMethods":true
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.single.yaml.config.swapper.YamlSingleDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.single.yaml.config.swapper.SingleRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.single.yaml.config.pojo.YamlSingleRuleConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getDefaultDataSource","parameterTypes":[] }, {"name":"getTables","parameterTypes":[] }]
@@ -1571,8 +1571,8 @@
   "name":"org.apache.shardingsphere.single.yaml.config.pojo.YamlSingleRuleConfigurationCustomizer"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.single.yaml.config.swapper.YamlSingleDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.single.yaml.config.swapper.SingleRuleConfigurationRepositoryTupleSwapper"
 },
 {
   "condition":{"typeReachable":"org.apache.shardingsphere.sql.parser.core.database.cache.ParseTreeCacheBuilder"},
@@ -1789,8 +1789,8 @@
   "name":"org.apache.shardingsphere.sqlfederation.yaml.config.YamlSQLFederationRuleConfiguration"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeGlobalRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.sqlfederation.yaml.swapper.YamlSQLFederationDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.sqlfederation.yaml.swapper.SQLFederationRuleConfigurationRepositoryTupleSwapper"
 },
 {
   "condition":{"typeReachable":"org.apache.shardingsphere.sqltranslator.rule.SQLTranslatorRule"},
@@ -1809,8 +1809,8 @@
   "name":"org.apache.shardingsphere.sqltranslator.yaml.config.YamlSQLTranslatorRuleConfiguration"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeGlobalRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.sqltranslator.yaml.swapper.YamlSQLTranslatorDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.sqltranslator.yaml.swapper.SQLTranslatorRuleConfigurationRepositoryTupleSwapper"
 },
 {
   "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"},
@@ -1838,8 +1838,8 @@
   "name":"org.apache.shardingsphere.traffic.yaml.config.YamlTrafficRuleConfiguration"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeGlobalRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.traffic.yaml.swapper.YamlTrafficDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.traffic.yaml.swapper.TrafficRuleConfigurationRepositoryTupleSwapper"
 },
 {
   "condition":{"typeReachable":"org.apache.shardingsphere.transaction.ShardingSphereTransactionManagerEngine"},
@@ -1896,7 +1896,7 @@
   "name":"org.apache.shardingsphere.transaction.yaml.config.YamlTransactionRuleConfiguration"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.transaction.yaml.swapper.YamlTransactionDataNodeRuleConfigurationSwapper"},
+  "condition":{"typeReachable":"org.apache.shardingsphere.transaction.yaml.swapper.TransactionRuleConfigurationRepositoryTupleSwapper"},
   "name":"org.apache.shardingsphere.transaction.yaml.config.YamlTransactionRuleConfiguration",
   "allDeclaredFields":true,
   "methods":[{"name":"getDefaultType","parameterTypes":[] }, {"name":"getProps","parameterTypes":[] }, {"name":"getProviderType","parameterTypes":[] }]
@@ -1910,7 +1910,7 @@
   "name":"org.apache.shardingsphere.transaction.yaml.config.YamlTransactionRuleConfigurationCustomizer"
 },
 {
-  "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeGlobalRuleConfigurationSwapperEngine"},
-  "name":"org.apache.shardingsphere.transaction.yaml.swapper.YamlTransactionDataNodeRuleConfigurationSwapper"
+  "condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine"},
+  "name":"org.apache.shardingsphere.transaction.yaml.swapper.TransactionRuleConfigurationRepositoryTupleSwapper"
 }
 ]
diff --git a/kernel/authority/core/src/main/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationRepositoryTupleSwapper.java b/kernel/authority/core/src/main/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationRepositoryTupleSwapper.java
index acc217bf280..3a93769c62c 100644
--- a/kernel/authority/core/src/main/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationRepositoryTupleSwapper.java
+++ b/kernel/authority/core/src/main/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationRepositoryTupleSwapper.java
@@ -27,7 +27,7 @@ import org.apache.shardingsphere.infra.config.nodepath.GlobalNodePath;
 import org.apache.shardingsphere.infra.metadata.user.ShardingSphereUser;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 
 import java.util.Collection;
 import java.util.Collections;
@@ -39,7 +39,7 @@ import java.util.stream.Collectors;
 /**
  * Authority rule configuration repository tuple swapper.
  */
-public final class AuthorityRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<AuthorityRuleConfiguration> {
+public final class AuthorityRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<AuthorityRuleConfiguration> {
     
     private final YamlUserSwapper userSwapper = new YamlUserSwapper();
     
diff --git a/kernel/authority/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/kernel/authority/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from kernel/authority/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to kernel/authority/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/core/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapper.java b/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/core/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapper.java
index 2e1bb3cf38a..ec722db3303 100644
--- a/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/core/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapper.java
+++ b/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/core/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapper.java
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.globalclock.core.yaml.config.YamlGlobalClockRul
 import org.apache.shardingsphere.infra.config.nodepath.GlobalNodePath;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 
 import java.util.Collection;
 import java.util.Collections;
@@ -33,7 +33,7 @@ import java.util.Properties;
 /**
  * Global clock rule configuration repository tuple swapper.
  */
-public final class GlobalClockRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<GlobalClockRuleConfiguration> {
+public final class GlobalClockRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<GlobalClockRuleConfiguration> {
     
     @Override
     public Collection<RepositoryTuple> swapToRepositoryTuples(final GlobalClockRuleConfiguration data) {
diff --git a/kernel/global-clock/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/kernel/global-clock/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from kernel/global-clock/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to kernel/global-clock/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/kernel/logging/core/src/main/java/org/apache/shardingsphere/logging/yaml/swapper/LoggingRuleConfigurationRepositoryTupleSwapper.java b/kernel/logging/core/src/main/java/org/apache/shardingsphere/logging/yaml/swapper/LoggingRuleConfigurationRepositoryTupleSwapper.java
index 8d6c0f64369..8bf61b1f04e 100644
--- a/kernel/logging/core/src/main/java/org/apache/shardingsphere/logging/yaml/swapper/LoggingRuleConfigurationRepositoryTupleSwapper.java
+++ b/kernel/logging/core/src/main/java/org/apache/shardingsphere/logging/yaml/swapper/LoggingRuleConfigurationRepositoryTupleSwapper.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.logging.yaml.swapper;
 import org.apache.shardingsphere.infra.config.nodepath.GlobalNodePath;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.logging.config.LoggingRuleConfiguration;
 import org.apache.shardingsphere.logging.constant.LoggingOrder;
 import org.apache.shardingsphere.logging.rule.builder.DefaultLoggingRuleConfigurationBuilder;
@@ -35,7 +35,7 @@ import java.util.Optional;
 /**
  * Logging rule configuration repository tuple swapper.
  */
-public final class LoggingRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<LoggingRuleConfiguration> {
+public final class LoggingRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<LoggingRuleConfiguration> {
     
     @Override
     public Collection<RepositoryTuple> swapToRepositoryTuples(final LoggingRuleConfiguration data) {
diff --git a/kernel/logging/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/kernel/logging/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from kernel/logging/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to kernel/logging/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/yaml/config/swapper/rule/YamlDataNodeRuleConfigurationSwapperEngine.java b/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/RepositoryTupleSwapperEngine.java
similarity index 70%
rename from infra/common/src/main/java/org/apache/shardingsphere/infra/yaml/config/swapper/rule/YamlDataNodeRuleConfigurationSwapperEngine.java
rename to kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/RepositoryTupleSwapperEngine.java
index 505f8e063f7..a47c441a565 100644
--- a/infra/common/src/main/java/org/apache/shardingsphere/infra/yaml/config/swapper/rule/YamlDataNodeRuleConfigurationSwapperEngine.java
+++ b/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/RepositoryTupleSwapperEngine.java
@@ -15,47 +15,51 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.infra.yaml.config.swapper.rule;
+package org.apache.shardingsphere.metadata.persist.service.config;
 
 import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
 import org.apache.shardingsphere.infra.spi.type.ordered.OrderedSPILoader;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 
 import java.util.Collection;
+import java.util.Collections;
 import java.util.LinkedList;
 import java.util.Optional;
 
 /**
- * YAML data node rule configuration swapper engine.
+ * Repository tuple swapper engine.
  */
-public final class YamlDataNodeRuleConfigurationSwapperEngine {
+public final class RepositoryTupleSwapperEngine {
     
     /**
-     * Swap from YAML global rule configurations to rule configurations.
+     * Swap to rule configurations.
      *
      * @param repositoryTuples repository tuples
      * @return global rule configurations
      */
     @SuppressWarnings({"unchecked", "rawtypes"})
     public Collection<RuleConfiguration> swapToRuleConfigurations(final Collection<RepositoryTuple> repositoryTuples) {
+        if (repositoryTuples.isEmpty()) {
+            return Collections.emptyList();
+        }
         Collection<RuleConfiguration> result = new LinkedList<>();
-        for (RepositoryTupleConfigurationSwapper each : OrderedSPILoader.getServices(RepositoryTupleConfigurationSwapper.class)) {
+        for (RepositoryTupleSwapper each : OrderedSPILoader.getServices(RepositoryTupleSwapper.class)) {
             each.swapToObject(repositoryTuples).ifPresent(optional -> result.add((RuleConfiguration) optional));
         }
         return result;
     }
     
     /**
-     * Swap from single YAML global rule configuration to rule configurations.
+     * Swap to rule configuration.
      *
      * @param ruleName rule name
      * @param repositoryTuples repository tuples
      * @return global rule configuration
      */
     @SuppressWarnings({"unchecked", "rawtypes"})
-    public Optional<RuleConfiguration> swapSingleRuleToRuleConfiguration(final String ruleName, final Collection<RepositoryTuple> repositoryTuples) {
-        for (RepositoryTupleConfigurationSwapper each : OrderedSPILoader.getServices(RepositoryTupleConfigurationSwapper.class)) {
+    public Optional<RuleConfiguration> swapToRuleConfiguration(final String ruleName, final Collection<RepositoryTuple> repositoryTuples) {
+        for (RepositoryTupleSwapper each : OrderedSPILoader.getServices(RepositoryTupleSwapper.class)) {
             if (ruleName.equals(each.getRuleTagName().toLowerCase())) {
                 return each.swapToObject(repositoryTuples);
             }
diff --git a/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/database/rule/DatabaseRulePersistService.java b/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/database/rule/DatabaseRulePersistService.java
index a89fbe6389f..9df73a2c47c 100644
--- a/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/database/rule/DatabaseRulePersistService.java
+++ b/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/database/rule/DatabaseRulePersistService.java
@@ -22,8 +22,8 @@ import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
 import org.apache.shardingsphere.infra.metadata.version.MetaDataVersion;
 import org.apache.shardingsphere.infra.spi.type.ordered.OrderedSPILoader;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
-import org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeRuleConfigurationSwapperEngine;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
+import org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine;
 import org.apache.shardingsphere.metadata.persist.node.metadata.DatabaseRuleMetaDataNode;
 import org.apache.shardingsphere.metadata.persist.service.config.RepositoryTuplePersistService;
 import org.apache.shardingsphere.metadata.persist.service.config.database.DatabaseBasedPersistService;
@@ -54,7 +54,7 @@ public final class DatabaseRulePersistService implements DatabaseBasedPersistSer
     @SuppressWarnings({"unchecked", "rawtypes"})
     @Override
     public void persist(final String databaseName, final Collection<RuleConfiguration> configs) {
-        for (Entry<RuleConfiguration, RepositoryTupleConfigurationSwapper> entry : OrderedSPILoader.getServices(RepositoryTupleConfigurationSwapper.class, configs).entrySet()) {
+        for (Entry<RuleConfiguration, RepositoryTupleSwapper> entry : OrderedSPILoader.getServices(RepositoryTupleSwapper.class, configs).entrySet()) {
             Collection<RepositoryTuple> repositoryTuples = entry.getValue().swapToRepositoryTuples(entry.getKey());
             if (!repositoryTuples.isEmpty()) {
                 persistDataNodes(databaseName, entry.getValue().getRuleTagName().toLowerCase(), repositoryTuples);
@@ -64,8 +64,7 @@ public final class DatabaseRulePersistService implements DatabaseBasedPersistSer
     
     @Override
     public Collection<RuleConfiguration> load(final String databaseName) {
-        Collection<RepositoryTuple> repositoryTuples = repositoryTuplePersistService.loadRepositoryTuples(DatabaseRuleMetaDataNode.getRulesNode(databaseName));
-        return repositoryTuples.isEmpty() ? Collections.emptyList() : new YamlDataNodeRuleConfigurationSwapperEngine().swapToRuleConfigurations(repositoryTuples);
+        return new RepositoryTupleSwapperEngine().swapToRuleConfigurations(repositoryTuplePersistService.loadRepositoryTuples(DatabaseRuleMetaDataNode.getRulesNode(databaseName)));
     }
     
     @Override
@@ -77,7 +76,7 @@ public final class DatabaseRulePersistService implements DatabaseBasedPersistSer
     @Override
     public Collection<MetaDataVersion> persistConfigurations(final String databaseName, final Collection<RuleConfiguration> configs) {
         Collection<MetaDataVersion> result = new LinkedList<>();
-        for (Entry<RuleConfiguration, RepositoryTupleConfigurationSwapper> entry : OrderedSPILoader.getServices(RepositoryTupleConfigurationSwapper.class, configs).entrySet()) {
+        for (Entry<RuleConfiguration, RepositoryTupleSwapper> entry : OrderedSPILoader.getServices(RepositoryTupleSwapper.class, configs).entrySet()) {
             Collection<RepositoryTuple> repositoryTuples = entry.getValue().swapToRepositoryTuples(entry.getKey());
             if (!repositoryTuples.isEmpty()) {
                 result.addAll(persistDataNodes(databaseName, entry.getValue().getRuleTagName().toLowerCase(), repositoryTuples));
@@ -104,7 +103,7 @@ public final class DatabaseRulePersistService implements DatabaseBasedPersistSer
     @Override
     public Collection<MetaDataVersion> deleteConfigurations(final String databaseName, final Collection<RuleConfiguration> configs) {
         Collection<MetaDataVersion> result = new LinkedList<>();
-        for (Entry<RuleConfiguration, RepositoryTupleConfigurationSwapper> entry : OrderedSPILoader.getServices(RepositoryTupleConfigurationSwapper.class, configs).entrySet()) {
+        for (Entry<RuleConfiguration, RepositoryTupleSwapper> entry : OrderedSPILoader.getServices(RepositoryTupleSwapper.class, configs).entrySet()) {
             Collection<RepositoryTuple> repositoryTuples = entry.getValue().swapToRepositoryTuples(entry.getKey());
             if (repositoryTuples.isEmpty()) {
                 continue;
diff --git a/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/global/GlobalPersistService.java b/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/global/GlobalPersistService.java
index fbe10f83ab2..cbda2153d0c 100644
--- a/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/global/GlobalPersistService.java
+++ b/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/global/GlobalPersistService.java
@@ -19,6 +19,8 @@ package org.apache.shardingsphere.metadata.persist.service.config.global;
 
 import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
 
+import java.util.Optional;
+
 /**
  * Global persist service.
  * 
@@ -46,7 +48,7 @@ public interface GlobalPersistService<T> {
      * @param ruleName rule name
      * @return single rule configuration
      */
-    default RuleConfiguration load(final String ruleName) {
-        return null;
+    default Optional<RuleConfiguration> load(final String ruleName) {
+        return Optional.empty();
     }
 }
diff --git a/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/global/GlobalRulePersistService.java b/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/global/GlobalRulePersistService.java
index 409e13d5d3e..a8dd687d47f 100644
--- a/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/global/GlobalRulePersistService.java
+++ b/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/service/config/global/GlobalRulePersistService.java
@@ -22,18 +22,18 @@ import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
 import org.apache.shardingsphere.infra.metadata.version.MetaDataVersion;
 import org.apache.shardingsphere.infra.spi.type.ordered.OrderedSPILoader;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
-import org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeRuleConfigurationSwapperEngine;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
+import org.apache.shardingsphere.metadata.persist.service.config.RepositoryTupleSwapperEngine;
 import org.apache.shardingsphere.metadata.persist.node.GlobalNode;
 import org.apache.shardingsphere.metadata.persist.service.config.RepositoryTuplePersistService;
 import org.apache.shardingsphere.metadata.persist.service.version.MetaDataVersionPersistService;
 import org.apache.shardingsphere.mode.spi.PersistRepository;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map.Entry;
+import java.util.Optional;
 
 /**
  * Global rule persist service.
@@ -58,7 +58,7 @@ public final class GlobalRulePersistService implements GlobalPersistService<Coll
     @Override
     public void persist(final Collection<RuleConfiguration> globalRuleConfigs) {
         Collection<MetaDataVersion> metaDataVersions = new LinkedList<>();
-        for (Entry<RuleConfiguration, RepositoryTupleConfigurationSwapper> entry : OrderedSPILoader.getServices(RepositoryTupleConfigurationSwapper.class, globalRuleConfigs).entrySet()) {
+        for (Entry<RuleConfiguration, RepositoryTupleSwapper> entry : OrderedSPILoader.getServices(RepositoryTupleSwapper.class, globalRuleConfigs).entrySet()) {
             Collection<RepositoryTuple> repositoryTuples = entry.getValue().swapToRepositoryTuples(entry.getKey());
             if (!repositoryTuples.isEmpty()) {
                 metaDataVersions.addAll(persistTuples(repositoryTuples));
@@ -83,13 +83,11 @@ public final class GlobalRulePersistService implements GlobalPersistService<Coll
     
     @Override
     public Collection<RuleConfiguration> load() {
-        Collection<RepositoryTuple> repositoryTuples = repositoryTuplePersistService.loadRepositoryTuples(GlobalNode.getGlobalRuleRootNode());
-        return repositoryTuples.isEmpty() ? Collections.emptyList() : new YamlDataNodeRuleConfigurationSwapperEngine().swapToRuleConfigurations(repositoryTuples);
+        return new RepositoryTupleSwapperEngine().swapToRuleConfigurations(repositoryTuplePersistService.loadRepositoryTuples(GlobalNode.getGlobalRuleRootNode()));
     }
     
     @Override
-    public RuleConfiguration load(final String ruleName) {
-        Collection<RepositoryTuple> repositoryTuples = repositoryTuplePersistService.loadRepositoryTuples(GlobalNode.getGlobalRuleNode(ruleName));
-        return new YamlDataNodeRuleConfigurationSwapperEngine().swapSingleRuleToRuleConfiguration(ruleName, repositoryTuples).orElse(null);
+    public Optional<RuleConfiguration> load(final String ruleName) {
+        return new RepositoryTupleSwapperEngine().swapToRuleConfiguration(ruleName, repositoryTuplePersistService.loadRepositoryTuples(GlobalNode.getGlobalRuleNode(ruleName)));
     }
 }
diff --git a/kernel/single/core/src/main/java/org/apache/shardingsphere/single/yaml/config/swapper/SingleRuleConfigurationRepositoryTupleSwapper.java b/kernel/single/core/src/main/java/org/apache/shardingsphere/single/yaml/config/swapper/SingleRuleConfigurationRepositoryTupleSwapper.java
index 23ad13165a5..503d6a337a7 100644
--- a/kernel/single/core/src/main/java/org/apache/shardingsphere/single/yaml/config/swapper/SingleRuleConfigurationRepositoryTupleSwapper.java
+++ b/kernel/single/core/src/main/java/org/apache/shardingsphere/single/yaml/config/swapper/SingleRuleConfigurationRepositoryTupleSwapper.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.single.yaml.config.swapper;
 
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.mode.path.RuleNodePath;
 import org.apache.shardingsphere.single.api.config.SingleRuleConfiguration;
 import org.apache.shardingsphere.single.constant.SingleOrder;
@@ -34,7 +34,7 @@ import java.util.stream.Collectors;
 /**
  * Single rule configuration repository tuple swapper.
  */
-public final class SingleRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<SingleRuleConfiguration> {
+public final class SingleRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<SingleRuleConfiguration> {
     
     private final RuleNodePath singleRuleNodePath = new SingleRuleNodePathProvider().getRuleNodePath();
     
diff --git a/kernel/single/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/kernel/single/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from kernel/single/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to kernel/single/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/yaml/swapper/SQLFederationRuleConfigurationRepositoryTupleSwapper.java b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/yaml/swapper/SQLFederationRuleConfigurationRepositoryTupleSwapper.java
index 8d460614945..e651ee170b1 100644
--- a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/yaml/swapper/SQLFederationRuleConfigurationRepositoryTupleSwapper.java
+++ b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/yaml/swapper/SQLFederationRuleConfigurationRepositoryTupleSwapper.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.sqlfederation.yaml.swapper;
 import org.apache.shardingsphere.infra.config.nodepath.GlobalNodePath;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.sql.parser.api.CacheOption;
 import org.apache.shardingsphere.sqlfederation.api.config.SQLFederationRuleConfiguration;
 import org.apache.shardingsphere.sqlfederation.constant.SQLFederationOrder;
@@ -33,7 +33,7 @@ import java.util.Optional;
 /**
  * SQL federation rule configuration repository tuple swapper.
  */
-public final class SQLFederationRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<SQLFederationRuleConfiguration> {
+public final class SQLFederationRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<SQLFederationRuleConfiguration> {
     
     private final YamlSQLFederationExecutionPlanCacheConfigurationSwapper executionPlanCacheConfigSwapper = new YamlSQLFederationExecutionPlanCacheConfigurationSwapper();
     
diff --git a/kernel/sql-federation/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/kernel/sql-federation/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from kernel/sql-federation/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to kernel/sql-federation/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/kernel/sql-parser/core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationRepositoryTupleSwapper.java b/kernel/sql-parser/core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationRepositoryTupleSwapper.java
index 522115e1cbc..30a271ad897 100644
--- a/kernel/sql-parser/core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationRepositoryTupleSwapper.java
+++ b/kernel/sql-parser/core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationRepositoryTupleSwapper.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.parser.yaml.swapper;
 import org.apache.shardingsphere.infra.config.nodepath.GlobalNodePath;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.parser.config.SQLParserRuleConfiguration;
 import org.apache.shardingsphere.parser.constant.SQLParserOrder;
 import org.apache.shardingsphere.parser.rule.builder.DefaultSQLParserRuleConfigurationBuilder;
@@ -34,7 +34,7 @@ import java.util.Optional;
 /**
  * SQL parser rule configuration repository tuple swapper.
  */
-public final class SQLParserRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<SQLParserRuleConfiguration> {
+public final class SQLParserRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<SQLParserRuleConfiguration> {
     
     private final YamlSQLParserCacheOptionConfigurationSwapper cacheOptionSwapper = new YamlSQLParserCacheOptionConfigurationSwapper();
     
diff --git a/kernel/sql-parser/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/kernel/sql-parser/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from kernel/sql-parser/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to kernel/sql-parser/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/kernel/sql-translator/core/src/main/java/org/apache/shardingsphere/sqltranslator/yaml/swapper/SQLTranslatorRuleConfigurationRepositoryTupleSwapper.java b/kernel/sql-translator/core/src/main/java/org/apache/shardingsphere/sqltranslator/yaml/swapper/SQLTranslatorRuleConfigurationRepositoryTupleSwapper.java
index 0dbf846db41..22e0674af28 100644
--- a/kernel/sql-translator/core/src/main/java/org/apache/shardingsphere/sqltranslator/yaml/swapper/SQLTranslatorRuleConfigurationRepositoryTupleSwapper.java
+++ b/kernel/sql-translator/core/src/main/java/org/apache/shardingsphere/sqltranslator/yaml/swapper/SQLTranslatorRuleConfigurationRepositoryTupleSwapper.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.sqltranslator.yaml.swapper;
 import org.apache.shardingsphere.infra.config.nodepath.GlobalNodePath;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.sqltranslator.api.config.SQLTranslatorRuleConfiguration;
 import org.apache.shardingsphere.sqltranslator.constant.SQLTranslatorOrder;
 import org.apache.shardingsphere.sqltranslator.yaml.config.YamlSQLTranslatorRuleConfiguration;
@@ -32,7 +32,7 @@ import java.util.Optional;
 /**
  * SQL translator rule configuration repository tuple swapper.
  */
-public final class SQLTranslatorRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<SQLTranslatorRuleConfiguration> {
+public final class SQLTranslatorRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<SQLTranslatorRuleConfiguration> {
     
     @Override
     public Collection<RepositoryTuple> swapToRepositoryTuples(final SQLTranslatorRuleConfiguration data) {
diff --git a/kernel/sql-translator/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/kernel/sql-translator/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from kernel/sql-translator/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to kernel/sql-translator/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/kernel/traffic/core/src/main/java/org/apache/shardingsphere/traffic/yaml/swapper/TrafficRuleConfigurationRepositoryTupleSwapper.java b/kernel/traffic/core/src/main/java/org/apache/shardingsphere/traffic/yaml/swapper/TrafficRuleConfigurationRepositoryTupleSwapper.java
index c674c4f34e6..d09af570565 100644
--- a/kernel/traffic/core/src/main/java/org/apache/shardingsphere/traffic/yaml/swapper/TrafficRuleConfigurationRepositoryTupleSwapper.java
+++ b/kernel/traffic/core/src/main/java/org/apache/shardingsphere/traffic/yaml/swapper/TrafficRuleConfigurationRepositoryTupleSwapper.java
@@ -21,7 +21,7 @@ import org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfigur
 import org.apache.shardingsphere.infra.config.nodepath.GlobalNodePath;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.traffic.api.config.TrafficRuleConfiguration;
 import org.apache.shardingsphere.traffic.constant.TrafficOrder;
 import org.apache.shardingsphere.traffic.yaml.config.YamlTrafficRuleConfiguration;
@@ -35,7 +35,7 @@ import java.util.Optional;
 /**
  * Traffic rule configuration repository tuple swapper.
  */
-public final class TrafficRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<TrafficRuleConfiguration> {
+public final class TrafficRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<TrafficRuleConfiguration> {
     
     private final YamlTrafficStrategyConfigurationSwapper strategySwapper = new YamlTrafficStrategyConfigurationSwapper();
     
diff --git a/kernel/traffic/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/kernel/traffic/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from kernel/traffic/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to kernel/traffic/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/yaml/swapper/TransactionRuleConfigurationRepositoryTupleSwapper.java b/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/yaml/swapper/TransactionRuleConfigurationRepositoryTupleSwapper.java
index a8d306b185e..293c9bfaeaa 100644
--- a/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/yaml/swapper/TransactionRuleConfigurationRepositoryTupleSwapper.java
+++ b/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/yaml/swapper/TransactionRuleConfigurationRepositoryTupleSwapper.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.transaction.yaml.swapper;
 import org.apache.shardingsphere.infra.config.nodepath.GlobalNodePath;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.transaction.config.TransactionRuleConfiguration;
 import org.apache.shardingsphere.transaction.constant.TransactionOrder;
 import org.apache.shardingsphere.transaction.yaml.config.YamlTransactionRuleConfiguration;
@@ -33,7 +33,7 @@ import java.util.Properties;
 /**
  * Transaction rule configuration repository tuple swapper.
  */
-public final class TransactionRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleConfigurationSwapper<TransactionRuleConfiguration> {
+public final class TransactionRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<TransactionRuleConfiguration> {
     
     @Override
     public Collection<RepositoryTuple> swapToRepositoryTuples(final TransactionRuleConfiguration data) {
diff --git a/kernel/transaction/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper b/kernel/transaction/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
similarity index 100%
rename from kernel/transaction/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper
rename to kernel/transaction/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
diff --git a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/yaml/swapper/RepositoryTupleConfigurationSwapper.java b/mode/api/src/main/java/org/apache/shardingsphere/mode/spi/RepositoryTupleSwapper.java
similarity index 90%
rename from infra/util/src/main/java/org/apache/shardingsphere/infra/util/yaml/swapper/RepositoryTupleConfigurationSwapper.java
rename to mode/api/src/main/java/org/apache/shardingsphere/mode/spi/RepositoryTupleSwapper.java
index 5a7fcd94d0f..f7e7a07a0ca 100644
--- a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/yaml/swapper/RepositoryTupleConfigurationSwapper.java
+++ b/mode/api/src/main/java/org/apache/shardingsphere/mode/spi/RepositoryTupleSwapper.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.infra.util.yaml.swapper;
+package org.apache.shardingsphere.mode.spi;
 
 import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;
 import org.apache.shardingsphere.infra.spi.type.ordered.OrderedSPI;
@@ -25,12 +25,12 @@ import java.util.Collection;
 import java.util.Optional;
 
 /**
- * Repository tuple configuration swapper.
+ * Repository tuple swapper.
  *
  * @param <T> type of swapped object
  */
 @SingletonSPI
-public interface RepositoryTupleConfigurationSwapper<T> extends OrderedSPI<T> {
+public interface RepositoryTupleSwapper<T> extends OrderedSPI<T> {
     
     /**
     * Swap to repository tuples.
diff --git a/mode/core/src/main/java/org/apache/shardingsphere/mode/manager/context/ConfigurationContextManager.java b/mode/core/src/main/java/org/apache/shardingsphere/mode/manager/context/ConfigurationContextManager.java
index e51de82025e..60e1e477734 100644
--- a/mode/core/src/main/java/org/apache/shardingsphere/mode/manager/context/ConfigurationContextManager.java
+++ b/mode/core/src/main/java/org/apache/shardingsphere/mode/manager/context/ConfigurationContextManager.java
@@ -39,7 +39,7 @@ import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
 import org.apache.shardingsphere.infra.rule.builder.database.DatabaseRulesBuilder;
 import org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder;
 import org.apache.shardingsphere.infra.spi.type.ordered.OrderedSPILoader;
-import org.apache.shardingsphere.infra.util.yaml.swapper.RepositoryTupleConfigurationSwapper;
+import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
 import org.apache.shardingsphere.metadata.factory.ExternalMetaDataFactory;
 import org.apache.shardingsphere.metadata.factory.InternalMetaDataFactory;
 import org.apache.shardingsphere.metadata.persist.MetaDataBasedPersistService;
@@ -376,8 +376,8 @@ public final class ConfigurationContextManager {
     @SuppressWarnings("rawtypes")
     @SneakyThrows(Exception.class)
     private void closeStaleTransactionRule(final RuleConfiguration ruleConfig) {
-        for (Entry<RuleConfiguration, RepositoryTupleConfigurationSwapper> entry : OrderedSPILoader.getServices(
-                RepositoryTupleConfigurationSwapper.class, Collections.singleton(ruleConfig)).entrySet()) {
+        for (Entry<RuleConfiguration, RepositoryTupleSwapper> entry : OrderedSPILoader.getServices(
+                RepositoryTupleSwapper.class, Collections.singleton(ruleConfig)).entrySet()) {
             if ("transaction".equalsIgnoreCase(entry.getValue().getRuleTagName())) {
                 Optional<TransactionRule> transactionRule = metaDataContexts.get().getMetaData().getGlobalRuleMetaData().findSingleRule(TransactionRule.class);
                 if (!transactionRule.isPresent()) {
diff --git a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ConfigurationChangedSubscriber.java b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ConfigurationChangedSubscriber.java
index 562e469ab91..d1ff3d8dc4d 100644
--- a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ConfigurationChangedSubscriber.java
+++ b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ConfigurationChangedSubscriber.java
@@ -117,8 +117,9 @@ public final class ConfigurationChangedSubscriber {
         if (!event.getActiveVersion().equals(contextManager.getMetaDataContexts().getPersistService().getMetaDataVersionPersistService().getActiveVersionByFullPath(event.getActiveVersionKey()))) {
             return;
         }
-        contextManager.getConfigurationContextManager()
-                .alterGlobalRuleConfiguration(contextManager.getMetaDataContexts().getPersistService().getGlobalRuleService().load(event.getRuleSimpleName()));
+        contextManager.getMetaDataContexts().getPersistService().getGlobalRuleService().load(event.getRuleSimpleName())
+                .ifPresent(optional -> contextManager.getConfigurationContextManager().alterGlobalRuleConfiguration(optional));
+        
     }
     
     /**