You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by to...@apache.org on 2022/04/22 17:56:39 UTC
[shardingsphere] branch master updated: Rename MasterSlaveStatusDatabaseDiscoveryType (#17024)
This is an automated email from the ASF dual-hosted git repository.
totalo 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 153006de4ed Rename MasterSlaveStatusDatabaseDiscoveryType (#17024)
153006de4ed is described below
commit 153006de4eda75794a948672861b7142f2624089
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sat Apr 23 01:56:27 2022 +0800
Rename MasterSlaveStatusDatabaseDiscoveryType (#17024)
* Rename MasterSlaveStatusDatabaseDiscoveryType
* Rename MasterSlaveDatabaseDiscoveryType
* Update docs
* Move package
---
docs/document/content/dev-manual/ha.cn.md | 16 ++++++++--------
docs/document/content/dev-manual/ha.en.md | 16 ++++++++--------
.../rule/DatabaseDiscoveryDataSourceRuleTest.java | 2 +-
...uleAlgorithmProviderConfigurationYamlSwapperTest.java | 2 +-
.../MasterSlaveDatabaseDiscoveryType.java} | 12 ++++++------
.../MasterSlaveHighlyAvailableStatus.java} | 6 +++---
.../mysql/type/{ => mgr}/MGRDatabaseDiscoveryType.java | 2 +-
.../mysql/type/{ => mgr}/MGRHighlyAvailableStatus.java | 2 +-
....shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType | 4 ++--
.../MasterSlaveDatabaseDiscoveryTypeTest.java} | 8 ++++----
.../type/{ => mgr}/MGRDatabaseDiscoveryTypeTest.java | 2 +-
.../namespace/DatabaseDiscoverySpringNamespaceTest.java | 2 +-
12 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/docs/document/content/dev-manual/ha.cn.md b/docs/document/content/dev-manual/ha.cn.md
index 977a0aa31fe..d606fd7c503 100644
--- a/docs/document/content/dev-manual/ha.cn.md
+++ b/docs/document/content/dev-manual/ha.cn.md
@@ -7,12 +7,12 @@ chapter = true
## DatabaseDiscoveryType
-| *SPI 名称* | *详细说明* |
-| ----------------------------------------- | ----------------------- |
-| DatabaseDiscoveryType | 数据库发现类型 |
+| *SPI 名称* | *详细说明* |
+| -------------------------------- | -------------------------- |
+| DatabaseDiscoveryType | 数据库发现类型 |
-| *已知实现类* | *详细说明* |
-| ----------------------------------------- | -------------------------- |
-| MGRDatabaseDiscoveryType | 基于 MySQL MGR 的数据库发现 |
-| ShowSlaveStatusDatabaseDiscoveryType | 基于 MySQL 主从延迟的数据库发现 |
-| OpenGaussDatabaseDiscoveryType | 基于 openGauss 的数据库发现 |
+| *已知实现类* | *详细说明* |
+| -------------------------------- | --------------------------- |
+| MGRDatabaseDiscoveryType | 基于 MySQL MGR 的数据库发现 |
+| MasterSlaveDatabaseDiscoveryType | 基于 MySQL 主从同步的数据库发现 |
+| OpenGaussDatabaseDiscoveryType | 基于 openGauss 的数据库发现 |
diff --git a/docs/document/content/dev-manual/ha.en.md b/docs/document/content/dev-manual/ha.en.md
index 43cb042b6f3..d699f036da9 100644
--- a/docs/document/content/dev-manual/ha.en.md
+++ b/docs/document/content/dev-manual/ha.en.md
@@ -7,12 +7,12 @@ chapter = true
## DatabaseDiscoveryType
-| *SPI Name* | *Description* |
-| ------------------------------------- | ------------------------------------------------------- |
-| DatabaseDiscoveryType | Database discovery type |
+| *SPI Name* | *Description* |
+| -------------------------------- | ------------------------------------------------------ |
+| DatabaseDiscoveryType | Database discovery type |
-| *Implementation Class* | *Description* |
-| ------------------------------------- | ------------------------------------------------------- |
-| MGRDatabaseDiscoveryType | Database discovery of MySQL's MGR |
-| ShowSlaveStatusDatabaseDiscoveryType | Database discovery of MySQL's master-slave delay |
-| OpenGaussDatabaseDiscoveryType | Database discovery of openGauss |
+| *Implementation Class* | *Description* |
+| -------------------------------- | ------------------------------------------------------ |
+| MGRDatabaseDiscoveryType | Database discovery of MySQL's MGR |
+| MasterSlaveDatabaseDiscoveryType | Database discovery of MySQL's master-slave replication |
+| OpenGaussDatabaseDiscoveryType | Database discovery of openGauss |
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryDataSourceRuleTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryDataSourceRuleTest.java
index f8d2f0dab75..883cee9f84f 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryDataSourceRuleTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryDataSourceRuleTest.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.dbdiscovery.rule;
import com.google.common.collect.ImmutableMap;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.mysql.type.MGRDatabaseDiscoveryType;
+import org.apache.shardingsphere.dbdiscovery.mysql.type.mgr.MGRDatabaseDiscoveryType;
import org.junit.Test;
import java.util.Arrays;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapperTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapperTest.java
index 505eeca9423..baaae0ebe2f 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapperTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapperTest.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.dbdiscovery.algorithm.config.AlgorithmProvidedD
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryHeartBeatConfiguration;
import org.apache.shardingsphere.dbdiscovery.constant.DatabaseDiscoveryOrder;
-import org.apache.shardingsphere.dbdiscovery.mysql.type.MGRDatabaseDiscoveryType;
+import org.apache.shardingsphere.dbdiscovery.mysql.type.mgr.MGRDatabaseDiscoveryType;
import org.apache.shardingsphere.dbdiscovery.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
import org.junit.Test;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/ShowSlaveStatusDatabaseDiscoveryType.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/masterslave/MasterSlaveDatabaseDiscoveryType.java
similarity index 90%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/ShowSlaveStatusDatabaseDiscoveryType.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/masterslave/MasterSlaveDatabaseDiscoveryType.java
index b9a5d79e54b..0fb30ad2907 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/ShowSlaveStatusDatabaseDiscoveryType.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/masterslave/MasterSlaveDatabaseDiscoveryType.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.mysql.type;
+package org.apache.shardingsphere.dbdiscovery.mysql.type.masterslave;
import lombok.Getter;
import lombok.Setter;
@@ -38,22 +38,22 @@ import java.util.Optional;
import java.util.Properties;
/**
- * Show slave status database discovery type.
+ * Master-slave database discovery type.
*/
@Getter
@Setter
@Slf4j
-public final class ShowSlaveStatusDatabaseDiscoveryType extends AbstractDatabaseDiscoveryType {
+public final class MasterSlaveDatabaseDiscoveryType extends AbstractDatabaseDiscoveryType {
private static final String SHOW_SLAVE_STATUS = "SHOW SLAVE STATUS";
private Properties props = new Properties();
@Override
- public ShowSlaveStatusHighlyAvailableStatus loadHighlyAvailableStatus(final DataSource dataSource) throws SQLException {
+ public MasterSlaveHighlyAvailableStatus loadHighlyAvailableStatus(final DataSource dataSource) throws SQLException {
try (Connection connection = dataSource.getConnection();
Statement statement = connection.createStatement()) {
- return new ShowSlaveStatusHighlyAvailableStatus(loadPrimaryDataSourceURL(statement).orElse(null));
+ return new MasterSlaveHighlyAvailableStatus(loadPrimaryDataSourceURL(statement).orElse(null));
}
}
@@ -108,6 +108,6 @@ public final class ShowSlaveStatusDatabaseDiscoveryType extends AbstractDatabase
@Override
public String getType() {
- return "SHOW_SLAVE_STATUS";
+ return "MASTER_SLAVE";
}
}
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/ShowSlaveStatusHighlyAvailableStatus.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/masterslave/MasterSlaveHighlyAvailableStatus.java
similarity index 87%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/ShowSlaveStatusHighlyAvailableStatus.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/masterslave/MasterSlaveHighlyAvailableStatus.java
index b250ff14141..8c3a4e8bbc6 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/ShowSlaveStatusHighlyAvailableStatus.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/masterslave/MasterSlaveHighlyAvailableStatus.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.mysql.type;
+package org.apache.shardingsphere.dbdiscovery.mysql.type.masterslave;
import com.google.common.base.Preconditions;
import lombok.EqualsAndHashCode;
@@ -28,12 +28,12 @@ import java.util.Map;
import java.util.Properties;
/**
- * Highly available status of MySQL show slave status cluster.
+ * Highly available status of MySQL master-slave cluster.
*/
@RequiredArgsConstructor
@Getter
@EqualsAndHashCode
-public final class ShowSlaveStatusHighlyAvailableStatus implements HighlyAvailableStatus {
+public final class MasterSlaveHighlyAvailableStatus implements HighlyAvailableStatus {
private final String primaryInstanceURL;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MGRDatabaseDiscoveryType.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/mgr/MGRDatabaseDiscoveryType.java
similarity index 99%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MGRDatabaseDiscoveryType.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/mgr/MGRDatabaseDiscoveryType.java
index 31e9814e76c..9ef0269701e 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MGRDatabaseDiscoveryType.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/mgr/MGRDatabaseDiscoveryType.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.mysql.type;
+package org.apache.shardingsphere.dbdiscovery.mysql.type.mgr;
import lombok.Getter;
import lombok.Setter;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MGRHighlyAvailableStatus.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/mgr/MGRHighlyAvailableStatus.java
similarity index 98%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MGRHighlyAvailableStatus.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/mgr/MGRHighlyAvailableStatus.java
index 5fdfaec259a..0b6e976d4d8 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MGRHighlyAvailableStatus.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/mgr/MGRHighlyAvailableStatus.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.mysql.type;
+package org.apache.shardingsphere.dbdiscovery.mysql.type.mgr;
import com.google.common.base.Preconditions;
import lombok.EqualsAndHashCode;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType
index 7dc6b41bc46..1a0a529e86d 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType
@@ -15,5 +15,5 @@
# limitations under the License.
#
-org.apache.shardingsphere.dbdiscovery.mysql.type.MGRDatabaseDiscoveryType
-org.apache.shardingsphere.dbdiscovery.mysql.type.ShowSlaveStatusDatabaseDiscoveryType
+org.apache.shardingsphere.dbdiscovery.mysql.type.mgr.MGRDatabaseDiscoveryType
+org.apache.shardingsphere.dbdiscovery.mysql.type.masterslave.MasterSlaveDatabaseDiscoveryType
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/ShowSlaveStatusDatabaseDiscoveryTypeTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/masterslave/MasterSlaveDatabaseDiscoveryTypeTest.java
similarity index 88%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/ShowSlaveStatusDatabaseDiscoveryTypeTest.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/masterslave/MasterSlaveDatabaseDiscoveryTypeTest.java
index c67bf7df960..ada90a0dcac 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/ShowSlaveStatusDatabaseDiscoveryTypeTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/masterslave/MasterSlaveDatabaseDiscoveryTypeTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.mysql.type;
+package org.apache.shardingsphere.dbdiscovery.mysql.type.masterslave;
import org.junit.Test;
@@ -35,11 +35,11 @@ import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-public final class ShowSlaveStatusDatabaseDiscoveryTypeTest {
+public final class MasterSlaveDatabaseDiscoveryTypeTest {
@Test
public void assertLoadHighlyAvailableStatus() throws SQLException {
- ShowSlaveStatusHighlyAvailableStatus actual = new ShowSlaveStatusDatabaseDiscoveryType().loadHighlyAvailableStatus(getDataSource(true, 3306));
+ MasterSlaveHighlyAvailableStatus actual = new MasterSlaveDatabaseDiscoveryType().loadHighlyAvailableStatus(getDataSource(true, 3306));
assertThat(actual.getPrimaryInstanceURL(), is("127.0.0.1:3306"));
}
@@ -48,7 +48,7 @@ public final class ShowSlaveStatusDatabaseDiscoveryTypeTest {
Map<String, DataSource> dataSourceMap = new HashMap<>(2, 1);
dataSourceMap.put("ds_0", getDataSource(false, 3306));
dataSourceMap.put("ds_1", getDataSource(true, 3307));
- Optional<String> actual = new ShowSlaveStatusDatabaseDiscoveryType().determinePrimaryDataSource(dataSourceMap);
+ Optional<String> actual = new MasterSlaveDatabaseDiscoveryType().determinePrimaryDataSource(dataSourceMap);
assertTrue(actual.isPresent());
assertThat(actual.get(), is("ds_0"));
}
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MGRDatabaseDiscoveryTypeTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/mgr/MGRDatabaseDiscoveryTypeTest.java
similarity index 99%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MGRDatabaseDiscoveryTypeTest.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/mgr/MGRDatabaseDiscoveryTypeTest.java
index 91be6586f0b..6ba6ad80e71 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MGRDatabaseDiscoveryTypeTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/mgr/MGRDatabaseDiscoveryTypeTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.mysql.type;
+package org.apache.shardingsphere.dbdiscovery.mysql.type.mgr;
import com.google.common.eventbus.EventBus;
import org.apache.shardingsphere.dbdiscovery.mysql.AbstractDatabaseDiscoveryType;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/src/test/java/org/apache/shardingsphere/dbdiscovery/spring/namespace/DatabaseDiscoverySpringNamespaceTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/src/test/java/org/apache/shardingsphere/dbdiscovery/spring/namespace/DatabaseDiscoverySpringNamespaceTest.java
index 996bed18a10..ced4369c177 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/src/test/java/org/apache/shardingsphere/dbdiscovery/spring/namespace/DatabaseDiscoverySpringNamespaceTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/src/test/java/org/apache/shardingsphere/dbdiscovery/spring/namespace/DatabaseDiscoverySpringNamespaceTest.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.dbdiscovery.spring.namespace;
import org.apache.shardingsphere.dbdiscovery.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryHeartBeatConfiguration;
-import org.apache.shardingsphere.dbdiscovery.mysql.type.MGRDatabaseDiscoveryType;
+import org.apache.shardingsphere.dbdiscovery.mysql.type.mgr.MGRDatabaseDiscoveryType;
import org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;