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 2021/06/05 13:58:01 UTC
[shardingsphere] branch master updated: Merge db-discovery module
(#10670)
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 a62db75 Merge db-discovery module (#10670)
a62db75 is described below
commit a62db753229d2d9d86f255f4ce4b600b2d4b898a
Author: Liang Zhang <te...@163.com>
AuthorDate: Sat Jun 5 21:57:24 2021 +0800
Merge db-discovery module (#10670)
* Rename common package
* Update pom
* Merge db-discovery module
---
.../shardingsphere-db-discovery/pom.xml | 5 +-
...infra.yaml.swapper.YamlRuleConfigurationSwapper | 19 --------
.../fixture/TestDatabaseDiscoveryTypeFixture.java | 55 ----------------------
.../pom.xml | 11 ++++-
...ProvidedDatabaseDiscoveryRuleConfiguration.java | 2 +-
.../DatabaseDiscoveryDataSourceNameAware.java | 4 +-
.../constant/DatabaseDiscoveryOrder.java | 2 +-
.../route/DatabaseDiscoverySQLRouter.java | 8 ++--
.../impl/DatabaseDiscoveryDataSourceRouter.java | 2 +-
.../rule/DatabaseDiscoveryDataSourceRule.java | 2 +-
.../dbdiscovery}/rule/DatabaseDiscoveryRule.java | 4 +-
...orithmProvidedDatabaseDiscoveryRuleBuilder.java | 8 ++--
.../rule/biulder/DatabaseDiscoveryRuleBuilder.java | 6 +--
.../DatabaseDiscoveryRuleConfigurationChecker.java | 4 +-
.../YamlDatabaseDiscoveryRuleConfiguration.java | 4 +-
...tabaseDiscoveryDataSourceRuleConfiguration.java | 2 +-
.../DatabaseDiscoveryRuleStatementConverter.java | 6 +--
...eAlgorithmProviderConfigurationYamlSwapper.java | 10 ++--
...abaseDiscoveryRuleConfigurationYamlSwapper.java | 8 ++--
....shardingsphere.infra.aware.DataSourceNameAware | 2 +-
...org.apache.shardingsphere.infra.route.SQLRouter | 0
...ere.infra.rule.builder.scope.SchemaRuleBuilder} | 3 +-
...re.infra.rule.checker.RuleConfigurationChecker} | 2 +-
...nfra.yaml.swapper.YamlRuleConfigurationSwapper} | 4 +-
.../fixture/TestDatabaseDiscoveryType.java} | 6 +--
.../route}/DatabaseDiscoverySQLRouterTest.java | 5 +-
.../rule/DatabaseDiscoveryDataSourceRuleTest.java | 2 +-
.../rule/DatabaseDiscoveryRuleTest.java | 2 +-
...hmProvidedDatabaseDiscoveryRuleBuilderTest.java | 6 +--
.../biulder/DatabaseDiscoveryRuleBuilderTest.java | 4 +-
...atabaseDiscoveryRuleStatementConverterTest.java | 4 +-
...orithmProviderConfigurationYamlSwapperTest.java | 11 +++--
...eDiscoveryRuleConfigurationYamlSwapperTest.java | 11 +++--
...YamlDatabaseDiscoveryRuleConfigurationTest.java | 4 +-
...ingsphere.dbdiscovery.spi.DatabaseDiscoveryType | 2 +-
.../src/test/resources/logback-test.xml | 0
.../src/test/resources/yaml/db-discovery-rule.yaml | 0
.../shardingsphere-db-discovery-route/pom.xml | 43 -----------------
.../pom.xml | 2 +-
...tabaseDiscoveryRuleSpringbootConfiguration.java | 4 +-
...tabaseDiscoveryRuleSpringBootConfiguration.java | 2 +-
.../DatabaseDiscoverySpringBootStarterTest.java | 2 +-
.../pom.xml | 2 +-
.../DatabaseDiscoveryRuleBeanDefinitionParser.java | 2 +-
.../shardingsphere-jdbc-core/pom.xml | 2 +-
.../shardingsphere-proxy-backend/pom.xml | 2 +-
.../AlterDatabaseDiscoveryRuleBackendHandler.java | 2 +-
.../CreateDatabaseDiscoveryRuleBackendHandler.java | 4 +-
.../shardingsphere-proxy-common/pom.xml | 2 +-
49 files changed, 95 insertions(+), 204 deletions(-)
diff --git a/shardingsphere-features/shardingsphere-db-discovery/pom.xml b/shardingsphere-features/shardingsphere-db-discovery/pom.xml
index 04a90a7..8223bc5 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/pom.xml
+++ b/shardingsphere-features/shardingsphere-db-discovery/pom.xml
@@ -31,9 +31,8 @@
<modules>
<module>shardingsphere-db-discovery-api</module>
- <module>shardingsphere-db-discovery-common</module>
- <module>shardingsphere-db-discovery-provider</module>
- <module>shardingsphere-db-discovery-route</module>
+ <module>shardingsphere-db-discovery-core</module>
<module>shardingsphere-db-discovery-spring</module>
+ <module>shardingsphere-db-discovery-provider</module>
</modules>
</project>
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapper b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapper
deleted file mode 100644
index e27b2ff..0000000
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapper
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-org.apache.shardingsphere.dbdiscovery.common.yaml.swapper.DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapper
-org.apache.shardingsphere.dbdiscovery.common.yaml.swapper.DatabaseDiscoveryRuleConfigurationYamlSwapper
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/fixture/TestDatabaseDiscoveryTypeFixture.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/fixture/TestDatabaseDiscoveryTypeFixture.java
deleted file mode 100644
index ead741d..0000000
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/fixture/TestDatabaseDiscoveryTypeFixture.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.dbdiscovery.common.fixture;
-
-import org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType;
-
-import javax.sql.DataSource;
-import java.util.Collection;
-import java.util.Map;
-
-public final class TestDatabaseDiscoveryTypeFixture implements DatabaseDiscoveryType {
-
- @Override
- public void checkDatabaseDiscoveryConfig(final Map<String, DataSource> dataSourceMap, final String schemaName) {
- }
-
- @Override
- public void updatePrimaryDataSource(final Map<String, DataSource> activeDataSourceMap, final String schemaName, final Collection<String> disabledDataSourceNames,
- final String groupName, final String primaryDataSourceName) {
- }
-
- @Override
- public void updateMemberState(final Map<String, DataSource> dataSourceMap, final String schemaName, final Collection<String> disabledDataSourceNames) {
- }
-
- @Override
- public void startPeriodicalUpdate(final Map<String, DataSource> dataSourceMap, final String schemaName, final Collection<String> disabledDataSourceNames,
- final String groupName, final String primaryDataSourceName) {
- }
-
- @Override
- public String getPrimaryDataSource() {
- return null;
- }
-
- @Override
- public String getType() {
- return "Test";
- }
-}
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/pom.xml b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/pom.xml
similarity index 88%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/pom.xml
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/pom.xml
index 94e5804..14682a3 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/pom.xml
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/pom.xml
@@ -25,7 +25,7 @@
<artifactId>shardingsphere-db-discovery</artifactId>
<version>5.0.0-RC1-SNAPSHOT</version>
</parent>
- <artifactId>shardingsphere-db-discovery-common</artifactId>
+ <artifactId>shardingsphere-db-discovery-core</artifactId>
<name>${project.artifactId}</name>
<dependencies>
@@ -34,9 +34,10 @@
<artifactId>shardingsphere-db-discovery-api</artifactId>
<version>${project.version}</version>
</dependency>
+
<dependency>
<groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-db-discovery-mgr</artifactId>
+ <artifactId>shardingsphere-infra-route</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
@@ -45,6 +46,12 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-db-discovery-mgr</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/algorithm/config/AlgorithmProvidedDatabaseDiscoveryRuleConfiguration.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/algorithm/config/AlgorithmProvidedDatabaseDiscoveryRuleConfiguration.java
similarity index 95%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/algorithm/config/AlgorithmProvidedDatabaseDiscoveryRuleConfiguration.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/algorithm/config/AlgorithmProvidedDatabaseDiscoveryRuleConfiguration.java
index cb1da21..81c0737 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/algorithm/config/AlgorithmProvidedDatabaseDiscoveryRuleConfiguration.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/algorithm/config/AlgorithmProvidedDatabaseDiscoveryRuleConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.algorithm.config;
+package org.apache.shardingsphere.dbdiscovery.algorithm.config;
import lombok.AllArgsConstructor;
import lombok.Getter;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/aware/DatabaseDiscoveryDataSourceNameAware.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/aware/DatabaseDiscoveryDataSourceNameAware.java
similarity index 92%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/aware/DatabaseDiscoveryDataSourceNameAware.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/aware/DatabaseDiscoveryDataSourceNameAware.java
index 89c252d..11b064a 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/aware/DatabaseDiscoveryDataSourceNameAware.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/aware/DatabaseDiscoveryDataSourceNameAware.java
@@ -15,9 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.aware;
+package org.apache.shardingsphere.dbdiscovery.aware;
-import org.apache.shardingsphere.dbdiscovery.common.rule.DatabaseDiscoveryRule;
+import org.apache.shardingsphere.dbdiscovery.rule.DatabaseDiscoveryRule;
import org.apache.shardingsphere.infra.aware.DataSourceNameAware;
import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/constant/DatabaseDiscoveryOrder.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/constant/DatabaseDiscoveryOrder.java
similarity index 95%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/constant/DatabaseDiscoveryOrder.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/constant/DatabaseDiscoveryOrder.java
index db275ed..ad6d08a 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/constant/DatabaseDiscoveryOrder.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/constant/DatabaseDiscoveryOrder.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.constant;
+package org.apache.shardingsphere.dbdiscovery.constant;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/main/java/org/apache/shardingsphere/dbdiscovery/route/DatabaseDiscoverySQLRouter.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/route/DatabaseDiscoverySQLRouter.java
similarity index 93%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/main/java/org/apache/shardingsphere/dbdiscovery/route/DatabaseDiscoverySQLRouter.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/route/DatabaseDiscoverySQLRouter.java
index 7c416ab..f343cd5 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/main/java/org/apache/shardingsphere/dbdiscovery/route/DatabaseDiscoverySQLRouter.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/route/DatabaseDiscoverySQLRouter.java
@@ -17,8 +17,11 @@
package org.apache.shardingsphere.dbdiscovery.route;
-import org.apache.shardingsphere.dbdiscovery.common.rule.DatabaseDiscoveryRule;
+import org.apache.shardingsphere.dbdiscovery.constant.DatabaseDiscoveryOrder;
import org.apache.shardingsphere.dbdiscovery.route.impl.DatabaseDiscoveryDataSourceRouter;
+import org.apache.shardingsphere.dbdiscovery.rule.DatabaseDiscoveryDataSourceRule;
+import org.apache.shardingsphere.dbdiscovery.rule.DatabaseDiscoveryRule;
+import org.apache.shardingsphere.infra.binder.LogicSQL;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.database.DefaultSchema;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
@@ -26,9 +29,6 @@ import org.apache.shardingsphere.infra.route.SQLRouter;
import org.apache.shardingsphere.infra.route.context.RouteContext;
import org.apache.shardingsphere.infra.route.context.RouteMapper;
import org.apache.shardingsphere.infra.route.context.RouteUnit;
-import org.apache.shardingsphere.infra.binder.LogicSQL;
-import org.apache.shardingsphere.dbdiscovery.common.constant.DatabaseDiscoveryOrder;
-import org.apache.shardingsphere.dbdiscovery.common.rule.DatabaseDiscoveryDataSourceRule;
import java.util.Collection;
import java.util.Collections;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/main/java/org/apache/shardingsphere/dbdiscovery/route/impl/DatabaseDiscoveryDataSourceRouter.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/route/impl/DatabaseDiscoveryDataSourceRouter.java
similarity index 93%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/main/java/org/apache/shardingsphere/dbdiscovery/route/impl/DatabaseDiscoveryDataSourceRouter.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/route/impl/DatabaseDiscoveryDataSourceRouter.java
index e2d7bde..39f464d 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/main/java/org/apache/shardingsphere/dbdiscovery/route/impl/DatabaseDiscoveryDataSourceRouter.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/route/impl/DatabaseDiscoveryDataSourceRouter.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.dbdiscovery.route.impl;
import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.dbdiscovery.common.rule.DatabaseDiscoveryDataSourceRule;
+import org.apache.shardingsphere.dbdiscovery.rule.DatabaseDiscoveryDataSourceRule;
/**
* Data source router for database discovery.
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/DatabaseDiscoveryDataSourceRule.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryDataSourceRule.java
similarity index 98%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/DatabaseDiscoveryDataSourceRule.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryDataSourceRule.java
index 2b5beff..3bc1888 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/DatabaseDiscoveryDataSourceRule.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryDataSourceRule.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.rule;
+package org.apache.shardingsphere.dbdiscovery.rule;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/DatabaseDiscoveryRule.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryRule.java
similarity index 98%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/DatabaseDiscoveryRule.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryRule.java
index fca1143..0af0ead 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/DatabaseDiscoveryRule.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryRule.java
@@ -15,14 +15,14 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.rule;
+package org.apache.shardingsphere.dbdiscovery.rule;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import lombok.Getter;
import org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType;
import org.apache.shardingsphere.infra.aware.DataSourceNameAware;
import org.apache.shardingsphere.infra.aware.DataSourceNameAwareFactory;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/biulder/AlgorithmProvidedDatabaseDiscoveryRuleBuilder.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/biulder/AlgorithmProvidedDatabaseDiscoveryRuleBuilder.java
similarity index 84%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/biulder/AlgorithmProvidedDatabaseDiscoveryRuleBuilder.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/biulder/AlgorithmProvidedDatabaseDiscoveryRuleBuilder.java
index 7b9f650..b7d3917 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/biulder/AlgorithmProvidedDatabaseDiscoveryRuleBuilder.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/biulder/AlgorithmProvidedDatabaseDiscoveryRuleBuilder.java
@@ -15,11 +15,11 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.rule.biulder;
+package org.apache.shardingsphere.dbdiscovery.rule.biulder;
-import org.apache.shardingsphere.dbdiscovery.common.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.constant.DatabaseDiscoveryOrder;
-import org.apache.shardingsphere.dbdiscovery.common.rule.DatabaseDiscoveryRule;
+import org.apache.shardingsphere.dbdiscovery.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.constant.DatabaseDiscoveryOrder;
+import org.apache.shardingsphere.dbdiscovery.rule.DatabaseDiscoveryRule;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.infra.rule.builder.level.FeatureRuleBuilder;
import org.apache.shardingsphere.infra.rule.builder.scope.SchemaRuleBuilder;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/biulder/DatabaseDiscoveryRuleBuilder.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/biulder/DatabaseDiscoveryRuleBuilder.java
similarity index 91%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/biulder/DatabaseDiscoveryRuleBuilder.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/biulder/DatabaseDiscoveryRuleBuilder.java
index eeca098..6f9a80e 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/biulder/DatabaseDiscoveryRuleBuilder.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/biulder/DatabaseDiscoveryRuleBuilder.java
@@ -15,12 +15,12 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.rule.biulder;
+package org.apache.shardingsphere.dbdiscovery.rule.biulder;
import org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.constant.DatabaseDiscoveryOrder;
-import org.apache.shardingsphere.dbdiscovery.common.rule.DatabaseDiscoveryRule;
+import org.apache.shardingsphere.dbdiscovery.constant.DatabaseDiscoveryOrder;
+import org.apache.shardingsphere.dbdiscovery.rule.DatabaseDiscoveryRule;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.infra.rule.builder.level.FeatureRuleBuilder;
import org.apache.shardingsphere.infra.rule.builder.scope.SchemaRuleBuilder;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/checker/DatabaseDiscoveryRuleConfigurationChecker.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/checker/DatabaseDiscoveryRuleConfigurationChecker.java
similarity index 92%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/checker/DatabaseDiscoveryRuleConfigurationChecker.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/checker/DatabaseDiscoveryRuleConfigurationChecker.java
index eb7ad00..c3a8d2c 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/rule/checker/DatabaseDiscoveryRuleConfigurationChecker.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/checker/DatabaseDiscoveryRuleConfigurationChecker.java
@@ -15,11 +15,11 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.rule.checker;
+package org.apache.shardingsphere.dbdiscovery.rule.checker;
import com.google.common.base.Preconditions;
import org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.constant.DatabaseDiscoveryOrder;
+import org.apache.shardingsphere.dbdiscovery.constant.DatabaseDiscoveryOrder;
import org.apache.shardingsphere.infra.rule.checker.RuleConfigurationChecker;
/**
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/config/YamlDatabaseDiscoveryRuleConfiguration.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/config/YamlDatabaseDiscoveryRuleConfiguration.java
similarity index 90%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/config/YamlDatabaseDiscoveryRuleConfiguration.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/config/YamlDatabaseDiscoveryRuleConfiguration.java
index 868ee1d..f79b658 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/config/YamlDatabaseDiscoveryRuleConfiguration.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/config/YamlDatabaseDiscoveryRuleConfiguration.java
@@ -15,12 +15,12 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.yaml.config;
+package org.apache.shardingsphere.dbdiscovery.yaml.config;
import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.rule.YamlDatabaseDiscoveryDataSourceRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.rule.YamlDatabaseDiscoveryDataSourceRuleConfiguration;
import org.apache.shardingsphere.infra.yaml.config.YamlRuleConfiguration;
import org.apache.shardingsphere.infra.yaml.config.algorithm.YamlShardingSphereAlgorithmConfiguration;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/config/rule/YamlDatabaseDiscoveryDataSourceRuleConfiguration.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/config/rule/YamlDatabaseDiscoveryDataSourceRuleConfiguration.java
similarity index 94%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/config/rule/YamlDatabaseDiscoveryDataSourceRuleConfiguration.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/config/rule/YamlDatabaseDiscoveryDataSourceRuleConfiguration.java
index b1e3a81..50a8f32 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/config/rule/YamlDatabaseDiscoveryDataSourceRuleConfiguration.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/config/rule/YamlDatabaseDiscoveryDataSourceRuleConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.yaml.config.rule;
+package org.apache.shardingsphere.dbdiscovery.yaml.config.rule;
import lombok.Getter;
import lombok.Setter;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/converter/DatabaseDiscoveryRuleStatementConverter.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/converter/DatabaseDiscoveryRuleStatementConverter.java
similarity index 92%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/converter/DatabaseDiscoveryRuleStatementConverter.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/converter/DatabaseDiscoveryRuleStatementConverter.java
index 8ecb178..9a9eae0 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/converter/DatabaseDiscoveryRuleStatementConverter.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/converter/DatabaseDiscoveryRuleStatementConverter.java
@@ -15,12 +15,12 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.yaml.converter;
+package org.apache.shardingsphere.dbdiscovery.yaml.converter;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.rule.YamlDatabaseDiscoveryDataSourceRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.rule.YamlDatabaseDiscoveryDataSourceRuleConfiguration;
import org.apache.shardingsphere.distsql.parser.segment.rdl.DatabaseDiscoveryRuleSegment;
import org.apache.shardingsphere.infra.yaml.config.algorithm.YamlShardingSphereAlgorithmConfiguration;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapper.java
similarity index 88%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapper.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapper.java
index 7516fa3..23d909b 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapper.java
@@ -15,13 +15,13 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.yaml.swapper;
+package org.apache.shardingsphere.dbdiscovery.yaml.swapper;
-import org.apache.shardingsphere.dbdiscovery.common.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.constant.DatabaseDiscoveryOrder;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.rule.YamlDatabaseDiscoveryDataSourceRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.constant.DatabaseDiscoveryOrder;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.rule.YamlDatabaseDiscoveryDataSourceRuleConfiguration;
import org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapper;
import java.util.Collection;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/swapper/DatabaseDiscoveryRuleConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleConfigurationYamlSwapper.java
similarity index 92%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/swapper/DatabaseDiscoveryRuleConfigurationYamlSwapper.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleConfigurationYamlSwapper.java
index 2290cc5..7cfa0b9 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/java/org/apache/shardingsphere/dbdiscovery/common/yaml/swapper/DatabaseDiscoveryRuleConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleConfigurationYamlSwapper.java
@@ -15,16 +15,16 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.yaml.swapper;
+package org.apache.shardingsphere.dbdiscovery.yaml.swapper;
-import org.apache.shardingsphere.dbdiscovery.common.constant.DatabaseDiscoveryOrder;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.rule.YamlDatabaseDiscoveryDataSourceRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.constant.DatabaseDiscoveryOrder;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.rule.YamlDatabaseDiscoveryDataSourceRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmConfiguration;
import org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapper;
import org.apache.shardingsphere.infra.yaml.swapper.algorithm.ShardingSphereAlgorithmConfigurationYamlSwapper;
import org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
import java.util.Collection;
import java.util.LinkedHashMap;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.aware.DataSourceNameAware b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.aware.DataSourceNameAware
similarity index 89%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.aware.DataSourceNameAware
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.aware.DataSourceNameAware
index c62965e..422e226 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.aware.DataSourceNameAware
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.aware.DataSourceNameAware
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.dbdiscovery.common.aware.DatabaseDiscoveryDataSourceNameAware
+org.apache.shardingsphere.dbdiscovery.aware.DatabaseDiscoveryDataSourceNameAware
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.route.SQLRouter b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.route.SQLRouter
similarity index 100%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.route.SQLRouter
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.route.SQLRouter
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.rule.checker.RuleConfigurationChecker b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.rule.builder.scope.SchemaRuleBuilder
similarity index 81%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.rule.checker.RuleConfigurationChecker
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.rule.builder.scope.SchemaRuleBuilder
index 36993dc..393971f 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.rule.checker.RuleConfigurationChecker
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.rule.builder.scope.SchemaRuleBuilder
@@ -15,4 +15,5 @@
# limitations under the License.
#
-org.apache.shardingsphere.dbdiscovery.common.rule.checker.DatabaseDiscoveryRuleConfigurationChecker
+org.apache.shardingsphere.dbdiscovery.rule.biulder.DatabaseDiscoveryRuleBuilder
+org.apache.shardingsphere.dbdiscovery.rule.biulder.AlgorithmProvidedDatabaseDiscoveryRuleBuilder
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/test/resources/META-INF/services/org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.rule.checker.RuleConfigurationChecker
similarity index 89%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/test/resources/META-INF/services/org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.rule.checker.RuleConfigurationChecker
index e22a730..3e64ef1 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/test/resources/META-INF/services/org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.rule.checker.RuleConfigurationChecker
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.dbdiscovery.route.fixture.TestRouteDatabaseDiscoveryTypeFixture
+org.apache.shardingsphere.dbdiscovery.rule.checker.DatabaseDiscoveryRuleConfigurationChecker
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.rule.builder.scope.SchemaRuleBuilder b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapper
similarity index 78%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.rule.builder.scope.SchemaRuleBuilder
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapper
index 6ba4faf..8d6a9bc 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.rule.builder.scope.SchemaRuleBuilder
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapper
@@ -15,5 +15,5 @@
# limitations under the License.
#
-org.apache.shardingsphere.dbdiscovery.common.rule.biulder.DatabaseDiscoveryRuleBuilder
-org.apache.shardingsphere.dbdiscovery.common.rule.biulder.AlgorithmProvidedDatabaseDiscoveryRuleBuilder
+org.apache.shardingsphere.dbdiscovery.yaml.swapper.DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapper
+org.apache.shardingsphere.dbdiscovery.yaml.swapper.DatabaseDiscoveryRuleConfigurationYamlSwapper
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/test/java/org/apache/shardingsphere/dbdiscovery/route/fixture/TestRouteDatabaseDiscoveryTypeFixture.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/fixture/TestDatabaseDiscoveryType.java
similarity index 91%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/test/java/org/apache/shardingsphere/dbdiscovery/route/fixture/TestRouteDatabaseDiscoveryTypeFixture.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/fixture/TestDatabaseDiscoveryType.java
index 07714d0..444fd82 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/test/java/org/apache/shardingsphere/dbdiscovery/route/fixture/TestRouteDatabaseDiscoveryTypeFixture.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/fixture/TestDatabaseDiscoveryType.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.route.fixture;
+package org.apache.shardingsphere.dbdiscovery.fixture;
import org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType;
@@ -23,7 +23,7 @@ import javax.sql.DataSource;
import java.util.Collection;
import java.util.Map;
-public final class TestRouteDatabaseDiscoveryTypeFixture implements DatabaseDiscoveryType {
+public final class TestDatabaseDiscoveryType implements DatabaseDiscoveryType {
@Override
public void checkDatabaseDiscoveryConfig(final Map<String, DataSource> dataSourceMap, final String schemaName) {
@@ -50,6 +50,6 @@ public final class TestRouteDatabaseDiscoveryTypeFixture implements DatabaseDisc
@Override
public String getType() {
- return "TestRoute";
+ return "TEST";
}
}
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/test/java/org/apache/shardingsphere/dbdiscovery/route/engine/DatabaseDiscoverySQLRouterTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/route/DatabaseDiscoverySQLRouterTest.java
similarity index 97%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/test/java/org/apache/shardingsphere/dbdiscovery/route/engine/DatabaseDiscoverySQLRouterTest.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/route/DatabaseDiscoverySQLRouterTest.java
index d0b70a2..21b3205 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/src/test/java/org/apache/shardingsphere/dbdiscovery/route/engine/DatabaseDiscoverySQLRouterTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/route/DatabaseDiscoverySQLRouterTest.java
@@ -15,12 +15,11 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.route.engine;
+package org.apache.shardingsphere.dbdiscovery.route;
import org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.rule.DatabaseDiscoveryRule;
-import org.apache.shardingsphere.dbdiscovery.route.DatabaseDiscoverySQLRouter;
+import org.apache.shardingsphere.dbdiscovery.rule.DatabaseDiscoveryRule;
import org.apache.shardingsphere.infra.binder.LogicSQL;
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/rule/DatabaseDiscoveryDataSourceRuleTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryDataSourceRuleTest.java
similarity index 98%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/rule/DatabaseDiscoveryDataSourceRuleTest.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryDataSourceRuleTest.java
index 27cd4c3..84c74d6 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/rule/DatabaseDiscoveryDataSourceRuleTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryDataSourceRuleTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.rule;
+package org.apache.shardingsphere.dbdiscovery.rule;
import com.google.common.collect.ImmutableMap;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/rule/DatabaseDiscoveryRuleTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryRuleTest.java
similarity index 98%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/rule/DatabaseDiscoveryRuleTest.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryRuleTest.java
index 68e097c..7448001 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/rule/DatabaseDiscoveryRuleTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryRuleTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.rule;
+package org.apache.shardingsphere.dbdiscovery.rule;
import com.google.common.collect.ImmutableMap;
import org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/rule/biulder/AlgorithmProvidedDatabaseDiscoveryRuleBuilderTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/biulder/AlgorithmProvidedDatabaseDiscoveryRuleBuilderTest.java
similarity index 90%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/rule/biulder/AlgorithmProvidedDatabaseDiscoveryRuleBuilderTest.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/biulder/AlgorithmProvidedDatabaseDiscoveryRuleBuilderTest.java
index bfd8525..df74ad9 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/rule/biulder/AlgorithmProvidedDatabaseDiscoveryRuleBuilderTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/biulder/AlgorithmProvidedDatabaseDiscoveryRuleBuilderTest.java
@@ -15,15 +15,15 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.rule.biulder;
+package org.apache.shardingsphere.dbdiscovery.rule.biulder;
-import org.apache.shardingsphere.dbdiscovery.common.rule.DatabaseDiscoveryRule;
+import org.apache.shardingsphere.dbdiscovery.rule.DatabaseDiscoveryRule;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.infra.rule.builder.scope.SchemaRuleBuilder;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.infra.spi.ordered.OrderedSPIRegistry;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
import org.junit.Test;
import java.util.Collections;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/rule/biulder/DatabaseDiscoveryRuleBuilderTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/biulder/DatabaseDiscoveryRuleBuilderTest.java
similarity index 94%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/rule/biulder/DatabaseDiscoveryRuleBuilderTest.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/biulder/DatabaseDiscoveryRuleBuilderTest.java
index ae48237..d0072a5 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/rule/biulder/DatabaseDiscoveryRuleBuilderTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/rule/biulder/DatabaseDiscoveryRuleBuilderTest.java
@@ -15,11 +15,11 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.rule.biulder;
+package org.apache.shardingsphere.dbdiscovery.rule.biulder;
import org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.rule.DatabaseDiscoveryRule;
+import org.apache.shardingsphere.dbdiscovery.rule.DatabaseDiscoveryRule;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.infra.rule.builder.scope.SchemaRuleBuilder;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/yaml/converter/DatabaseDiscoveryRuleStatementConverterTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/converter/DatabaseDiscoveryRuleStatementConverterTest.java
similarity index 94%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/yaml/converter/DatabaseDiscoveryRuleStatementConverterTest.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/converter/DatabaseDiscoveryRuleStatementConverterTest.java
index 1245699..af8a61f 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/yaml/converter/DatabaseDiscoveryRuleStatementConverterTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/converter/DatabaseDiscoveryRuleStatementConverterTest.java
@@ -15,9 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.yaml.converter;
+package org.apache.shardingsphere.dbdiscovery.yaml.converter;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.distsql.parser.segment.rdl.DatabaseDiscoveryRuleSegment;
import org.junit.Test;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/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
similarity index 86%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapperTest.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapperTest.java
index b80a5f0..7bc3bb7 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/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
@@ -15,14 +15,15 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.yaml.swapper;
+package org.apache.shardingsphere.dbdiscovery.yaml.swapper;
import com.google.common.collect.ImmutableMap;
+import org.apache.shardingsphere.dbdiscovery.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.constant.DatabaseDiscoveryOrder;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.constant.DatabaseDiscoveryOrder;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.mgr.MGRDatabaseDiscoveryType;
+import org.hamcrest.CoreMatchers;
import org.junit.Test;
import java.util.Collections;
@@ -68,7 +69,7 @@ public final class DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwappe
@Test
public void assertGetOrder() {
- assertThat(swapper.getOrder(), is(DatabaseDiscoveryOrder.ALGORITHM_PROVIDER_DB_DISCOVERY_ORDER));
+ assertThat(swapper.getOrder(), CoreMatchers.is(DatabaseDiscoveryOrder.ALGORITHM_PROVIDER_DB_DISCOVERY_ORDER));
}
private YamlDatabaseDiscoveryRuleConfiguration createYamlHARuleConfiguration() {
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/yaml/swapper/DatabaseDiscoveryRuleConfigurationYamlSwapperTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleConfigurationYamlSwapperTest.java
similarity index 92%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/yaml/swapper/DatabaseDiscoveryRuleConfigurationYamlSwapperTest.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleConfigurationYamlSwapperTest.java
index 1eb6d18..e8879c36 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/yaml/swapper/DatabaseDiscoveryRuleConfigurationYamlSwapperTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/DatabaseDiscoveryRuleConfigurationYamlSwapperTest.java
@@ -15,17 +15,18 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.yaml.swapper;
+package org.apache.shardingsphere.dbdiscovery.yaml.swapper;
import com.google.common.collect.ImmutableMap;
import org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.constant.DatabaseDiscoveryOrder;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.rule.YamlDatabaseDiscoveryDataSourceRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.constant.DatabaseDiscoveryOrder;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.rule.YamlDatabaseDiscoveryDataSourceRuleConfiguration;
import org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmConfiguration;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapper;
+import org.hamcrest.CoreMatchers;
import org.junit.Test;
import java.util.Arrays;
@@ -103,7 +104,7 @@ public final class DatabaseDiscoveryRuleConfigurationYamlSwapperTest {
public void assertGetOrder() {
DatabaseDiscoveryRuleConfigurationYamlSwapper swapper = getHARuleConfigurationYamlSwapper();
int actual = swapper.getOrder();
- assertThat(actual, is(DatabaseDiscoveryOrder.ORDER));
+ assertThat(actual, CoreMatchers.is(DatabaseDiscoveryOrder.ORDER));
}
private DatabaseDiscoveryRuleConfigurationYamlSwapper getHARuleConfigurationYamlSwapper() {
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/yaml/swapper/YamlRootRuleConfigurationsForYamlDatabaseDiscoveryRuleConfigurationTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/YamlRootRuleConfigurationsForYamlDatabaseDiscoveryRuleConfigurationTest.java
similarity index 95%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/yaml/swapper/YamlRootRuleConfigurationsForYamlDatabaseDiscoveryRuleConfigurationTest.java
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/YamlRootRuleConfigurationsForYamlDatabaseDiscoveryRuleConfigurationTest.java
index 1adbf22..ea106f7 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/java/org/apache/shardingsphere/dbdiscovery/common/yaml/swapper/YamlRootRuleConfigurationsForYamlDatabaseDiscoveryRuleConfigurationTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/java/org/apache/shardingsphere/dbdiscovery/yaml/swapper/YamlRootRuleConfigurationsForYamlDatabaseDiscoveryRuleConfigurationTest.java
@@ -15,11 +15,11 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dbdiscovery.common.yaml.swapper;
+package org.apache.shardingsphere.dbdiscovery.yaml.swapper;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.infra.yaml.config.YamlRootRuleConfigurations;
import org.apache.shardingsphere.infra.yaml.engine.YamlEngine;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
import org.junit.Test;
import java.io.BufferedReader;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/resources/META-INF/services/org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/resources/META-INF/services/org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType
similarity index 90%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/resources/META-INF/services/org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/resources/META-INF/services/org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType
index 5356ba3..9e6ce7a 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/resources/META-INF/services/org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/resources/META-INF/services/org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.dbdiscovery.common.fixture.TestDatabaseDiscoveryTypeFixture
+org.apache.shardingsphere.dbdiscovery.fixture.TestDatabaseDiscoveryType
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/resources/logback-test.xml b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/resources/logback-test.xml
similarity index 100%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/resources/logback-test.xml
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/resources/logback-test.xml
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/resources/yaml/db-discovery-rule.yaml b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/resources/yaml/db-discovery-rule.yaml
similarity index 100%
rename from shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-common/src/test/resources/yaml/db-discovery-rule.yaml
rename to shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/test/resources/yaml/db-discovery-rule.yaml
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/pom.xml b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/pom.xml
deleted file mode 100644
index a3ddf63..0000000
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-route/pom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-db-discovery</artifactId>
- <version>5.0.0-RC1-SNAPSHOT</version>
- </parent>
- <artifactId>shardingsphere-db-discovery-route</artifactId>
- <name>${project.artifactId}</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-infra-route</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-db-discovery-common</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-</project>
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/pom.xml b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/pom.xml
index cbd7c76..a6131da 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/pom.xml
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/pom.xml
@@ -31,7 +31,7 @@
<dependencies>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-db-discovery-common</artifactId>
+ <artifactId>shardingsphere-db-discovery-core</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/src/main/java/org/apache/shardingsphere/dbdiscovery/spring/boot/DatabaseDiscoveryRuleSpringbootConfiguration.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/src/main/java/org/apache/shardingsphere/dbdiscovery/spring/boot/DatabaseDiscoveryRuleSpringboo [...]
index 95d0d49..60d2eb9 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/src/main/java/org/apache/shardingsphere/dbdiscovery/spring/boot/DatabaseDiscoveryRuleSpringbootConfiguration.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/src/main/java/org/apache/shardingsphere/dbdiscovery/spring/boot/DatabaseDiscoveryRuleSpringbootConfiguration.java
@@ -20,8 +20,8 @@ package org.apache.shardingsphere.dbdiscovery.spring.boot;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.dbdiscovery.spring.boot.rule.YamlDatabaseDiscoveryRuleSpringBootConfiguration;
import org.apache.shardingsphere.dbdiscovery.spring.boot.condition.DatabaseDiscoverySpringBootCondition;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.swapper.DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapper;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.yaml.swapper.DatabaseDiscoveryRuleAlgorithmProviderConfigurationYamlSwapper;
import org.apache.shardingsphere.infra.config.RuleConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/src/main/java/org/apache/shardingsphere/dbdiscovery/spring/boot/rule/YamlDatabaseDiscoveryRuleSpringBootConfiguration.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/src/main/java/org/apache/shardingsphere/dbdiscovery/spring/boot/rule/YamlDatabaseDisc [...]
index 77d45f4..c7596a0 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/src/main/java/org/apache/shardingsphere/dbdiscovery/spring/boot/rule/YamlDatabaseDiscoveryRuleSpringBootConfiguration.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/src/main/java/org/apache/shardingsphere/dbdiscovery/spring/boot/rule/YamlDatabaseDiscoveryRuleSpringBootConfiguration.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.dbdiscovery.spring.boot.rule;
import lombok.Getter;
import lombok.Setter;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/src/test/java/org/apache/shardingsphere/dbdiscovery/spring/boot/DatabaseDiscoverySpringBootStarterTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/src/test/java/org/apache/shardingsphere/dbdiscovery/spring/boot/DatabaseDiscoverySpringBootStarterTest.java
index d71975a..e43bf7d 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/src/test/java/org/apache/shardingsphere/dbdiscovery/spring/boot/DatabaseDiscoverySpringBootStarterTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-boot-starter/src/test/java/org/apache/shardingsphere/dbdiscovery/spring/boot/DatabaseDiscoverySpringBootStarterTest.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.dbdiscovery.spring.boot;
-import org.apache.shardingsphere.dbdiscovery.common.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/pom.xml b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/pom.xml
index 63bf892..4cf30dd 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/pom.xml
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/pom.xml
@@ -31,7 +31,7 @@
<dependencies>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-db-discovery-common</artifactId>
+ <artifactId>shardingsphere-db-discovery-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/src/main/java/org/apache/shardingsphere/dbdiscovery/spring/namespace/parser/DatabaseDiscoveryRuleBeanDefinitionParser.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/src/main/java/org/apache/shardingsphere/dbdiscovery/spring/namespace/parser/DatabaseDiscove [...]
index 5af761e..1eb95e8 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/src/main/java/org/apache/shardingsphere/dbdiscovery/spring/namespace/parser/DatabaseDiscoveryRuleBeanDefinitionParser.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-spring/shardingsphere-db-discovery-spring-namespace/src/main/java/org/apache/shardingsphere/dbdiscovery/spring/namespace/parser/DatabaseDiscoveryRuleBeanDefinitionParser.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.dbdiscovery.spring.namespace.parser;
-import org.apache.shardingsphere.dbdiscovery.common.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.algorithm.config.AlgorithmProvidedDatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.spring.namespace.tag.DatabaseDiscoveryRuleBeanDefinitionTag;
import org.springframework.beans.factory.config.BeanDefinition;
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/pom.xml b/shardingsphere-jdbc/shardingsphere-jdbc-core/pom.xml
index d3bcbc4..41bde0b 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/pom.xml
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/pom.xml
@@ -69,7 +69,7 @@
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-db-discovery-route</artifactId>
+ <artifactId>shardingsphere-db-discovery-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/pom.xml b/shardingsphere-proxy/shardingsphere-proxy-backend/pom.xml
index 671862f..0947391 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/pom.xml
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/pom.xml
@@ -74,7 +74,7 @@
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-db-discovery-route</artifactId>
+ <artifactId>shardingsphere-db-discovery-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterDatabaseDiscoveryRuleBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterDatabaseDiscoveryRuleBackendHandler.java
index c6e0897..ccd8880 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterDatabaseDiscoveryRuleBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterDatabaseDiscoveryRuleBackendHandler.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
import org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.converter.DatabaseDiscoveryRuleStatementConverter;
+import org.apache.shardingsphere.dbdiscovery.yaml.converter.DatabaseDiscoveryRuleStatementConverter;
import org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType;
import org.apache.shardingsphere.distsql.parser.segment.rdl.DatabaseDiscoveryRuleSegment;
import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterDatabaseDiscoveryRuleStatement;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseDiscoveryRuleBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseDiscoveryRuleBackendHandler.java
index b728c77..bf139fa 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseDiscoveryRuleBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseDiscoveryRuleBackendHandler.java
@@ -19,8 +19,8 @@ package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
import org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration;
import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
-import org.apache.shardingsphere.dbdiscovery.common.yaml.converter.DatabaseDiscoveryRuleStatementConverter;
+import org.apache.shardingsphere.dbdiscovery.yaml.config.YamlDatabaseDiscoveryRuleConfiguration;
+import org.apache.shardingsphere.dbdiscovery.yaml.converter.DatabaseDiscoveryRuleStatementConverter;
import org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType;
import org.apache.shardingsphere.distsql.parser.segment.rdl.DatabaseDiscoveryRuleSegment;
import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.CreateDatabaseDiscoveryRuleStatement;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-common/pom.xml b/shardingsphere-proxy/shardingsphere-proxy-common/pom.xml
index be38a3d..1850bd5 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-common/pom.xml
+++ b/shardingsphere-proxy/shardingsphere-proxy-common/pom.xml
@@ -54,7 +54,7 @@
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-db-discovery-common</artifactId>
+ <artifactId>shardingsphere-db-discovery-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>