You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/07/28 07:28:54 UTC
[shardingsphere] branch master updated: Polish orchestration api
and common modules (#6485)
This is an automated email from the ASF dual-hosted git repository.
zhangyonglun 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 e4d9837 Polish orchestration api and common modules (#6485)
e4d9837 is described below
commit e4d983765aab9dc5ce3245cee503dbeafd509164
Author: Liang Zhang <te...@163.com>
AuthorDate: Tue Jul 28 15:28:44 2020 +0800
Polish orchestration api and common modules (#6485)
* Move ConfigKeyUtils to common package
* Move ConfigKeyUtils to common module
* Move exception to common module
* Remove useless test cases
* Revise java doc
* Revise java doc
* Remove test cases for orche api module
* Revise javadoc
* rename yaml package
* Refactor OrchestrationConfigurationYamlSwapper
* Rename OrchestrationCenterConfigurationYamlSwapperTest
* Add more test cases for OrchestrationConfigurationYamlSwapperTest
* Add more test cases for OrchestrationConfigurationYamlSwapperTest
---
.../swapper/ClusterConfigurationYamlSwapper.java | 4 +-
.../swapper/MetricsConfigurationYamlSwapper.java | 14 +--
.../DataSourceConfigurationYamlSwapper.java | 6 +-
.../yaml/RuleSchemaMetaDataYamlSwapper.java | 6 +-
.../repository/api/OrchestrationRepository.java | 4 +-
.../repository/api/listener/DataChangedEvent.java | 2 +-
.../api/listener/DataChangedEventListener.java | 6 +-
.../api/fixture/TestConfigurationRepository.java | 74 ------------
.../api/listener/DataChangedEventListenerTest.java | 36 ------
.../src/test/resources/logback-test.xml | 35 ------
.../org.mockito.plugins.MockMaker | 18 ---
.../common}/exception/OrchestrationException.java | 2 +-
.../repository/common}/util/ConfigKeyUtils.java | 4 +-
.../YamlOrchestrationCenterConfiguration.java | 2 +-
.../config/YamlOrchestrationConfiguration.java | 2 +-
...rchestrationCenterConfigurationYamlSwapper.java | 4 +-
.../OrchestrationConfigurationYamlSwapper.java | 30 ++---
.../OrchestrationConfigurationYamlSwapperTest.java | 67 -----------
.../exception/OrchestrationExceptionTest.java | 2 +-
.../common}/util/ConfigKeyUtilsTest.java | 2 +-
...trationCenterConfigurationYamlSwapperTest.java} | 20 ++--
.../OrchestrationConfigurationYamlSwapperTest.java | 128 +++++++++++++++++++++
.../pom.xml | 5 +
.../repository/apollo/ApolloRepository.java | 2 +-
.../repository/apollo/ApolloRepositoryTest.java | 6 +-
.../apollo/wrapper/ApolloOpenApiWrapperTest.java | 2 +-
.../pom.xml | 5 +
.../pom.xml | 5 +
.../repository/nacos/NacosRepository.java | 4 +-
.../pom.xml | 5 +
.../handler/CuratorZookeeperExceptionHandler.java | 2 +-
.../zookeeper/CuratorZookeeperRepositoryTest.java | 2 +-
.../CuratorZookeeperExceptionHandlerTest.java | 2 +-
...eAlgorithmProviderConfigurationYamlSwapper.java | 4 +-
.../EncryptRuleConfigurationYamlSwapper.java | 4 +-
.../EncryptColumnRuleConfigurationYamlSwapper.java | 6 +-
.../EncryptTableRuleConfigurationYamlSwapper.java | 6 +-
...eAlgorithmProviderConfigurationYamlSwapper.java | 4 +-
.../MasterSlaveRuleConfigurationYamlSwapper.java | 10 +-
.../ReplicaRuleConfigurationYamlSwapper.java | 4 +-
.../ShadowRuleConfigurationYamlSwapper.java | 4 +-
...eAlgorithmProviderConfigurationYamlSwapper.java | 12 +-
.../ShardingRuleConfigurationYamlSwapper.java | 14 +--
...rdingAutoTableRuleConfigurationYamlSwapper.java | 14 +--
.../ShardingTableRuleConfigurationYamlSwapper.java | 18 +--
...eyGenerateStrategyConfigurationYamlSwapper.java | 4 +-
.../ShardingStrategyConfigurationYamlSwapper.java | 16 +--
.../yaml/swapper/AuthenticationYamlSwapper.java | 6 +-
.../auth/yaml/swapper/ProxyUserYamlSwapper.java | 8 +-
.../infra/yaml/swapper/YamlSwapper.java | 4 +-
...ingSphereAlgorithmConfigurationYamlSwapper.java | 4 +-
...chestrationShardingSphereDataSourceFactory.java | 2 +-
...strationRepositoryConfigurationSwapperUtil.java | 4 +-
.../YamlOrchestrationRootRuleConfigurations.java | 2 +-
.../YamlInstanceConfigurationSwapperUtilTest.java | 4 +-
.../OrchestrationSpringBootConfiguration.java | 4 +-
.../OrchestrationSpringBootRootConfiguration.java | 2 +-
.../additional-spring-configuration-metadata.json | 2 +-
.../config/yaml/YamlProxyServerConfiguration.java | 2 +-
.../OrchestrationConfigurationConverter.java | 4 +-
60 files changed, 298 insertions(+), 378 deletions(-)
diff --git a/shardingsphere-control-panel/shardingsphere-cluster/shardingsphere-cluster-configuration/src/main/java/org/apache/shardingsphere/cluster/configuration/swapper/ClusterConfigurationYamlSwapper.java b/shardingsphere-control-panel/shardingsphere-cluster/shardingsphere-cluster-configuration/src/main/java/org/apache/shardingsphere/cluster/configuration/swapper/ClusterConfigurationYamlSwapper.java
index 3e2f79c..bfc3769 100644
--- a/shardingsphere-control-panel/shardingsphere-cluster/shardingsphere-cluster-configuration/src/main/java/org/apache/shardingsphere/cluster/configuration/swapper/ClusterConfigurationYamlSwapper.java
+++ b/shardingsphere-control-panel/shardingsphere-cluster/shardingsphere-cluster-configuration/src/main/java/org/apache/shardingsphere/cluster/configuration/swapper/ClusterConfigurationYamlSwapper.java
@@ -44,10 +44,10 @@ public final class ClusterConfigurationYamlSwapper implements YamlSwapper<YamlCl
}
@Override
- public ClusterConfiguration swapToObject(final YamlClusterConfiguration yamlConfiguration) {
+ public ClusterConfiguration swapToObject(final YamlClusterConfiguration yamlConfig) {
final ClusterConfiguration clusterConfiguration = new ClusterConfiguration();
final HeartbeatConfiguration heartBeatConfiguration = new HeartbeatConfiguration();
- YamlHeartbeatConfiguration heartbeat = yamlConfiguration.getHeartbeat();
+ YamlHeartbeatConfiguration heartbeat = yamlConfig.getHeartbeat();
heartBeatConfiguration.setSql(heartbeat.getSql());
heartBeatConfiguration.setInterval(heartbeat.getInterval());
heartBeatConfiguration.setRetryEnable(heartbeat.isRetryEnable());
diff --git a/shardingsphere-control-panel/shardingsphere-metrics/shardingsphere-metrics-configuration/src/main/java/org/apache/shardingsphere/metrics/configuration/swapper/MetricsConfigurationYamlSwapper.java b/shardingsphere-control-panel/shardingsphere-metrics/shardingsphere-metrics-configuration/src/main/java/org/apache/shardingsphere/metrics/configuration/swapper/MetricsConfigurationYamlSwapper.java
index 23fb8a1..99cb8fe 100644
--- a/shardingsphere-control-panel/shardingsphere-metrics/shardingsphere-metrics-configuration/src/main/java/org/apache/shardingsphere/metrics/configuration/swapper/MetricsConfigurationYamlSwapper.java
+++ b/shardingsphere-control-panel/shardingsphere-metrics/shardingsphere-metrics-configuration/src/main/java/org/apache/shardingsphere/metrics/configuration/swapper/MetricsConfigurationYamlSwapper.java
@@ -40,13 +40,13 @@ public final class MetricsConfigurationYamlSwapper implements YamlSwapper<YamlMe
}
@Override
- public MetricsConfiguration swapToObject(final YamlMetricsConfiguration metricsConfiguration) {
- return new MetricsConfiguration(metricsConfiguration.getName(), metricsConfiguration.getHost(),
- 0 == metricsConfiguration.getPort() ? MetricsConfiguration.DEFAULT_PORT : metricsConfiguration.getPort(),
- null == metricsConfiguration.getAsync() ? true : metricsConfiguration.getAsync(),
- null == metricsConfiguration.getEnable() ? true : metricsConfiguration.getEnable(),
- 0 == metricsConfiguration.getThreadCount() ? Runtime.getRuntime().availableProcessors() << 1 : metricsConfiguration.getThreadCount(),
- metricsConfiguration.getProps());
+ public MetricsConfiguration swapToObject(final YamlMetricsConfiguration yamlConfig) {
+ return new MetricsConfiguration(yamlConfig.getName(), yamlConfig.getHost(),
+ 0 == yamlConfig.getPort() ? MetricsConfiguration.DEFAULT_PORT : yamlConfig.getPort(),
+ null == yamlConfig.getAsync() ? true : yamlConfig.getAsync(),
+ null == yamlConfig.getEnable() ? true : yamlConfig.getEnable(),
+ 0 == yamlConfig.getThreadCount() ? Runtime.getRuntime().availableProcessors() << 1 : yamlConfig.getThreadCount(),
+ yamlConfig.getProps());
}
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-common/src/main/java/org/apache/shardingsphere/orchestration/core/common/configuration/DataSourceConfigurationYamlSwapper.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-common/src/main/java/org/apache/shardingsphere/orchestration/core/common/configuration/DataSourceCo [...]
index 47065ee..e6b9e61 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-common/src/main/java/org/apache/shardingsphere/orchestration/core/common/configuration/DataSourceConfigurationYamlSwapper.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-common/src/main/java/org/apache/shardingsphere/orchestration/core/common/configuration/DataSourceConfigurationYamlSwapper.java
@@ -34,9 +34,9 @@ public final class DataSourceConfigurationYamlSwapper implements YamlSwapper<Yam
}
@Override
- public DataSourceConfiguration swapToObject(final YamlDataSourceConfiguration yamlConfiguration) {
- DataSourceConfiguration result = new DataSourceConfiguration(yamlConfiguration.getDataSourceClassName());
- result.getProps().putAll(yamlConfiguration.getProps());
+ public DataSourceConfiguration swapToObject(final YamlDataSourceConfiguration yamlConfig) {
+ DataSourceConfiguration result = new DataSourceConfiguration(yamlConfig.getDataSourceClassName());
+ result.getProps().putAll(yamlConfig.getProps());
return result;
}
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-metadata/src/main/java/org/apache/shardingsphere/orchestration/core/metadata/yaml/RuleSchemaMetaDataYamlSwapper.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-metadata/src/main/java/org/apache/shardingsphere/orchestration/core/metadata/yaml/RuleSchemaMetaDataYamlSwapper.java
index 7a8ee15..0446a4a 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-metadata/src/main/java/org/apache/shardingsphere/orchestration/core/metadata/yaml/RuleSchemaMetaDataYamlSwapper.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-metadata/src/main/java/org/apache/shardingsphere/orchestration/core/metadata/yaml/RuleSchemaMetaDataYamlSwapper.java
@@ -48,9 +48,9 @@ public final class RuleSchemaMetaDataYamlSwapper implements YamlSwapper<YamlRule
}
@Override
- public RuleSchemaMetaData swapToObject(final YamlRuleSchemaMetaData yaml) {
- SchemaMetaData configured = Optional.ofNullable(yaml.getConfiguredSchemaMetaData()).map(this::convertSchema).orElse(new SchemaMetaData(new HashMap<>()));
- Map<String, SchemaMetaData> unconfigured = Optional.ofNullable(yaml.getUnconfiguredSchemaMetaDataMap()).map(e -> e.entrySet().stream()
+ public RuleSchemaMetaData swapToObject(final YamlRuleSchemaMetaData yamlConfig) {
+ SchemaMetaData configured = Optional.ofNullable(yamlConfig.getConfiguredSchemaMetaData()).map(this::convertSchema).orElse(new SchemaMetaData(new HashMap<>()));
+ Map<String, SchemaMetaData> unconfigured = Optional.ofNullable(yamlConfig.getUnconfiguredSchemaMetaDataMap()).map(e -> e.entrySet().stream()
.collect(Collectors.toMap(Entry::getKey, entry -> convertSchema(entry.getValue())))).orElse(new HashMap<>());
return new RuleSchemaMetaData(configured, unconfigured);
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/OrchestrationRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/OrchestrationRepository.java
index 7a9e2b7..ed35b6d 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/OrchestrationRepository.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/OrchestrationRepository.java
@@ -37,7 +37,7 @@ public interface OrchestrationRepository extends TypedSPI {
void init(String namespace, OrchestrationCenterConfiguration config);
/**
- * Get data from config center.
+ * Get data from orchestration center.
*
* <p>Maybe use cache if existed.</p>
*
@@ -63,7 +63,7 @@ public interface OrchestrationRepository extends TypedSPI {
List<String> getChildrenKeys(String key);
/**
- * Watch key or path of the config server.
+ * Watch key or path of orchestration server.
*
* @param key key of data
* @param dataChangedEventListener data changed event listener
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/listener/DataChangedEvent.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/listener/DataChangedEvent.java
index 395e56e..1f14c13 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/listener/DataChangedEvent.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/listener/DataChangedEvent.java
@@ -38,6 +38,6 @@ public final class DataChangedEvent {
*/
public enum ChangedType {
- UPDATED, DELETED, IGNORED, ADDED
+ ADDED, UPDATED, DELETED, IGNORED
}
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/listener/DataChangedEventListener.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/listener/DataChan [...]
index 7738aad..6a56e9e 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/listener/DataChangedEventListener.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/listener/DataChangedEventListener.java
@@ -18,14 +18,14 @@
package org.apache.shardingsphere.orchestration.repository.api.listener;
/**
- * Listener for data changed event.
+ * Listener for data changed.
*/
public interface DataChangedEventListener {
/**
* Fire when data changed.
*
- * @param dataChangedEvent data changed event
+ * @param event data changed event
*/
- void onChange(DataChangedEvent dataChangedEvent);
+ void onChange(DataChangedEvent event);
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/fixture/TestConfigurationRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/fixture/TestCon [...]
deleted file mode 100644
index 68e0b88..0000000
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/fixture/TestConfigurationRepository.java
+++ /dev/null
@@ -1,74 +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.orchestration.repository.api.fixture;
-
-import lombok.Getter;
-import lombok.Setter;
-import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
-import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationCenterConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEvent;
-import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Properties;
-
-@Getter
-@Setter
-public final class TestConfigurationRepository implements ConfigurationRepository {
-
- private Properties props = new Properties();
-
- @Override
- public void init(final String namespace, final OrchestrationCenterConfiguration config) {
- }
-
- @Override
- public String get(final String key) {
- return "";
- }
-
- @Override
- public List<String> getChildrenKeys(final String key) {
- return Collections.emptyList();
- }
-
- @Override
- public void persist(final String key, final String value) {
- }
-
- @Override
- public void watch(final String key, final DataChangedEventListener dataChangedEventListener) {
- DataChangedEvent.ChangedType type = DataChangedEvent.ChangedType.valueOf(key);
- DataChangedEvent event = new DataChangedEvent(type.name(), type.name(), type);
- dataChangedEventListener.onChange(event);
- }
-
- @Override
- public void delete(final String key) {
- }
-
- @Override
- public void close() {
- }
-
- @Override
- public String getType() {
- return "FirstTestConfigCenter";
- }
-}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/listener/DataChangedEventListenerTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/listener/Data [...]
deleted file mode 100644
index 749d924..0000000
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/listener/DataChangedEventListenerTest.java
+++ /dev/null
@@ -1,36 +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.orchestration.repository.api.listener;
-
-import org.apache.shardingsphere.orchestration.repository.api.fixture.TestConfigurationRepository;
-import org.junit.Test;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public final class DataChangedEventListenerTest {
-
- @Test
- public void assertOnChange() {
- TestConfigurationRepository repository = new TestConfigurationRepository();
- DataChangedEventListener listener = dataChangedEvent -> assertThat(dataChangedEvent.getChangedType().name(), is(dataChangedEvent.getValue()));
- repository.watch("UPDATED", listener);
- repository.watch("DELETED", listener);
- repository.watch("IGNORED", listener);
- }
-}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/resources/logback-test.xml b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/resources/logback-test.xml
deleted file mode 100644
index 8515adc..0000000
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/resources/logback-test.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.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.
- -->
-
-<configuration>
- <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n</pattern>
- </encoder>
- </appender>
- <logger name="org.apache.shardingsphere" level="info" additivity="false">
- <appender-ref ref="console"/>
- </logger>
- <logger name="org.apache.shardingsphere.infra.log.ConfigurationLogger" level="off" />
- <logger name="ShardingSphere-metadata" level="off" />
-
- <root>
- <level value="error" />
- <appender-ref ref="console" />
- </root>
-</configuration>
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
deleted file mode 100644
index c9217d3..0000000
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
+++ /dev/null
@@ -1,18 +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.
-#
-
-mock-maker-inline
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/exception/OrchestrationException.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/exception/Or [...]
similarity index 94%
rename from shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/exception/OrchestrationException.java
rename to shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/exception/OrchestrationException.java
index 6fd0704..ee51da9 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/exception/OrchestrationException.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/exception/OrchestrationException.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.orchestration.repository.api.exception;
+package org.apache.shardingsphere.orchestration.repository.common.exception;
/**
* Orchestration exception.
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/util/ConfigKeyUtils.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/util/ConfigKeyUtils.java
similarity index 94%
rename from shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/util/ConfigKeyUtils.java
rename to shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/util/ConfigKeyUtils.java
index 7c42805..4629a9a 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/util/ConfigKeyUtils.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/util/ConfigKeyUtils.java
@@ -15,10 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.orchestration.repository.api.util;
+package org.apache.shardingsphere.orchestration.repository.common.util;
/**
- * Config key utils.
+ * Config key utilities.
*/
public final class ConfigKeyUtils {
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/config/YamlOrchestrationCenterConfiguration.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration [...]
similarity index 98%
rename from shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/config/YamlOrchestrationCenterConfiguration.java
rename to shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/yaml/config/YamlOrchestrationCenterConfiguration.java
index ce014c8..dc36947 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/config/YamlOrchestrationCenterConfiguration.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/yaml/config/YamlOrchestrationCenterConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.orchestration.repository.common.configuration.config;
+package org.apache.shardingsphere.orchestration.repository.common.yaml.config;
import lombok.Getter;
import lombok.Setter;
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/config/YamlOrchestrationConfiguration.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repos [...]
similarity index 98%
rename from shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/config/YamlOrchestrationConfiguration.java
rename to shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/yaml/config/YamlOrchestrationConfiguration.java
index 56c0022..ac57513 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/config/YamlOrchestrationConfiguration.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/yaml/config/YamlOrchestrationConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.orchestration.repository.common.configuration.config;
+package org.apache.shardingsphere.orchestration.repository.common.yaml.config;
import lombok.Getter;
import lombok.Setter;
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationCenterConfigurationYamlSwapper.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orche [...]
similarity index 95%
rename from shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationCenterConfigurationYamlSwapper.java
rename to shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/yaml/swapper/OrchestrationCenterConfigurationYamlSwapper.java
index 8f2c8a9..d31b2fa 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationCenterConfigurationYamlSwapper.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/yaml/swapper/OrchestrationCenterConfigurationYamlSwapper.java
@@ -15,9 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.orchestration.repository.common.configuration.swapper;
+package org.apache.shardingsphere.orchestration.repository.common.yaml.swapper;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationCenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationCenterConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationCenterConfiguration;
import org.apache.shardingsphere.infra.yaml.swapper.YamlSwapper;
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationConfigurationYamlSwapper.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestrati [...]
similarity index 51%
rename from shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationConfigurationYamlSwapper.java
rename to shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/yaml/swapper/OrchestrationConfigurationYamlSwapper.java
index 948134c..aeb4c20 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationConfigurationYamlSwapper.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/yaml/swapper/OrchestrationConfigurationYamlSwapper.java
@@ -15,36 +15,38 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.orchestration.repository.common.configuration.swapper;
+package org.apache.shardingsphere.orchestration.repository.common.yaml.swapper;
import org.apache.shardingsphere.infra.yaml.swapper.YamlSwapper;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationCenterConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationConfiguration;
/**
- * Orchestration instance configuration YAML swapper.
+ * Orchestration configuration YAML swapper.
*/
public final class OrchestrationConfigurationYamlSwapper implements YamlSwapper<YamlOrchestrationConfiguration, OrchestrationConfiguration> {
- private final OrchestrationCenterConfigurationYamlSwapper swapper = new OrchestrationCenterConfigurationYamlSwapper();
+ private final OrchestrationCenterConfigurationYamlSwapper orchestrationCenterConfigurationSwapper = new OrchestrationCenterConfigurationYamlSwapper();
@Override
- public YamlOrchestrationConfiguration swapToYamlConfiguration(final OrchestrationConfiguration configuration) {
+ public YamlOrchestrationConfiguration swapToYamlConfiguration(final OrchestrationConfiguration data) {
YamlOrchestrationConfiguration result = new YamlOrchestrationConfiguration();
- result.setNamespace(configuration.getNamespace());
- result.setRegistryCenter(swapper.swapToYamlConfiguration(configuration.getRegistryCenterConfiguration()));
- if (configuration.getAdditionalConfigCenterConfiguration().isPresent()) {
- result.setAdditionalConfigCenter(swapper.swapToYamlConfiguration(configuration.getAdditionalConfigCenterConfiguration().get()));
+ result.setNamespace(data.getNamespace());
+ result.setRegistryCenter(orchestrationCenterConfigurationSwapper.swapToYamlConfiguration(data.getRegistryCenterConfiguration()));
+ if (data.getAdditionalConfigCenterConfiguration().isPresent()) {
+ result.setAdditionalConfigCenter(orchestrationCenterConfigurationSwapper.swapToYamlConfiguration(data.getAdditionalConfigCenterConfiguration().get()));
}
return result;
}
@Override
- public OrchestrationConfiguration swapToObject(final YamlOrchestrationConfiguration configuration) {
- if (null != configuration.getAdditionalConfigCenter()) {
- return new OrchestrationConfiguration(configuration.getNamespace(), swapper.swapToObject(configuration.getRegistryCenter()),
- swapper.swapToObject(configuration.getAdditionalConfigCenter()), configuration.isOverwrite());
+ public OrchestrationConfiguration swapToObject(final YamlOrchestrationConfiguration yamlConfig) {
+ OrchestrationCenterConfiguration registryCenter = orchestrationCenterConfigurationSwapper.swapToObject(yamlConfig.getRegistryCenter());
+ if (null == yamlConfig.getAdditionalConfigCenter()) {
+ return new OrchestrationConfiguration(yamlConfig.getNamespace(), registryCenter, yamlConfig.isOverwrite());
}
- return new OrchestrationConfiguration(configuration.getNamespace(), swapper.swapToObject(configuration.getRegistryCenter()), configuration.isOverwrite());
+ OrchestrationCenterConfiguration additionalConfigCenter = orchestrationCenterConfigurationSwapper.swapToObject(yamlConfig.getAdditionalConfigCenter());
+ return new OrchestrationConfiguration(yamlConfig.getNamespace(), registryCenter, additionalConfigCenter, yamlConfig.isOverwrite());
}
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationConfigurationYamlSwapperTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchest [...]
deleted file mode 100644
index daf6b22..0000000
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationConfigurationYamlSwapperTest.java
+++ /dev/null
@@ -1,67 +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.orchestration.repository.common.configuration.swapper;
-
-import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationCenterConfiguration;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationConfiguration;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationCenterConfiguration;
-import org.junit.Test;
-
-import java.util.Properties;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public final class OrchestrationConfigurationYamlSwapperTest {
-
- private static final String LOGIC_SCHEMA = "logic_schema";
-
- @Test
- public void assertSwapToYamlOrchestrationConfiguration() {
- OrchestrationConfiguration data = getOrchestrationConfiguration();
- YamlOrchestrationConfiguration result = new OrchestrationConfigurationYamlSwapper().swapToYamlConfiguration(data);
- assertThat(result.getRegistryCenter().getType(), is(data.getRegistryCenterConfiguration().getType()));
- assertThat(result.getRegistryCenter().getServerLists(), is(data.getRegistryCenterConfiguration().getServerLists()));
- assertThat(result.getRegistryCenter().getProps(), is(data.getRegistryCenterConfiguration().getProps()));
- }
-
- private OrchestrationConfiguration getOrchestrationConfiguration() {
- return new OrchestrationConfiguration(LOGIC_SCHEMA, new OrchestrationCenterConfiguration("ZooKeeper", "127.0.0.1:2181,127.0.0.1:2182", new Properties()), false);
- }
-
- @Test
- public void assertSwapToOrchestrationConfiguration() {
- YamlOrchestrationConfiguration data = getYamlOrchestrationConfiguration();
- OrchestrationConfiguration result = new OrchestrationConfigurationYamlSwapper().swapToObject(data);
- assertThat(result.getRegistryCenterConfiguration().getType(), is(data.getRegistryCenter().getType()));
- assertThat(result.getRegistryCenterConfiguration().getServerLists(), is(data.getRegistryCenter().getServerLists()));
- assertThat(result.getRegistryCenterConfiguration().getProps(), is(data.getRegistryCenter().getProps()));
- }
-
- private YamlOrchestrationConfiguration getYamlOrchestrationConfiguration() {
- YamlOrchestrationCenterConfiguration registryCenterConfig = new YamlOrchestrationCenterConfiguration();
- registryCenterConfig.setType("ZooKeeper");
- registryCenterConfig.setProps(new Properties());
- registryCenterConfig.setServerLists("127.0.0.1:2181,127.0.0.1:2182");
- YamlOrchestrationConfiguration result = new YamlOrchestrationConfiguration();
- result.setNamespace(LOGIC_SCHEMA);
- result.setRegistryCenter(registryCenterConfig);
- return result;
- }
-}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/exception/OrchestrationExceptionTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/exceptio [...]
similarity index 94%
rename from shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/exception/OrchestrationExceptionTest.java
rename to shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/exception/OrchestrationExceptionTest.java
index 3e3efad..e6743fd 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/exception/OrchestrationExceptionTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/exception/OrchestrationExceptionTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.orchestration.repository.api.exception;
+package org.apache.shardingsphere.orchestration.repository.common.exception;
import org.junit.Test;
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/util/ConfigKeyUtilsTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/util/ConfigKeyUtilsTest.java
similarity index 94%
rename from shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/util/ConfigKeyUtilsTest.java
rename to shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/util/ConfigKeyUtilsTest.java
index 45cc5f2..227e95a 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/util/ConfigKeyUtilsTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/util/ConfigKeyUtilsTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.orchestration.repository.api.util;
+package org.apache.shardingsphere.orchestration.repository.common.util;
import org.junit.Test;
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationRepositoryConfigurationYamlSwapperTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphe [...]
similarity index 72%
rename from shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationRepositoryConfigurationYamlSwapperTest.java
rename to shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/yaml/swapper/OrchestrationCenterConfigurationYamlSwapperTest.java
index 74574b9..e9d7d2c 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationRepositoryConfigurationYamlSwapperTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/yaml/swapper/OrchestrationCenterConfigurationYamlSwapperTest.java
@@ -15,9 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.orchestration.repository.common.configuration.swapper;
+package org.apache.shardingsphere.orchestration.repository.common.yaml.swapper;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationCenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationCenterConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationCenterConfiguration;
import org.junit.Test;
@@ -26,15 +26,15 @@ import java.util.Properties;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
-public final class OrchestrationRepositoryConfigurationYamlSwapperTest {
+public final class OrchestrationCenterConfigurationYamlSwapperTest {
@Test
public void assertToYamlConfiguration() {
- OrchestrationCenterConfiguration config = new OrchestrationCenterConfiguration("ZooKeeper", "127.0.0.1:2181,127.0.0.1:2182", new Properties());
- YamlOrchestrationCenterConfiguration yamlConfiguration = new OrchestrationCenterConfigurationYamlSwapper().swapToYamlConfiguration(config);
- assertThat(yamlConfiguration.getType(), is(config.getType()));
- assertThat(yamlConfiguration.getServerLists(), is(config.getServerLists()));
- assertThat(yamlConfiguration.getProps(), is(config.getProps()));
+ OrchestrationCenterConfiguration expected = new OrchestrationCenterConfiguration("TEST", "127.0.0.1:2181", new Properties());
+ YamlOrchestrationCenterConfiguration actual = new OrchestrationCenterConfigurationYamlSwapper().swapToYamlConfiguration(expected);
+ assertThat(actual.getType(), is(expected.getType()));
+ assertThat(actual.getServerLists(), is(expected.getServerLists()));
+ assertThat(actual.getProps(), is(expected.getProps()));
}
@Test
@@ -48,9 +48,9 @@ public final class OrchestrationRepositoryConfigurationYamlSwapperTest {
private YamlOrchestrationCenterConfiguration getYamlOrchestrationCenterConfiguration() {
YamlOrchestrationCenterConfiguration result = new YamlOrchestrationCenterConfiguration();
- result.setType("ZooKeeper");
+ result.setType("TEST");
result.setProps(new Properties());
- result.setServerLists("127.0.0.1:2181,127.0.0.1:2182");
+ result.setServerLists("127.0.0.1:2181");
return result;
}
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/yaml/swapper/OrchestrationConfigurationYamlSwapperTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/re [...]
new file mode 100644
index 0000000..4255638
--- /dev/null
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/yaml/swapper/OrchestrationConfigurationYamlSwapperTest.java
@@ -0,0 +1,128 @@
+/*
+ * 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.orchestration.repository.common.yaml.swapper;
+
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationCenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationCenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationConfiguration;
+import org.junit.Test;
+
+import java.util.Properties;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+public final class OrchestrationConfigurationYamlSwapperTest {
+
+ @Test
+ public void assertSwapToYamlOrchestrationConfigurationWithoutAdditionalConfigCenterConfiguration() {
+ OrchestrationConfiguration expected = createOrchestrationConfigurationWithoutAdditionalConfigCenterConfiguration();
+ YamlOrchestrationConfiguration actual = new OrchestrationConfigurationYamlSwapper().swapToYamlConfiguration(expected);
+ assertThat(actual.getNamespace(), is(expected.getNamespace()));
+ assertThat(actual.isOverwrite(), is(expected.isOverwrite()));
+ assertThat(actual.getRegistryCenter().getType(), is(expected.getRegistryCenterConfiguration().getType()));
+ assertThat(actual.getRegistryCenter().getServerLists(), is(expected.getRegistryCenterConfiguration().getServerLists()));
+ assertThat(actual.getRegistryCenter().getProps(), is(expected.getRegistryCenterConfiguration().getProps()));
+ assertFalse(expected.getAdditionalConfigCenterConfiguration().isPresent());
+ }
+
+ private OrchestrationConfiguration createOrchestrationConfigurationWithoutAdditionalConfigCenterConfiguration() {
+ return new OrchestrationConfiguration("logic_schema", new OrchestrationCenterConfiguration("TEST", "127.0.0.1:2181", new Properties()), false);
+ }
+
+ @Test
+ public void assertSwapToYamlOrchestrationConfigurationWithAdditionalConfigCenterConfiguration() {
+ OrchestrationConfiguration expected = createOrchestrationConfigurationWithAdditionalConfigCenterConfiguration();
+ YamlOrchestrationConfiguration actual = new OrchestrationConfigurationYamlSwapper().swapToYamlConfiguration(expected);
+ assertThat(actual.getNamespace(), is(expected.getNamespace()));
+ assertThat(actual.isOverwrite(), is(expected.isOverwrite()));
+ assertThat(actual.getRegistryCenter().getType(), is(expected.getRegistryCenterConfiguration().getType()));
+ assertThat(actual.getRegistryCenter().getServerLists(), is(expected.getRegistryCenterConfiguration().getServerLists()));
+ assertThat(actual.getRegistryCenter().getProps(), is(expected.getRegistryCenterConfiguration().getProps()));
+ assertTrue(expected.getAdditionalConfigCenterConfiguration().isPresent());
+ assertThat(actual.getAdditionalConfigCenter().getType(), is(expected.getAdditionalConfigCenterConfiguration().get().getType()));
+ assertThat(actual.getAdditionalConfigCenter().getServerLists(), is(expected.getAdditionalConfigCenterConfiguration().get().getServerLists()));
+ assertThat(actual.getAdditionalConfigCenter().getProps(), is(expected.getAdditionalConfigCenterConfiguration().get().getProps()));
+ }
+
+ private OrchestrationConfiguration createOrchestrationConfigurationWithAdditionalConfigCenterConfiguration() {
+ return new OrchestrationConfiguration("logic_schema",
+ new OrchestrationCenterConfiguration("TEST", "127.0.0.1:2181", new Properties()), new OrchestrationCenterConfiguration("ADDITIONAL", "127.0.0.1:2181", new Properties()), false);
+ }
+
+ @Test
+ public void assertSwapToOrchestrationConfigurationWithoutAdditionalConfigCenterConfiguration() {
+ YamlOrchestrationConfiguration expected = createYamlOrchestrationConfigurationWithoutAdditionalConfigCenterConfiguration();
+ OrchestrationConfiguration actual = new OrchestrationConfigurationYamlSwapper().swapToObject(expected);
+ assertThat(actual.getNamespace(), is(expected.getNamespace()));
+ assertThat(actual.isOverwrite(), is(expected.isOverwrite()));
+ assertThat(actual.getRegistryCenterConfiguration().getType(), is(expected.getRegistryCenter().getType()));
+ assertThat(actual.getRegistryCenterConfiguration().getServerLists(), is(expected.getRegistryCenter().getServerLists()));
+ assertThat(actual.getRegistryCenterConfiguration().getProps(), is(expected.getRegistryCenter().getProps()));
+ assertFalse(actual.getAdditionalConfigCenterConfiguration().isPresent());
+ }
+
+ private YamlOrchestrationConfiguration createYamlOrchestrationConfigurationWithoutAdditionalConfigCenterConfiguration() {
+ YamlOrchestrationConfiguration result = new YamlOrchestrationConfiguration();
+ result.setNamespace("logic_schema");
+ result.setRegistryCenter(createYamlRegistryCenterConfiguration());
+ return result;
+ }
+
+ @Test
+ public void assertSwapToOrchestrationConfigurationWithAdditionalConfigCenterConfiguration() {
+ YamlOrchestrationConfiguration expected = createYamlOrchestrationConfigurationWithAdditionalConfigCenterConfiguration();
+ OrchestrationConfiguration actual = new OrchestrationConfigurationYamlSwapper().swapToObject(expected);
+ assertThat(actual.getNamespace(), is(expected.getNamespace()));
+ assertThat(actual.isOverwrite(), is(expected.isOverwrite()));
+ assertThat(actual.getRegistryCenterConfiguration().getType(), is(expected.getRegistryCenter().getType()));
+ assertThat(actual.getRegistryCenterConfiguration().getServerLists(), is(expected.getRegistryCenter().getServerLists()));
+ assertThat(actual.getRegistryCenterConfiguration().getProps(), is(expected.getRegistryCenter().getProps()));
+ assertTrue(actual.getAdditionalConfigCenterConfiguration().isPresent());
+ assertThat(actual.getAdditionalConfigCenterConfiguration().get().getType(), is(expected.getAdditionalConfigCenter().getType()));
+ assertThat(actual.getAdditionalConfigCenterConfiguration().get().getServerLists(), is(expected.getAdditionalConfigCenter().getServerLists()));
+ assertThat(actual.getAdditionalConfigCenterConfiguration().get().getProps(), is(expected.getAdditionalConfigCenter().getProps()));
+ }
+
+ private YamlOrchestrationConfiguration createYamlOrchestrationConfigurationWithAdditionalConfigCenterConfiguration() {
+ YamlOrchestrationConfiguration result = new YamlOrchestrationConfiguration();
+ result.setNamespace("logic_schema");
+ result.setRegistryCenter(createYamlRegistryCenterConfiguration());
+ result.setAdditionalConfigCenter(createYamlAdditionalConfigCenterConfiguration());
+ return result;
+ }
+
+ private YamlOrchestrationCenterConfiguration createYamlRegistryCenterConfiguration() {
+ YamlOrchestrationCenterConfiguration result = new YamlOrchestrationCenterConfiguration();
+ result.setType("TEST");
+ result.setProps(new Properties());
+ result.setServerLists("127.0.0.1:2181");
+ return result;
+ }
+
+ private YamlOrchestrationCenterConfiguration createYamlAdditionalConfigCenterConfiguration() {
+ YamlOrchestrationCenterConfiguration result = new YamlOrchestrationCenterConfiguration();
+ result.setType("ADDITIONAL");
+ result.setProps(new Properties());
+ result.setServerLists("127.0.0.1:2182");
+ return result;
+ }
+}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/pom.xml b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/pom.xml
index 5bf81e5..de752e6 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/pom.xml
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/pom.xml
@@ -32,6 +32,11 @@
<artifactId>shardingsphere-orchestration-repository-api</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-orchestration-repository-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>com.ctrip.framework.apollo</groupId>
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/main/java/org/apache/shardingsphere/orchestration/repository/apollo/ApolloRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apo [...]
index 34a92c9..772d0d0 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/main/java/org/apache/shardingsphere/orchestration/repository/apollo/ApolloRepository.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/main/java/org/apache/shardingsphere/orchestration/repository/apollo/ApolloRepository.java
@@ -29,7 +29,7 @@ import org.apache.shardingsphere.orchestration.repository.apollo.wrapper.ApolloC
import org.apache.shardingsphere.orchestration.repository.apollo.wrapper.ApolloOpenApiWrapper;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEvent;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
-import org.apache.shardingsphere.orchestration.repository.api.util.ConfigKeyUtils;
+import org.apache.shardingsphere.orchestration.repository.common.util.ConfigKeyUtils;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationCenterConfiguration;
import java.util.Collections;
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/ApolloRepositoryTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository [...]
index 408a7f8..d1d57ef 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/ApolloRepositoryTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/ApolloRepositoryTest.java
@@ -21,11 +21,11 @@ import com.ctrip.framework.apollo.mockserver.EmbeddedApollo;
import com.google.common.util.concurrent.SettableFuture;
import lombok.SneakyThrows;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationCenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEvent;
import org.apache.shardingsphere.orchestration.repository.apollo.wrapper.ApolloConfigWrapper;
import org.apache.shardingsphere.orchestration.repository.apollo.wrapper.ApolloOpenApiWrapper;
-import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEvent;
-import org.apache.shardingsphere.orchestration.repository.api.util.ConfigKeyUtils;
-import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationCenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.util.ConfigKeyUtils;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloOpenApiWrapperTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestratio [...]
index 037e407..ed1ea1c 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloOpenApiWrapperTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloOpenApiWrapperTest.java
@@ -21,9 +21,9 @@ import com.ctrip.framework.apollo.openapi.client.ApolloOpenApiClient;
import com.ctrip.framework.apollo.openapi.dto.NamespaceReleaseDTO;
import com.ctrip.framework.apollo.openapi.dto.OpenItemDTO;
import lombok.SneakyThrows;
-import org.apache.shardingsphere.orchestration.repository.api.util.ConfigKeyUtils;
import org.apache.shardingsphere.orchestration.repository.apollo.ApolloProperties;
import org.apache.shardingsphere.orchestration.repository.apollo.ApolloPropertyKey;
+import org.apache.shardingsphere.orchestration.repository.common.util.ConfigKeyUtils;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-etcd/pom.xml b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-etcd/pom.xml
index c1de2a5..475ccb8 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-etcd/pom.xml
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-etcd/pom.xml
@@ -36,6 +36,11 @@
<artifactId>shardingsphere-orchestration-repository-api</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-orchestration-repository-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>io.etcd</groupId>
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/pom.xml b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/pom.xml
index 54a39d7..f66ecd7 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/pom.xml
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/pom.xml
@@ -31,6 +31,11 @@
<artifactId>shardingsphere-orchestration-repository-api</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-orchestration-repository-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>com.alibaba.nacos</groupId>
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/src/main/java/org/apache/shardingsphere/orchestration/repository/nacos/NacosRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/ [...]
index 788b7f7..9070d65 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/src/main/java/org/apache/shardingsphere/orchestration/repository/nacos/NacosRepository.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/src/main/java/org/apache/shardingsphere/orchestration/repository/nacos/NacosRepository.java
@@ -26,10 +26,10 @@ import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationCenterConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEvent;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
-import org.apache.shardingsphere.orchestration.repository.api.util.ConfigKeyUtils;
-import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationCenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.util.ConfigKeyUtils;
import java.util.List;
import java.util.Properties;
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/pom.xml b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/pom.xml
index 6f738bf..c3b7e31 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/pom.xml
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/pom.xml
@@ -32,6 +32,11 @@
<artifactId>shardingsphere-orchestration-repository-api</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-orchestration-repository-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.curator</groupId>
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/orchestration/repository/zookeeper/handler/CuratorZookeeperExceptionHandler.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shard [...]
index af50b6d..005c5d4 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/orchestration/repository/zookeeper/handler/CuratorZookeeperExceptionHandler.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/orchestration/repository/zookeeper/handler/CuratorZookeeperExceptionHandler.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.orchestration.repository.zookeeper.handler;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
-import org.apache.shardingsphere.orchestration.repository.api.exception.OrchestrationException;
+import org.apache.shardingsphere.orchestration.repository.common.exception.OrchestrationException;
import org.apache.zookeeper.KeeperException.ConnectionLossException;
import org.apache.zookeeper.KeeperException.NoNodeException;
import org.apache.zookeeper.KeeperException.NodeExistsException;
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/orchestration/repository/zookeeper/CuratorZookeeperRepositoryTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere- [...]
index 23b0b55..29a8e0c 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/orchestration/repository/zookeeper/CuratorZookeeperRepositoryTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/orchestration/repository/zookeeper/CuratorZookeeperRepositoryTest.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.orchestration.repository.zookeeper;
import org.apache.curator.framework.CuratorFramework;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationCenterConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.exception.OrchestrationException;
+import org.apache.shardingsphere.orchestration.repository.common.exception.OrchestrationException;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEvent;
import org.junit.Assert;
import org.junit.BeforeClass;
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/orchestration/repository/zookeeper/handler/CuratorZookeeperExceptionHandlerTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/s [...]
index 9868b85..ac0edac 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/orchestration/repository/zookeeper/handler/CuratorZookeeperExceptionHandlerTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/orchestration/repository/zookeeper/handler/CuratorZookeeperExceptionHandlerTest.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.orchestration.repository.zookeeper.handler;
-import org.apache.shardingsphere.orchestration.repository.api.exception.OrchestrationException;
+import org.apache.shardingsphere.orchestration.repository.common.exception.OrchestrationException;
import org.apache.zookeeper.KeeperException;
import org.junit.Assert;
import org.junit.Test;
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleAlgorithmProviderConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleAlgorithmProviderConfigurationYamlSwapper.java
index bf93c8a..d42141d 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleAlgorithmProviderConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleAlgorithmProviderConfigurationYamlSwapper.java
@@ -45,9 +45,9 @@ public final class EncryptRuleAlgorithmProviderConfigurationYamlSwapper implemen
}
@Override
- public AlgorithmProvidedEncryptRuleConfiguration swapToObject(final YamlEncryptRuleConfiguration yamlConfiguration) {
+ public AlgorithmProvidedEncryptRuleConfiguration swapToObject(final YamlEncryptRuleConfiguration yamlConfig) {
AlgorithmProvidedEncryptRuleConfiguration ruleConfiguration = new AlgorithmProvidedEncryptRuleConfiguration();
- ruleConfiguration.setTables(swapTables(yamlConfiguration));
+ ruleConfiguration.setTables(swapTables(yamlConfig));
return ruleConfiguration;
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationYamlSwapper.java
index 23e98b3..a4b522e 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationYamlSwapper.java
@@ -52,8 +52,8 @@ public final class EncryptRuleConfigurationYamlSwapper implements YamlRuleConfig
}
@Override
- public EncryptRuleConfiguration swapToObject(final YamlEncryptRuleConfiguration yamlConfiguration) {
- return new EncryptRuleConfiguration(swapTables(yamlConfiguration), swapEncryptAlgorithm(yamlConfiguration));
+ public EncryptRuleConfiguration swapToObject(final YamlEncryptRuleConfiguration yamlConfig) {
+ return new EncryptRuleConfiguration(swapTables(yamlConfig), swapEncryptAlgorithm(yamlConfig));
}
private Collection<EncryptTableRuleConfiguration> swapTables(final YamlEncryptRuleConfiguration yamlConfiguration) {
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptColumnRuleConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptColumnRuleConfigurationYamlSwapper.java
index 4fbbaef..763c634 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptColumnRuleConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptColumnRuleConfigurationYamlSwapper.java
@@ -37,8 +37,8 @@ public final class EncryptColumnRuleConfigurationYamlSwapper implements YamlSwap
}
@Override
- public EncryptColumnRuleConfiguration swapToObject(final YamlEncryptColumnRuleConfiguration yamlConfiguration) {
- return new EncryptColumnRuleConfiguration(yamlConfiguration.getLogicColumn(),
- yamlConfiguration.getCipherColumn(), yamlConfiguration.getAssistedQueryColumn(), yamlConfiguration.getPlainColumn(), yamlConfiguration.getEncryptorName());
+ public EncryptColumnRuleConfiguration swapToObject(final YamlEncryptColumnRuleConfiguration yamlConfig) {
+ return new EncryptColumnRuleConfiguration(yamlConfig.getLogicColumn(),
+ yamlConfig.getCipherColumn(), yamlConfig.getAssistedQueryColumn(), yamlConfig.getPlainColumn(), yamlConfig.getEncryptorName());
}
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptTableRuleConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptTableRuleConfigurationYamlSwapper.java
index 3c4d2e8..b319282 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptTableRuleConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptTableRuleConfigurationYamlSwapper.java
@@ -44,13 +44,13 @@ public final class EncryptTableRuleConfigurationYamlSwapper implements YamlSwapp
}
@Override
- public EncryptTableRuleConfiguration swapToObject(final YamlEncryptTableRuleConfiguration yamlConfiguration) {
+ public EncryptTableRuleConfiguration swapToObject(final YamlEncryptTableRuleConfiguration yamlConfig) {
Collection<EncryptColumnRuleConfiguration> columns = new LinkedList<>();
- for (Entry<String, YamlEncryptColumnRuleConfiguration> entry : yamlConfiguration.getColumns().entrySet()) {
+ for (Entry<String, YamlEncryptColumnRuleConfiguration> entry : yamlConfig.getColumns().entrySet()) {
YamlEncryptColumnRuleConfiguration yamlEncryptColumnRuleConfiguration = entry.getValue();
yamlEncryptColumnRuleConfiguration.setLogicColumn(entry.getKey());
columns.add(columnYamlSwapper.swapToObject(yamlEncryptColumnRuleConfiguration));
}
- return new EncryptTableRuleConfiguration(yamlConfiguration.getName(), columns);
+ return new EncryptTableRuleConfiguration(yamlConfig.getName(), columns);
}
}
diff --git a/shardingsphere-features/shardingsphere-master-slave/shardingsphere-master-slave-common/src/main/java/org/apache/shardingsphere/masterslave/yaml/swapper/MasterSlaveRuleAlgorithmProviderConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-master-slave/shardingsphere-master-slave-common/src/main/java/org/apache/shardingsphere/masterslave/yaml/swapper/MasterSlaveRuleAlgorithmProviderConfigurationYamlSwapper.java
index 94e25ff..8eb919d 100644
--- a/shardingsphere-features/shardingsphere-master-slave/shardingsphere-master-slave-common/src/main/java/org/apache/shardingsphere/masterslave/yaml/swapper/MasterSlaveRuleAlgorithmProviderConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-master-slave/shardingsphere-master-slave-common/src/main/java/org/apache/shardingsphere/masterslave/yaml/swapper/MasterSlaveRuleAlgorithmProviderConfigurationYamlSwapper.java
@@ -56,9 +56,9 @@ public final class MasterSlaveRuleAlgorithmProviderConfigurationYamlSwapper impl
}
@Override
- public AlgorithmProvidedMasterSlaveRuleConfiguration swapToObject(final YamlMasterSlaveRuleConfiguration yamlConfiguration) {
+ public AlgorithmProvidedMasterSlaveRuleConfiguration swapToObject(final YamlMasterSlaveRuleConfiguration yamlConfig) {
Collection<MasterSlaveDataSourceRuleConfiguration> dataSources = new LinkedList<>();
- for (Entry<String, YamlMasterSlaveDataSourceRuleConfiguration> entry : yamlConfiguration.getDataSources().entrySet()) {
+ for (Entry<String, YamlMasterSlaveDataSourceRuleConfiguration> entry : yamlConfig.getDataSources().entrySet()) {
dataSources.add(swapToObject(entry.getKey(), entry.getValue()));
}
AlgorithmProvidedMasterSlaveRuleConfiguration ruleConfiguration = new AlgorithmProvidedMasterSlaveRuleConfiguration();
diff --git a/shardingsphere-features/shardingsphere-master-slave/shardingsphere-master-slave-common/src/main/java/org/apache/shardingsphere/masterslave/yaml/swapper/MasterSlaveRuleConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-master-slave/shardingsphere-master-slave-common/src/main/java/org/apache/shardingsphere/masterslave/yaml/swapper/MasterSlaveRuleConfigurationYamlSwapper.java
index 6e34610..c070ee8 100644
--- a/shardingsphere-features/shardingsphere-master-slave/shardingsphere-master-slave-common/src/main/java/org/apache/shardingsphere/masterslave/yaml/swapper/MasterSlaveRuleConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-master-slave/shardingsphere-master-slave-common/src/main/java/org/apache/shardingsphere/masterslave/yaml/swapper/MasterSlaveRuleConfigurationYamlSwapper.java
@@ -61,14 +61,14 @@ public final class MasterSlaveRuleConfigurationYamlSwapper implements YamlRuleCo
}
@Override
- public MasterSlaveRuleConfiguration swapToObject(final YamlMasterSlaveRuleConfiguration yamlConfiguration) {
+ public MasterSlaveRuleConfiguration swapToObject(final YamlMasterSlaveRuleConfiguration yamlConfig) {
Collection<MasterSlaveDataSourceRuleConfiguration> dataSources = new LinkedList<>();
- for (Entry<String, YamlMasterSlaveDataSourceRuleConfiguration> entry : yamlConfiguration.getDataSources().entrySet()) {
+ for (Entry<String, YamlMasterSlaveDataSourceRuleConfiguration> entry : yamlConfig.getDataSources().entrySet()) {
dataSources.add(swapToObject(entry.getKey(), entry.getValue()));
}
- Map<String, ShardingSphereAlgorithmConfiguration> loadBalancers = new LinkedHashMap<>(yamlConfiguration.getLoadBalancers().entrySet().size(), 1);
- if (null != yamlConfiguration.getLoadBalancers()) {
- yamlConfiguration.getLoadBalancers().forEach((key, value) -> loadBalancers.put(key, algorithmSwapper.swapToObject(value)));
+ Map<String, ShardingSphereAlgorithmConfiguration> loadBalancers = new LinkedHashMap<>(yamlConfig.getLoadBalancers().entrySet().size(), 1);
+ if (null != yamlConfig.getLoadBalancers()) {
+ yamlConfig.getLoadBalancers().forEach((key, value) -> loadBalancers.put(key, algorithmSwapper.swapToObject(value)));
}
return new MasterSlaveRuleConfiguration(dataSources, loadBalancers);
}
diff --git a/shardingsphere-features/shardingsphere-replica/shardingsphere-replica-common/src/main/java/org/apache/shardingsphere/replica/yaml/swapper/ReplicaRuleConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-replica/shardingsphere-replica-common/src/main/java/org/apache/shardingsphere/replica/yaml/swapper/ReplicaRuleConfigurationYamlSwapper.java
index 1159fd8..d51e36c 100644
--- a/shardingsphere-features/shardingsphere-replica/shardingsphere-replica-common/src/main/java/org/apache/shardingsphere/replica/yaml/swapper/ReplicaRuleConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-replica/shardingsphere-replica-common/src/main/java/org/apache/shardingsphere/replica/yaml/swapper/ReplicaRuleConfigurationYamlSwapper.java
@@ -50,9 +50,9 @@ public final class ReplicaRuleConfigurationYamlSwapper implements YamlRuleConfig
}
@Override
- public ReplicaRuleConfiguration swapToObject(final YamlReplicaRuleConfiguration yamlConfiguration) {
+ public ReplicaRuleConfiguration swapToObject(final YamlReplicaRuleConfiguration yamlConfig) {
Collection<ReplicaDataSourceConfiguration> groups = new LinkedList<>();
- for (Entry<String, YamlReplicaDataSourceConfiguration> entry : yamlConfiguration.getDataSources().entrySet()) {
+ for (Entry<String, YamlReplicaDataSourceConfiguration> entry : yamlConfig.getDataSources().entrySet()) {
groups.add(swapToObject(entry.getKey(), entry.getValue()));
}
return new ReplicaRuleConfiguration(groups);
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-common/src/main/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-common/src/main/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationYamlSwapper.java
index 60d1003..efed847 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-common/src/main/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-common/src/main/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationYamlSwapper.java
@@ -36,8 +36,8 @@ public final class ShadowRuleConfigurationYamlSwapper implements YamlRuleConfigu
}
@Override
- public ShadowRuleConfiguration swapToObject(final YamlShadowRuleConfiguration yamlConfiguration) {
- return new ShadowRuleConfiguration(yamlConfiguration.getColumn(), yamlConfiguration.getShadowMappings());
+ public ShadowRuleConfiguration swapToObject(final YamlShadowRuleConfiguration yamlConfig) {
+ return new ShadowRuleConfiguration(yamlConfig.getColumn(), yamlConfig.getShadowMappings());
}
@Override
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleAlgorithmProviderConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleAlgorithmProviderConfigurationYamlSwapper.java
index 6cbf7a6..2046156 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleAlgorithmProviderConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleAlgorithmProviderConfigurationYamlSwapper.java
@@ -56,21 +56,21 @@ public final class ShardingRuleAlgorithmProviderConfigurationYamlSwapper impleme
}
@Override
- public AlgorithmProvidedShardingRuleConfiguration swapToObject(final YamlShardingRuleConfiguration yamlConfiguration) {
+ public AlgorithmProvidedShardingRuleConfiguration swapToObject(final YamlShardingRuleConfiguration yamlConfig) {
AlgorithmProvidedShardingRuleConfiguration result = new AlgorithmProvidedShardingRuleConfiguration();
- for (Entry<String, YamlTableRuleConfiguration> entry : yamlConfiguration.getTables().entrySet()) {
+ for (Entry<String, YamlTableRuleConfiguration> entry : yamlConfig.getTables().entrySet()) {
YamlTableRuleConfiguration tableRuleConfig = entry.getValue();
tableRuleConfig.setLogicTable(entry.getKey());
result.getTables().add(tableYamlSwapper.swapToObject(tableRuleConfig));
}
- for (Entry<String, YamlShardingAutoTableRuleConfiguration> entry : yamlConfiguration.getAutoTables().entrySet()) {
+ for (Entry<String, YamlShardingAutoTableRuleConfiguration> entry : yamlConfig.getAutoTables().entrySet()) {
YamlShardingAutoTableRuleConfiguration tableRuleConfig = entry.getValue();
tableRuleConfig.setLogicTable(entry.getKey());
result.getAutoTables().add(autoTableYamlSwapper.swapToObject(tableRuleConfig));
}
- result.getBindingTableGroups().addAll(yamlConfiguration.getBindingTables());
- result.getBroadcastTables().addAll(yamlConfiguration.getBroadcastTables());
- setDefaultStrategies(yamlConfiguration, result);
+ result.getBindingTableGroups().addAll(yamlConfig.getBindingTables());
+ result.getBroadcastTables().addAll(yamlConfig.getBroadcastTables());
+ setDefaultStrategies(yamlConfig, result);
return result;
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationYamlSwapper.java
index 6bdbf33..3d9a4ac 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationYamlSwapper.java
@@ -80,22 +80,22 @@ public final class ShardingRuleConfigurationYamlSwapper implements YamlRuleConfi
}
@Override
- public ShardingRuleConfiguration swapToObject(final YamlShardingRuleConfiguration yamlConfiguration) {
+ public ShardingRuleConfiguration swapToObject(final YamlShardingRuleConfiguration yamlConfig) {
ShardingRuleConfiguration result = new ShardingRuleConfiguration();
- for (Entry<String, YamlTableRuleConfiguration> entry : yamlConfiguration.getTables().entrySet()) {
+ for (Entry<String, YamlTableRuleConfiguration> entry : yamlConfig.getTables().entrySet()) {
YamlTableRuleConfiguration tableRuleConfig = entry.getValue();
tableRuleConfig.setLogicTable(entry.getKey());
result.getTables().add(tableYamlSwapper.swapToObject(tableRuleConfig));
}
- for (Entry<String, YamlShardingAutoTableRuleConfiguration> entry : yamlConfiguration.getAutoTables().entrySet()) {
+ for (Entry<String, YamlShardingAutoTableRuleConfiguration> entry : yamlConfig.getAutoTables().entrySet()) {
YamlShardingAutoTableRuleConfiguration tableRuleConfig = entry.getValue();
tableRuleConfig.setLogicTable(entry.getKey());
result.getAutoTables().add(autoTableYamlSwapper.swapToObject(tableRuleConfig));
}
- result.getBindingTableGroups().addAll(yamlConfiguration.getBindingTables());
- result.getBroadcastTables().addAll(yamlConfiguration.getBroadcastTables());
- setDefaultStrategies(yamlConfiguration, result);
- setAlgorithms(yamlConfiguration, result);
+ result.getBindingTableGroups().addAll(yamlConfig.getBindingTables());
+ result.getBroadcastTables().addAll(yamlConfig.getBroadcastTables());
+ setDefaultStrategies(yamlConfig, result);
+ setAlgorithms(yamlConfig, result);
return result;
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/rule/ShardingAutoTableRuleConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/rule/ShardingAutoTableRuleConfigurationYamlSwapper.java
index edd5945..1c9ec79 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/rule/ShardingAutoTableRuleConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/rule/ShardingAutoTableRuleConfigurationYamlSwapper.java
@@ -48,14 +48,14 @@ public final class ShardingAutoTableRuleConfigurationYamlSwapper implements Yaml
}
@Override
- public ShardingAutoTableRuleConfiguration swapToObject(final YamlShardingAutoTableRuleConfiguration yamlConfiguration) {
- Preconditions.checkNotNull(yamlConfiguration.getLogicTable(), "Logic table cannot be null.");
- ShardingAutoTableRuleConfiguration result = new ShardingAutoTableRuleConfiguration(yamlConfiguration.getLogicTable(), yamlConfiguration.getActualDataSources());
- if (null != yamlConfiguration.getShardingStrategy()) {
- result.setShardingStrategy(shardingStrategyYamlSwapper.swapToObject(yamlConfiguration.getShardingStrategy()));
+ public ShardingAutoTableRuleConfiguration swapToObject(final YamlShardingAutoTableRuleConfiguration yamlConfig) {
+ Preconditions.checkNotNull(yamlConfig.getLogicTable(), "Logic table cannot be null.");
+ ShardingAutoTableRuleConfiguration result = new ShardingAutoTableRuleConfiguration(yamlConfig.getLogicTable(), yamlConfig.getActualDataSources());
+ if (null != yamlConfig.getShardingStrategy()) {
+ result.setShardingStrategy(shardingStrategyYamlSwapper.swapToObject(yamlConfig.getShardingStrategy()));
}
- if (null != yamlConfiguration.getKeyGenerateStrategy()) {
- result.setKeyGenerateStrategy(keyGenerateStrategyYamlSwapper.swapToObject(yamlConfiguration.getKeyGenerateStrategy()));
+ if (null != yamlConfig.getKeyGenerateStrategy()) {
+ result.setKeyGenerateStrategy(keyGenerateStrategyYamlSwapper.swapToObject(yamlConfig.getKeyGenerateStrategy()));
}
return result;
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/rule/ShardingTableRuleConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/rule/ShardingTableRuleConfigurationYamlSwapper.java
index 28c1db4..893f3e3 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/rule/ShardingTableRuleConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/rule/ShardingTableRuleConfigurationYamlSwapper.java
@@ -51,17 +51,17 @@ public final class ShardingTableRuleConfigurationYamlSwapper implements YamlSwap
}
@Override
- public ShardingTableRuleConfiguration swapToObject(final YamlTableRuleConfiguration yamlConfiguration) {
- Preconditions.checkNotNull(yamlConfiguration.getLogicTable(), "Logic table cannot be null.");
- ShardingTableRuleConfiguration result = new ShardingTableRuleConfiguration(yamlConfiguration.getLogicTable(), yamlConfiguration.getActualDataNodes());
- if (null != yamlConfiguration.getDatabaseStrategy()) {
- result.setDatabaseShardingStrategy(shardingStrategyYamlSwapper.swapToObject(yamlConfiguration.getDatabaseStrategy()));
+ public ShardingTableRuleConfiguration swapToObject(final YamlTableRuleConfiguration yamlConfig) {
+ Preconditions.checkNotNull(yamlConfig.getLogicTable(), "Logic table cannot be null.");
+ ShardingTableRuleConfiguration result = new ShardingTableRuleConfiguration(yamlConfig.getLogicTable(), yamlConfig.getActualDataNodes());
+ if (null != yamlConfig.getDatabaseStrategy()) {
+ result.setDatabaseShardingStrategy(shardingStrategyYamlSwapper.swapToObject(yamlConfig.getDatabaseStrategy()));
}
- if (null != yamlConfiguration.getTableStrategy()) {
- result.setTableShardingStrategy(shardingStrategyYamlSwapper.swapToObject(yamlConfiguration.getTableStrategy()));
+ if (null != yamlConfig.getTableStrategy()) {
+ result.setTableShardingStrategy(shardingStrategyYamlSwapper.swapToObject(yamlConfig.getTableStrategy()));
}
- if (null != yamlConfiguration.getKeyGenerateStrategy()) {
- result.setKeyGenerateStrategy(keyGenerateStrategyYamlSwapper.swapToObject(yamlConfiguration.getKeyGenerateStrategy()));
+ if (null != yamlConfig.getKeyGenerateStrategy()) {
+ result.setKeyGenerateStrategy(keyGenerateStrategyYamlSwapper.swapToObject(yamlConfig.getKeyGenerateStrategy()));
}
return result;
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/strategy/KeyGenerateStrategyConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/strategy/KeyGenerateStrategyConfigurationYamlSwapper.java
index fa714fb..df7f0f7 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/strategy/KeyGenerateStrategyConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/strategy/KeyGenerateStrategyConfigurationYamlSwapper.java
@@ -35,7 +35,7 @@ public final class KeyGenerateStrategyConfigurationYamlSwapper implements YamlSw
}
@Override
- public KeyGenerateStrategyConfiguration swapToObject(final YamlKeyGenerateStrategyConfiguration yamlConfiguration) {
- return new KeyGenerateStrategyConfiguration(yamlConfiguration.getColumn(), yamlConfiguration.getKeyGeneratorName());
+ public KeyGenerateStrategyConfiguration swapToObject(final YamlKeyGenerateStrategyConfiguration yamlConfig) {
+ return new KeyGenerateStrategyConfiguration(yamlConfig.getColumn(), yamlConfig.getKeyGeneratorName());
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/strategy/ShardingStrategyConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/strategy/ShardingStrategyConfigurationYamlSwapper.java
index 73efa57..3ec7425 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/strategy/ShardingStrategyConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/strategy/ShardingStrategyConfigurationYamlSwapper.java
@@ -54,22 +54,22 @@ public final class ShardingStrategyConfigurationYamlSwapper implements YamlSwapp
}
@Override
- public ShardingStrategyConfiguration swapToObject(final YamlShardingStrategyConfiguration yamlConfiguration) {
+ public ShardingStrategyConfiguration swapToObject(final YamlShardingStrategyConfiguration yamlConfig) {
int shardingStrategyConfigCount = 0;
ShardingStrategyConfiguration result = null;
- if (null != yamlConfiguration.getStandard()) {
+ if (null != yamlConfig.getStandard()) {
shardingStrategyConfigCount++;
- result = createStandardShardingStrategyConfiguration(yamlConfiguration.getStandard());
+ result = createStandardShardingStrategyConfiguration(yamlConfig.getStandard());
}
- if (null != yamlConfiguration.getComplex()) {
+ if (null != yamlConfig.getComplex()) {
shardingStrategyConfigCount++;
- result = createComplexShardingStrategyConfiguration(yamlConfiguration.getComplex());
+ result = createComplexShardingStrategyConfiguration(yamlConfig.getComplex());
}
- if (null != yamlConfiguration.getHint()) {
+ if (null != yamlConfig.getHint()) {
shardingStrategyConfigCount++;
- result = createHintShardingStrategyConfiguration(yamlConfiguration.getHint());
+ result = createHintShardingStrategyConfiguration(yamlConfig.getHint());
}
- if (null != yamlConfiguration.getNone()) {
+ if (null != yamlConfig.getNone()) {
shardingStrategyConfigCount++;
result = new NoneShardingStrategyConfiguration();
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/auth/yaml/swapper/AuthenticationYamlSwapper.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/auth/yaml/swapper/AuthenticationYamlSwapper.java
index e611a1b..f06fcf6 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/auth/yaml/swapper/AuthenticationYamlSwapper.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/auth/yaml/swapper/AuthenticationYamlSwapper.java
@@ -37,12 +37,12 @@ public final class AuthenticationYamlSwapper implements YamlSwapper<YamlAuthenti
}
@Override
- public Authentication swapToObject(final YamlAuthenticationConfiguration yamlConfiguration) {
+ public Authentication swapToObject(final YamlAuthenticationConfiguration yamlConfig) {
Authentication result = new Authentication();
- if (null == yamlConfiguration) {
+ if (null == yamlConfig) {
return result;
}
- result.getUsers().putAll(Maps.transformValues(yamlConfiguration.getUsers(), proxyUserYamlSwapper::swapToObject));
+ result.getUsers().putAll(Maps.transformValues(yamlConfig.getUsers(), proxyUserYamlSwapper::swapToObject));
return result;
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/auth/yaml/swapper/ProxyUserYamlSwapper.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/auth/yaml/swapper/ProxyUserYamlSwapper.java
index 05df50d..a81e306 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/auth/yaml/swapper/ProxyUserYamlSwapper.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/auth/yaml/swapper/ProxyUserYamlSwapper.java
@@ -41,10 +41,10 @@ public final class ProxyUserYamlSwapper implements YamlSwapper<YamlProxyUserConf
}
@Override
- public ProxyUser swapToObject(final YamlProxyUserConfiguration yamlConfiguration) {
- if (Strings.isNullOrEmpty(yamlConfiguration.getAuthorizedSchemas())) {
- return new ProxyUser(yamlConfiguration.getPassword(), Collections.emptyList());
+ public ProxyUser swapToObject(final YamlProxyUserConfiguration yamlConfig) {
+ if (Strings.isNullOrEmpty(yamlConfig.getAuthorizedSchemas())) {
+ return new ProxyUser(yamlConfig.getPassword(), Collections.emptyList());
}
- return new ProxyUser(yamlConfiguration.getPassword(), Splitter.on(',').trimResults().splitToList(yamlConfiguration.getAuthorizedSchemas()));
+ return new ProxyUser(yamlConfig.getPassword(), Splitter.on(',').trimResults().splitToList(yamlConfig.getAuthorizedSchemas()));
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/swapper/YamlSwapper.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/swapper/YamlSwapper.java
index 443d50b..755302e 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/swapper/YamlSwapper.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/swapper/YamlSwapper.java
@@ -38,8 +38,8 @@ public interface YamlSwapper<Y extends YamlConfiguration, T> {
/**
* Swap from YAML configuration to object.
*
- * @param yamlConfiguration YAML configuration
+ * @param yamlConfig YAML configuration
* @return swapped object
*/
- T swapToObject(Y yamlConfiguration);
+ T swapToObject(Y yamlConfig);
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/swapper/algorithm/ShardingSphereAlgorithmConfigurationYamlSwapper.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/swapper/algorithm/ShardingSphereAlgorithmConfigurationYamlSwapper.java
index a591a94..eea09b2 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/swapper/algorithm/ShardingSphereAlgorithmConfigurationYamlSwapper.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/swapper/algorithm/ShardingSphereAlgorithmConfigurationYamlSwapper.java
@@ -35,7 +35,7 @@ public final class ShardingSphereAlgorithmConfigurationYamlSwapper implements Ya
}
@Override
- public ShardingSphereAlgorithmConfiguration swapToObject(final YamlShardingSphereAlgorithmConfiguration yamlConfiguration) {
- return new ShardingSphereAlgorithmConfiguration(yamlConfiguration.getType(), yamlConfiguration.getProps());
+ public ShardingSphereAlgorithmConfiguration swapToObject(final YamlShardingSphereAlgorithmConfiguration yamlConfig) {
+ return new ShardingSphereAlgorithmConfiguration(yamlConfig.getType(), yamlConfig.getProps());
}
}
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/api/yaml/YamlOrchestrationShardingSphereDataSourceFactory.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/api/yaml/YamlOrchestrationShardingSphereDataSourceFactory.java
index 81d8e28..421cc52 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/api/yaml/YamlOrchestrationShardingSphereDataSourceFactory.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/api/yaml/YamlOrchestrationShardingSphereDataSourceFactory.java
@@ -27,7 +27,7 @@ import org.apache.shardingsphere.driver.orchestration.internal.util.YamlOrchestr
import org.apache.shardingsphere.driver.orchestration.internal.yaml.YamlOrchestrationRootRuleConfigurations;
import org.apache.shardingsphere.infra.yaml.engine.YamlEngine;
import org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapperEngine;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationConfiguration;
import javax.sql.DataSource;
import java.io.File;
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlOrchestrationRepositoryConfigurationSwapperUtil.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlOrchestrationRepositoryConfigurationSwapperUtil.java
index 0ecbf47..4adf969 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlOrchestrationRepositoryConfigurationSwapperUtil.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlOrchestrationRepositoryConfigurationSwapperUtil.java
@@ -20,8 +20,8 @@ package org.apache.shardingsphere.driver.orchestration.internal.util;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationConfiguration;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.swapper.OrchestrationCenterConfigurationYamlSwapper;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.swapper.OrchestrationCenterConfigurationYamlSwapper;
/**
* YAML orchestration configuration swapper utility.
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/internal/yaml/YamlOrchestrationRootRuleConfigurations.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/internal/yaml/YamlOrchestrationRootRuleConfigurations.java
index 8a3bc40..30ad73f 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/internal/yaml/YamlOrchestrationRootRuleConfigurations.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/internal/yaml/YamlOrchestrationRootRuleConfigurations.java
@@ -21,7 +21,7 @@ import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.cluster.configuration.yaml.YamlClusterConfiguration;
import org.apache.shardingsphere.infra.yaml.config.YamlRootRuleConfigurations;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationConfiguration;
/**
* YAML root rule configurations for orchestration.
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlInstanceConfigurationSwapperUtilTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlInstanceConfigurationSwapperUtilTest.java
index ccae39b..c6af011 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlInstanceConfigurationSwapperUtilTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlInstanceConfigurationSwapperUtilTest.java
@@ -18,8 +18,8 @@
package org.apache.shardingsphere.driver.orchestration.internal.util;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationCenterConfiguration;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationCenterConfiguration;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationCenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationConfiguration;
import org.junit.Test;
import java.util.Properties;
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/orchestration/OrchestrationSpringBootConfiguration.java b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/orchestration/OrchestrationSpringB [...]
index 3d721e2..a5dbbaa 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/orchestration/OrchestrationSpringBootConfiguration.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/orchestration/OrchestrationSpringBootConfiguration.java
@@ -24,8 +24,8 @@ import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataS
import org.apache.shardingsphere.driver.orchestration.internal.datasource.OrchestrationShardingSphereDataSource;
import org.apache.shardingsphere.infra.config.RuleConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationConfiguration;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.swapper.OrchestrationCenterConfigurationYamlSwapper;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.swapper.OrchestrationCenterConfigurationYamlSwapper;
import org.apache.shardingsphere.spring.boot.datasource.DataSourceMapSetter;
import org.apache.shardingsphere.spring.boot.orchestration.common.OrchestrationSpringBootRootConfiguration;
import org.apache.shardingsphere.spring.boot.orchestration.rule.LocalRulesCondition;
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/orchestration/common/OrchestrationSpringBootRootConfiguration.java b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/orchestration/common/Or [...]
index 603bc5b..c4f4c4d 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/orchestration/common/OrchestrationSpringBootRootConfiguration.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/orchestration/common/OrchestrationSpringBootRootConfiguration.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.spring.boot.orchestration.common;
import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.cluster.configuration.yaml.YamlClusterConfiguration;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import java.util.Map;
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
index b21a4d9..abc6f51 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -77,7 +77,7 @@
},
{
"name": "spring.shardingsphere.orchestration",
- "type": "java.util.Map<java.lang.String,org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationCenterConfiguration>",
+ "type": "java.util.Map<java.lang.String,org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationCenterConfiguration>",
"sourceType": "org.apache.shardingsphere.spring.boot.orchestration.common.OrchestrationSpringBootRootConfiguration",
"description": "Customize ShardingSphere orchestration instance."
},
diff --git a/shardingsphere-proxy/shardingsphere-proxy-common/src/main/java/org/apache/shardingsphere/proxy/config/yaml/YamlProxyServerConfiguration.java b/shardingsphere-proxy/shardingsphere-proxy-common/src/main/java/org/apache/shardingsphere/proxy/config/yaml/YamlProxyServerConfiguration.java
index 9348f98..a80847b 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-common/src/main/java/org/apache/shardingsphere/proxy/config/yaml/YamlProxyServerConfiguration.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-common/src/main/java/org/apache/shardingsphere/proxy/config/yaml/YamlProxyServerConfiguration.java
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.cluster.configuration.yaml.YamlClusterConfigura
import org.apache.shardingsphere.infra.auth.yaml.config.YamlAuthenticationConfiguration;
import org.apache.shardingsphere.infra.yaml.config.YamlConfiguration;
import org.apache.shardingsphere.metrics.configuration.yaml.YamlMetricsConfiguration;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationConfiguration;
import java.util.Properties;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-orchestration/src/main/java/org/apache/shardingsphere/proxy/orchestration/OrchestrationConfigurationConverter.java b/shardingsphere-proxy/shardingsphere-proxy-orchestration/src/main/java/org/apache/shardingsphere/proxy/orchestration/OrchestrationConfigurationConverter.java
index 7c63514..71e5d8a 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-orchestration/src/main/java/org/apache/shardingsphere/proxy/orchestration/OrchestrationConfigurationConverter.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-orchestration/src/main/java/org/apache/shardingsphere/proxy/orchestration/OrchestrationConfigurationConverter.java
@@ -28,8 +28,8 @@ import org.apache.shardingsphere.kernel.context.SchemaContextsBuilder;
import org.apache.shardingsphere.kernel.context.schema.DataSourceParameter;
import org.apache.shardingsphere.metrics.configuration.swapper.MetricsConfigurationYamlSwapper;
import org.apache.shardingsphere.orchestration.core.facade.OrchestrationFacade;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationConfiguration;
-import org.apache.shardingsphere.orchestration.repository.common.configuration.swapper.OrchestrationConfigurationYamlSwapper;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.config.YamlOrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.repository.common.yaml.swapper.OrchestrationConfigurationYamlSwapper;
import org.apache.shardingsphere.proxy.config.ProxyConfiguration;
import org.apache.shardingsphere.proxy.config.ShardingConfiguration;
import org.apache.shardingsphere.proxy.config.converter.AbstractConfigurationConverter;