Refactor ReadWriteSplitting dependency (#81)

diff --git a/shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/servcie/impl/GovernanceServiceImpl.java b/shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/servcie/impl/GovernanceServiceImpl.java
index 3454e81..fd5119d 100644
--- a/shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/servcie/impl/GovernanceServiceImpl.java
+++ b/shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/servcie/impl/GovernanceServiceImpl.java
@@ -22,8 +22,8 @@
 import org.apache.shardingsphere.governance.core.registry.RegistryCenterNodeStatus;
 import org.apache.shardingsphere.governance.core.yaml.config.YamlConfigurationConverter;
 import org.apache.shardingsphere.infra.config.RuleConfiguration;
-import org.apache.shardingsphere.replicaquery.api.config.ReplicaQueryRuleConfiguration;
-import org.apache.shardingsphere.replicaquery.api.config.rule.ReplicaQueryDataSourceRuleConfiguration;
+import org.apache.shardingsphere.readwrite.splitting.api.ReadWriteSplittingRuleConfiguration;
+import org.apache.shardingsphere.readwrite.splitting.api.rule.ReadWriteSplittingDataSourceRuleConfiguration;
 import org.apache.shardingsphere.ui.common.dto.InstanceDTO;
 import org.apache.shardingsphere.ui.common.dto.ReplicaDataSourceDTO;
 import org.apache.shardingsphere.ui.servcie.GovernanceService;
@@ -79,7 +79,7 @@
             }
             if (configData.contains("!SHARDING")) {
                 handleShardingRuleConfiguration(result, configData, schemaName);
-            } else if (configData.contains("!REPLICA_QUERY")) {
+            } else if (configData.contains("!READ_WRITE_SPLITTING")) {
                 handleMasterSlaveRuleConfiguration(result, configData, schemaName);
             }
         }
@@ -99,37 +99,37 @@
     
     private void handleShardingRuleConfiguration(final Collection<ReplicaDataSourceDTO> replicaDataSourceDTOS, final String configData, final String schemaName) {
         Collection<RuleConfiguration> configurations = YamlConfigurationConverter.convertRuleConfigurations(configData);
-        Collection<ReplicaQueryRuleConfiguration> replicaQueryRuleConfigurations = configurations.stream().filter(
-            config -> config instanceof ReplicaQueryRuleConfiguration).map(config -> (ReplicaQueryRuleConfiguration) config).collect(Collectors.toList());
-        for (ReplicaQueryRuleConfiguration replicaQueryRuleConfiguration : replicaQueryRuleConfigurations) {
-            addSlaveDataSource(replicaDataSourceDTOS, replicaQueryRuleConfiguration, schemaName);
+        Collection<ReadWriteSplittingRuleConfiguration> readWriteSplittingRuleConfigurations = configurations.stream().filter(
+            config -> config instanceof ReadWriteSplittingRuleConfiguration).map(config -> (ReadWriteSplittingRuleConfiguration) config).collect(Collectors.toList());
+        for (ReadWriteSplittingRuleConfiguration readWriteSplittingRuleConfiguration : readWriteSplittingRuleConfigurations) {
+            addSlaveDataSource(replicaDataSourceDTOS, readWriteSplittingRuleConfiguration, schemaName);
         }
     }
     
     private void handleMasterSlaveRuleConfiguration(final Collection<ReplicaDataSourceDTO> replicaDataSourceDTOS, final String configData, final String schemaName) {
-        ReplicaQueryRuleConfiguration replicaQueryRuleConfiguration = loadPrimaryReplicaRuleConfiguration(configData);
-        addSlaveDataSource(replicaDataSourceDTOS, replicaQueryRuleConfiguration, schemaName);
+        ReadWriteSplittingRuleConfiguration readWriteSplittingRuleConfiguration = loadPrimaryReplicaRuleConfiguration(configData);
+        addSlaveDataSource(replicaDataSourceDTOS, readWriteSplittingRuleConfiguration, schemaName);
     }
     
-    private ReplicaQueryRuleConfiguration loadPrimaryReplicaRuleConfiguration(final String configData) {
+    private ReadWriteSplittingRuleConfiguration loadPrimaryReplicaRuleConfiguration(final String configData) {
         Collection<RuleConfiguration> ruleConfigurations = YamlConfigurationConverter.convertRuleConfigurations(configData);
-        Optional<ReplicaQueryRuleConfiguration> result = ruleConfigurations.stream().filter(
-                each -> each instanceof ReplicaQueryRuleConfiguration).map(ruleConfiguration -> (ReplicaQueryRuleConfiguration) ruleConfiguration).findFirst();
+        Optional<ReadWriteSplittingRuleConfiguration> result = ruleConfigurations.stream().filter(
+                each -> each instanceof ReadWriteSplittingRuleConfiguration).map(ruleConfiguration -> (ReadWriteSplittingRuleConfiguration) ruleConfiguration).findFirst();
         Preconditions.checkState(result.isPresent());
         return result.get();
     }
     
-    private void addSlaveDataSource(final Collection<ReplicaDataSourceDTO> replicaDataSourceDTOS, final ReplicaQueryRuleConfiguration replicaQueryRuleConfiguration, final String schemaName) {
+    private void addSlaveDataSource(final Collection<ReplicaDataSourceDTO> replicaDataSourceDTOS, final ReadWriteSplittingRuleConfiguration readWriteSplittingRuleConfiguration, final String schemaName) {
         Collection<String> disabledSchemaDataSourceNames = getDisabledSchemaDataSourceNames();
-        for (ReplicaQueryDataSourceRuleConfiguration each : replicaQueryRuleConfiguration.getDataSources()) {
+        for (ReadWriteSplittingDataSourceRuleConfiguration each : readWriteSplittingRuleConfiguration.getDataSources()) {
             replicaDataSourceDTOS.addAll(getReplicaDataSourceDTOS(schemaName, disabledSchemaDataSourceNames, each));
         }
     }
     
-    private Collection<ReplicaDataSourceDTO> getReplicaDataSourceDTOS(final String schemaName, final Collection<String> disabledSchemaDataSourceNames, final ReplicaQueryDataSourceRuleConfiguration group) {
+    private Collection<ReplicaDataSourceDTO> getReplicaDataSourceDTOS(final String schemaName, final Collection<String> disabledSchemaDataSourceNames, final ReadWriteSplittingDataSourceRuleConfiguration group) {
         Collection<ReplicaDataSourceDTO> result = new LinkedList<>();
-        for (String each : group.getReplicaDataSourceNames()) {
-            result.add(new ReplicaDataSourceDTO(schemaName, group.getPrimaryDataSourceName(), each, !disabledSchemaDataSourceNames.contains(schemaName + "." + each)));
+        for (String each : group.getReadDataSourceNames()) {
+            result.add(new ReplicaDataSourceDTO(schemaName, group.getWriteDataSourceName(), each, !disabledSchemaDataSourceNames.contains(schemaName + "." + each)));
         }
         return result;
     }
diff --git a/shardingsphere-ui-frontend/src/lang/en-US.js b/shardingsphere-ui-frontend/src/lang/en-US.js
index 5270a49..07c914c 100644
--- a/shardingsphere-ui-frontend/src/lang/en-US.js
+++ b/shardingsphere-ui-frontend/src/lang/en-US.js
@@ -117,11 +117,11 @@
   },
   runtimeStatus: {
     serviceNode: 'Service Node',
-    replicaDataSourceName: 'Replica DataSource Info',
+    readDataSourceName: 'Read DataSource Info',
     dataSource: {
       schema: 'Schema',
-      masterDataSourceName: 'Primary DataSource Name',
-      replicaDataSourceName: 'Replica DataSource Name'
+      writeDataSourceName: 'Write DataSource Name',
+      readDataSourceName: 'Read DataSource Name'
     },
     instance: {
       instanceId: 'Instance Id',
diff --git a/shardingsphere-ui-frontend/src/lang/zh-CN.js b/shardingsphere-ui-frontend/src/lang/zh-CN.js
index 6d4d939..f28978f 100644
--- a/shardingsphere-ui-frontend/src/lang/zh-CN.js
+++ b/shardingsphere-ui-frontend/src/lang/zh-CN.js
@@ -117,11 +117,11 @@
   },
   runtimeStatus: {
     serviceNode: '服务节点',
-    replicaDataSourceName: '从库信息',
+    readDataSourceName: '读库信息',
     dataSource: {
       schema: '逻辑库名',
-      masterDataSourceName: '主库名',
-      replicaDataSourceName: '从库名'
+      writeDataSourceName: '写库名',
+      readDataSourceName: '读库名'
     },
     instance: {
       instanceId: '节点标识',
diff --git a/shardingsphere-ui-frontend/src/views/runtime-status/index.vue b/shardingsphere-ui-frontend/src/views/runtime-status/index.vue
index 239daf6..19ef549 100644
--- a/shardingsphere-ui-frontend/src/views/runtime-status/index.vue
+++ b/shardingsphere-ui-frontend/src/views/runtime-status/index.vue
@@ -19,7 +19,7 @@
   <el-row class="box-card">
     <el-radio-group v-model="radioValue" @change="onChange">
       <el-radio-button label="1">{{ $t('runtimeStatus.serviceNode') }}</el-radio-button>
-      <el-radio-button label="2">{{ $t('runtimeStatus.replicaDataSourceName') }}</el-radio-button>
+      <el-radio-button label="2">{{ $t('runtimeStatus.readDataSourceName') }}</el-radio-button>
     </el-radio-group>
     <component :is="currentView" />
   </el-row>
diff --git a/shardingsphere-ui-frontend/src/views/runtime-status/module/dataSource.vue b/shardingsphere-ui-frontend/src/views/runtime-status/module/dataSource.vue
index d7e8686..d637f3c 100644
--- a/shardingsphere-ui-frontend/src/views/runtime-status/module/dataSource.vue
+++ b/shardingsphere-ui-frontend/src/views/runtime-status/module/dataSource.vue
@@ -56,11 +56,11 @@
           prop: 'schema'
         },
         {
-          label: this.$t('runtimeStatus').dataSource.masterDataSourceName,
+          label: this.$t('runtimeStatus').dataSource.writeDataSourceName,
           prop: 'primaryDataSourceName'
         },
         {
-          label: this.$t('runtimeStatus').dataSource.replicaDataSourceName,
+          label: this.$t('runtimeStatus').dataSource.readDataSourceName,
           prop: 'replicaDataSourceName'
         }
       ],