This is an automated email from the ASF dual-hosted git repository.
panjuan 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 3237c50 Rename GovernanceCenterConfiguration to
RegistryCenterConfiguration (#10329)
3237c50 is described below
commit 3237c502eb30bb0cb313dd66652378f0bdce2147
Author: Liang Zhang <[email protected]>
AuthorDate: Thu May 13 19:16:24 2021 +0800
Rename GovernanceCenterConfiguration to RegistryCenterConfiguration (#10329)
---
.../configuration/java-api/governance.cn.md | 38 +++++++++++-----------
.../configuration/java-api/governance.en.md | 24 +++++++-------
.../usage/governance/java-api.cn.md | 2 +-
.../usage/governance/java-api.en.md | 2 +-
.../GovernanceRepositoryConfigurationUtil.java | 6 ++--
.../repository/RegistryCenterRepositoryFacade.java | 4 +--
.../GovernanceCenterConfigurationYamlSwapper.java | 10 +++---
.../GovernanceConfigurationYamlSwapper.java | 8 ++---
.../core/facade/GovernanceFacadeTest.java | 4 +--
.../fixture/TestAllRegistryCenterRepository.java | 4 +--
.../fixture/TestRegistryCenterRepository.java | 4 +--
.../GovernanceConfigurationYamlSwapperTest.java | 30 ++++++++---------
...egistryCenterConfigurationYamlSwapperTest.java} | 8 ++---
.../repository/api/RegistryCenterRepository.java | 4 +--
.../api/config/GovernanceConfiguration.java | 2 +-
...ation.java => RegistryCenterConfiguration.java} | 6 ++--
.../governance/repository/etcd/EtcdRepository.java | 4 +--
.../zookeeper/CuratorZookeeperRepository.java | 6 ++--
.../zookeeper/CuratorZookeeperRepositoryTest.java | 12 +++----
...ernanceShardingSphereDataSourceFactoryTest.java | 4 +--
.../fixture/TestRegistryCenterRepository.java | 4 +--
.../GovernanceShardingSphereDataSourceTest.java | 6 ++--
.../YamlInstanceConfigurationSwapperUtilTest.java | 4 +--
.../registry/TestRegistryCenterRepository.java | 4 +--
...nceCenterConfigurationBeanDefinitionParser.java | 4 +--
.../registry/TestRegistryCenterRepository.java | 4 +--
.../fixture/FixtureRegistryCenterRepository.java | 4 +--
.../scaling/web/HttpServerInitializerTest.java | 4 +--
.../scaling/core/api/ScalingAPIFactory.java | 14 ++++----
.../api/impl/GovernanceRepositoryAPIImplTest.java | 4 +--
.../scaling/core/api/impl/ScalingAPIImplTest.java | 4 +--
.../yaml/ServerConfigurationYamlSwapperTest.java | 4 +--
.../scaling/core/job/FinishedCheckJobTest.java | 4 +--
.../scaling/core/job/ScalingJobTest.java | 4 +--
34 files changed, 125 insertions(+), 125 deletions(-)
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.cn.md
index cdabbfd..825cc03 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.cn.md
@@ -13,38 +13,38 @@ weight = 5
可配置属性:
-| *名称* | *数据类型* | *说明*
|
-| ----------------------------------- | ----------------------------------- |
----------------------------------------------------------------- |
-| name | String | 注册中心实例名称 |
-| registryCenterConfiguration | GovernanceCenterConfiguration |
注册中心实例的配置 |
-| overwrite | boolean | 本地配置是否覆盖配置中心配置,如果可覆盖,每次启动都以本地配置为准 |
+| *名称* | *数据类型* | *说明*
|
+| --------------------------- | --------------------------- |
------------------------------------------------------ |
+| name | String | 注册中心实例名称
|
+| registryCenterConfiguration | RegistryCenterConfiguration | 注册中心实例的配置
|
+| overwrite | boolean |
本地配置是否覆盖配置中心配置,如果可覆盖,每次启动都以本地配置为准 |
注册中心的类型可以为Zookeeper或etcd。
*治理实例配置*
-类名称:org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration
+类名称:org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration
可配置属性:
-| *名称* | *数据类型* | *说明*
|
-| ------------- | ---------- |
-------------------------------------------------------------------------- |
-| type | String | 治理实例类型,如:Zookeeper, etcd
|
-| serverLists | String | 治理服务列表,包括 IP 地址和端口号,多个地址用逗号分隔,如:
host1:2181,host2:2181 |
|
-| props | Properties | 配置本实例需要的其他参数,例如 ZooKeeper 的连接参数等
|
+| *名称* | *数据类型* | *说明*
|
+| ------------- | ---------- |
----------------------------------------------------------------------- |
+| type | String | 治理实例类型,如:Zookeeper, etcd
|
+| serverLists | String | 治理服务列表,包括 IP 地址和端口号,多个地址用逗号分隔,如:
host1:2181,host2:2181 |
+| props | Properties | 配置本实例需要的其他参数,例如 ZooKeeper 的连接参数等
|
ZooKeeper 属性配置
-| *名称* | *数据类型* | *说明* | *默认值* |
-| -------------------------------- | ---------- | --------------------- |
------- |
-| digest (?) | String | 连接注册中心的权限令牌 | 无需验证 |
-| operationTimeoutMilliseconds (?) | int | 操作超时的毫秒数 | 500 毫秒 |
-| maxRetries (?) | int | 连接失败后的最大重试次数 | 3 次 |
-| retryIntervalMilliseconds (?) | int | 重试间隔毫秒数 | 500 毫秒 |
-| timeToLiveSeconds (?) | int | 临时节点存活秒数 | 60 秒 |
+| *名称* | *数据类型* | *说明* | *默认值* |
+| -------------------------------- | --------- | -------------------- |
------- |
+| digest (?) | String | 连接注册中心的权限令牌 | 无需验证 |
+| operationTimeoutMilliseconds (?) | int | 操作超时的毫秒数 | 500 毫秒 |
+| maxRetries (?) | int | 连接失败后的最大重试次数 | 3 次 |
+| retryIntervalMilliseconds (?) | int | 重试间隔毫秒数 | 500 毫秒 |
+| timeToLiveSeconds (?) | int | 临时节点存活秒数 | 60 秒 |
Etcd 属性配置
| *名称* | *数据类型* | *说明* | *默认值* |
-| --------------------- | --------- | ---------- | ------- |
+| --------------------- | --------- | ---------- | ------ |
| timeToLiveSeconds (?) | long | 数据存活秒数 | 30秒 |
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.en.md
index cf6d920..75934aa 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.en.md
@@ -13,25 +13,25 @@ Class name:
org.apache.shardingsphere.governance.repository.api.config.Governanc
Attributes:
-| *Name* | *Data Type* |
*Description*
|
-| ----------------------------------- | ----------------------------------- |
-------------------------------------------------------------------------------------------------------------------
|
-| name | String | Governance instance name |
-| registryCenterConfiguration | GovernanceCenterConfiguration |
Config of registry-center |
+| *Name* | *Data Type* | *Description*
|
+| --------------------------- | ---------------------------- |
------------------------- |
+| name | String | Governance
instance name |
+| registryCenterConfiguration | RegistryCenterConfiguration | Config of
registry-center |
-The type of registryCenter could be Zookeeper or etcd.
+The type of registryCenter could be Zookeeper or Etcd.
*Governance Instance Configuration*
-Class name:
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration
+Class name:
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration
Attributes:
-| *Name* | *Data Type* | *Description*
|
-| ------------- | ----------- |
------------------------------------------------------------------------------------------------------------------------------------------------
|
-| type | String | Governance instance type, such as: Zookeeper,
etcd
|
-| serverLists | String | The list of servers that connect to governance
instance, including IP and port number, use commas to separate, such as:
host1:2181,host2:2181 |
|
-| props | Properties | Properties for center instance config, such as
options of zookeeper
|
-| overwrite | boolean | Local configurations overwrite config center
configurations or not; if they overwrite, each start takes reference of local
configurations |
+| *Name* | *Data Type* | *Description*
|
+| ----------- | ----------- |
---------------------------------------------------------------------------------------------------------------------------------------------
|
+| type | String | Governance instance type, such as: Zookeeper,
etcd
|
+| serverLists | String | The list of servers that connect to governance
instance, including IP and port number, use commas to separate, such as:
host1:2181,host2:2181 |
+| props | Properties | Properties for center instance config, such as
options of zookeeper
|
+| overwrite | boolean | Local configurations overwrite config center
configurations or not; if they overwrite, each start takes reference of local
configurations |
ZooKeeper Properties Configuration
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/usage/governance/java-api.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/usage/governance/java-api.cn.md
index 8827a9e..7c71477 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/usage/governance/java-api.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/usage/governance/java-api.cn.md
@@ -36,7 +36,7 @@ weight = 1
// ...
// 配置配置/注册中心
-GovernanceCenterConfiguration configuration = new
GovernanceCenterConfiguration("Zookeeper", "localhost:2181", new Properties());
+RegistryCenterConfiguration configuration = new
RegistryCenterConfiguration("Zookeeper", "localhost:2181", new Properties());
// 配置治理
Map<String, CenterConfiguration> configurationMap = new HashMap<String,
CenterConfiguration>();
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/usage/governance/java-api.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/usage/governance/java-api.en.md
index b4d65bd..ebae62c 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/usage/governance/java-api.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/usage/governance/java-api.en.md
@@ -36,7 +36,7 @@ Using ZooKeeper as config center and registry center for
example.
// ...
// Configure registry center
-GovernanceCenterConfiguration configuration = new
GovernanceCenterConfiguration("Zookeeper", "localhost:2181", new Properties());
+RegistryCenterConfiguration configuration = new
RegistryCenterConfiguration("Zookeeper", "localhost:2181", new Properties());
// Configure governance
Map<String, CenterConfiguration> configurationMap = new HashMap<String,
CenterConfiguration>();
diff --git
a/examples/shardingsphere-jdbc-example/governance-example/governance-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/governance/raw/jdbc/config/GovernanceRepositoryConfigurationUtil.java
b/examples/shardingsphere-jdbc-example/governance-example/governance-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/governance/raw/jdbc/config/GovernanceRepositoryConfigurationUtil.java
index b70d557..6ef1d4e 100644
---
a/examples/shardingsphere-jdbc-example/governance-example/governance-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/governance/raw/jdbc/config/GovernanceRepositoryConfigurationUtil.java
+++
b/examples/shardingsphere-jdbc-example/governance-example/governance-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/governance/raw/jdbc/config/GovernanceRepositoryConfigurationUtil.java
@@ -19,7 +19,7 @@ package
org.apache.shardingsphere.example.governance.raw.jdbc.config;
import org.apache.shardingsphere.example.type.ShardingType;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import java.util.Properties;
@@ -28,7 +28,7 @@ public final class GovernanceRepositoryConfigurationUtil {
private static final String ZOOKEEPER_CONNECTION_STRING = "localhost:2181";
public static GovernanceConfiguration getZooKeeperConfiguration(final
boolean overwrite, final ShardingType shardingType) {
- GovernanceCenterConfiguration governanceCenterConfig = new
GovernanceCenterConfiguration("ZooKeeper", ZOOKEEPER_CONNECTION_STRING, new
Properties());
+ RegistryCenterConfiguration governanceCenterConfig = new
RegistryCenterConfiguration("ZooKeeper", ZOOKEEPER_CONNECTION_STRING, new
Properties());
switch (shardingType) {
case SHARDING_DATABASES_AND_TABLES:
return new
GovernanceConfiguration("governance-sharding-data-source",
governanceCenterConfig, overwrite);
@@ -45,7 +45,7 @@ public final class GovernanceRepositoryConfigurationUtil {
public static GovernanceConfiguration getNacosConfiguration(final boolean
overwrite, final ShardingType shardingType) {
Properties zookeeperProperties = new Properties();
- GovernanceCenterConfiguration zookeeperConfig = new
GovernanceCenterConfiguration("ZooKeeper", ZOOKEEPER_CONNECTION_STRING,
zookeeperProperties);
+ RegistryCenterConfiguration zookeeperConfig = new
RegistryCenterConfiguration("ZooKeeper", ZOOKEEPER_CONNECTION_STRING,
zookeeperProperties);
switch (shardingType) {
case SHARDING_DATABASES_AND_TABLES:
return new
GovernanceConfiguration("governance-zookeeper-sharding-data-source",
zookeeperConfig, overwrite);
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/facade/repository/RegistryCenterRepositoryFacade.java
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/facade/repository/RegistryCenterRepositoryFacade.java
index ae9d546..94c09b1 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/facade/repository/RegistryCenterRepositoryFacade.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/facade/repository/RegistryCenterRepositoryFacade.java
@@ -20,7 +20,7 @@ package
org.apache.shardingsphere.governance.core.facade.repository;
import com.google.common.base.Preconditions;
import lombok.Getter;
import
org.apache.shardingsphere.governance.repository.api.RegistryCenterRepository;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.infra.spi.typed.TypedSPIRegistry;
@@ -42,7 +42,7 @@ public final class RegistryCenterRepositoryFacade implements
AutoCloseable {
}
private RegistryCenterRepository createGovernanceRepository(final
GovernanceConfiguration config) {
- GovernanceCenterConfiguration governanceCenterConfig =
config.getGovernanceCenterConfiguration();
+ RegistryCenterConfiguration governanceCenterConfig =
config.getRegistryCenterConfiguration();
Preconditions.checkNotNull(governanceCenterConfig, "Governance center
configuration cannot be null.");
RegistryCenterRepository result =
TypedSPIRegistry.getRegisteredService(RegistryCenterRepository.class,
governanceCenterConfig.getType(), governanceCenterConfig.getProps());
result.init(config.getName(), governanceCenterConfig);
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceCenterConfigurationYamlSwapper.java
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceCenterConfigurationYamlSwapper.java
index 2a521fd..b023281 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceCenterConfigurationYamlSwapper.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceCenterConfigurationYamlSwapper.java
@@ -18,16 +18,16 @@
package org.apache.shardingsphere.governance.core.yaml.swapper;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceCenterConfiguration;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import org.apache.shardingsphere.infra.yaml.swapper.YamlConfigurationSwapper;
/**
* Governance center configuration YAML swapper.
*/
-public final class GovernanceCenterConfigurationYamlSwapper implements
YamlConfigurationSwapper<YamlGovernanceCenterConfiguration,
GovernanceCenterConfiguration> {
+public final class GovernanceCenterConfigurationYamlSwapper implements
YamlConfigurationSwapper<YamlGovernanceCenterConfiguration,
RegistryCenterConfiguration> {
@Override
- public YamlGovernanceCenterConfiguration swapToYamlConfiguration(final
GovernanceCenterConfiguration config) {
+ public YamlGovernanceCenterConfiguration swapToYamlConfiguration(final
RegistryCenterConfiguration config) {
YamlGovernanceCenterConfiguration result = new
YamlGovernanceCenterConfiguration();
result.setType(config.getType());
result.setServerLists(config.getServerLists());
@@ -36,7 +36,7 @@ public final class GovernanceCenterConfigurationYamlSwapper
implements YamlConfi
}
@Override
- public GovernanceCenterConfiguration swapToObject(final
YamlGovernanceCenterConfiguration yamlConfig) {
- return new GovernanceCenterConfiguration(yamlConfig.getType(),
yamlConfig.getServerLists(), yamlConfig.getProps());
+ public RegistryCenterConfiguration swapToObject(final
YamlGovernanceCenterConfiguration yamlConfig) {
+ return new RegistryCenterConfiguration(yamlConfig.getType(),
yamlConfig.getServerLists(), yamlConfig.getProps());
}
}
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceConfigurationYamlSwapper.java
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceConfigurationYamlSwapper.java
index ca32d16..51cb0cb 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceConfigurationYamlSwapper.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceConfigurationYamlSwapper.java
@@ -19,7 +19,7 @@ package
org.apache.shardingsphere.governance.core.yaml.swapper;
import org.apache.shardingsphere.infra.yaml.swapper.YamlConfigurationSwapper;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceConfiguration;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration;
/**
@@ -33,13 +33,13 @@ public final class GovernanceConfigurationYamlSwapper
implements YamlConfigurati
public YamlGovernanceConfiguration swapToYamlConfiguration(final
GovernanceConfiguration data) {
YamlGovernanceConfiguration result = new YamlGovernanceConfiguration();
result.setName(data.getName());
-
result.setRegistryCenter(governanceCenterConfigurationSwapper.swapToYamlConfiguration(data.getGovernanceCenterConfiguration()));
+
result.setRegistryCenter(governanceCenterConfigurationSwapper.swapToYamlConfiguration(data.getRegistryCenterConfiguration()));
return result;
}
@Override
public GovernanceConfiguration swapToObject(final
YamlGovernanceConfiguration yamlConfig) {
- GovernanceCenterConfiguration governanceCenterConfiguration =
governanceCenterConfigurationSwapper.swapToObject(yamlConfig.getRegistryCenter());
- return new GovernanceConfiguration(yamlConfig.getName(),
governanceCenterConfiguration, yamlConfig.isOverwrite());
+ RegistryCenterConfiguration registryCenterConfiguration =
governanceCenterConfigurationSwapper.swapToObject(yamlConfig.getRegistryCenter());
+ return new GovernanceConfiguration(yamlConfig.getName(),
registryCenterConfiguration, yamlConfig.isOverwrite());
}
}
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
index b35d67f..e743f8c 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
@@ -21,7 +21,7 @@ import
org.apache.shardingsphere.governance.core.facade.repository.RegistryCente
import org.apache.shardingsphere.governance.core.facade.util.FieldUtil;
import org.apache.shardingsphere.governance.core.registry.RegistryCenter;
import
org.apache.shardingsphere.governance.core.registry.listener.GovernanceListenerManager;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration;
import org.apache.shardingsphere.infra.config.RuleConfiguration;
import
org.apache.shardingsphere.infra.config.datasource.DataSourceConfiguration;
@@ -56,7 +56,7 @@ public final class GovernanceFacadeTest {
@Before
public void setUp() {
- GovernanceConfiguration governanceConfig = new
GovernanceConfiguration("test_name", new GovernanceCenterConfiguration("ALL",
"127.0.0.1", new Properties()), false);
+ GovernanceConfiguration governanceConfig = new
GovernanceConfiguration("test_name", new RegistryCenterConfiguration("ALL",
"127.0.0.1", new Properties()), false);
governanceFacade.init(governanceConfig, Arrays.asList("sharding_db",
"replica_query_db"));
FieldUtil.setField(governanceFacade, "repositoryFacade",
repositoryFacade);
FieldUtil.setField(governanceFacade, "registryCenter", registryCenter);
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/fixture/TestAllRegistryCenterRepository.java
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/fixture/TestAllRegistryCenterRepository.java
index 24b12e9..5c93fe3 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/fixture/TestAllRegistryCenterRepository.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/fixture/TestAllRegistryCenterRepository.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.governance.core.facade.fixture;
import
org.apache.shardingsphere.governance.repository.api.RegistryCenterRepository;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEventListener;
import java.util.Collections;
@@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit;
public final class TestAllRegistryCenterRepository implements
RegistryCenterRepository {
@Override
- public void init(final String name, final GovernanceCenterConfiguration
config) {
+ public void init(final String name, final RegistryCenterConfiguration
config) {
}
@Override
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/fixture/TestRegistryCenterRepository.java
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/fixture/TestRegistryCenterRepository.java
index 8422dea..81e29cc 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/fixture/TestRegistryCenterRepository.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/fixture/TestRegistryCenterRepository.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.governance.core.facade.fixture;
import
org.apache.shardingsphere.governance.repository.api.RegistryCenterRepository;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEventListener;
import java.util.Collections;
@@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit;
public final class TestRegistryCenterRepository implements
RegistryCenterRepository {
@Override
- public void init(final String name, final GovernanceCenterConfiguration
config) {
+ public void init(final String name, final RegistryCenterConfiguration
config) {
}
@Override
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceConfigurationYamlSwapperTest.java
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceConfigurationYamlSwapperTest.java
index dbf197a..02058d7 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceConfigurationYamlSwapperTest.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceConfigurationYamlSwapperTest.java
@@ -19,7 +19,7 @@ package
org.apache.shardingsphere.governance.core.yaml.swapper;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceCenterConfiguration;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceConfiguration;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration;
import org.junit.Test;
@@ -36,13 +36,13 @@ public final class GovernanceConfigurationYamlSwapperTest {
YamlGovernanceConfiguration actual = new
GovernanceConfigurationYamlSwapper().swapToYamlConfiguration(expected);
assertThat(actual.getName(), is(expected.getName()));
assertThat(actual.isOverwrite(), is(expected.isOverwrite()));
- assertThat(actual.getRegistryCenter().getType(),
is(expected.getGovernanceCenterConfiguration().getType()));
- assertThat(actual.getRegistryCenter().getServerLists(),
is(expected.getGovernanceCenterConfiguration().getServerLists()));
- assertThat(actual.getRegistryCenter().getProps(),
is(expected.getGovernanceCenterConfiguration().getProps()));
+ assertThat(actual.getRegistryCenter().getType(),
is(expected.getRegistryCenterConfiguration().getType()));
+ assertThat(actual.getRegistryCenter().getServerLists(),
is(expected.getRegistryCenterConfiguration().getServerLists()));
+ assertThat(actual.getRegistryCenter().getProps(),
is(expected.getRegistryCenterConfiguration().getProps()));
}
private GovernanceConfiguration
createGovernanceConfigurationWithoutAdditionalConfigCenterConfiguration() {
- return new GovernanceConfiguration("logic_schema", new
GovernanceCenterConfiguration("TEST", "127.0.0.1:2181", new Properties()),
false);
+ return new GovernanceConfiguration("logic_schema", new
RegistryCenterConfiguration("TEST", "127.0.0.1:2181", new Properties()), false);
}
@Test
@@ -51,14 +51,14 @@ public final class GovernanceConfigurationYamlSwapperTest {
YamlGovernanceConfiguration actual = new
GovernanceConfigurationYamlSwapper().swapToYamlConfiguration(expected);
assertThat(actual.getName(), is(expected.getName()));
assertThat(actual.isOverwrite(), is(expected.isOverwrite()));
- assertThat(actual.getRegistryCenter().getType(),
is(expected.getGovernanceCenterConfiguration().getType()));
- assertThat(actual.getRegistryCenter().getServerLists(),
is(expected.getGovernanceCenterConfiguration().getServerLists()));
- assertThat(actual.getRegistryCenter().getProps(),
is(expected.getGovernanceCenterConfiguration().getProps()));
+ assertThat(actual.getRegistryCenter().getType(),
is(expected.getRegistryCenterConfiguration().getType()));
+ assertThat(actual.getRegistryCenter().getServerLists(),
is(expected.getRegistryCenterConfiguration().getServerLists()));
+ assertThat(actual.getRegistryCenter().getProps(),
is(expected.getRegistryCenterConfiguration().getProps()));
}
private GovernanceConfiguration
createGovernanceConfigurationWithAdditionalConfigCenterConfiguration() {
return new GovernanceConfiguration("logic_schema",
- new GovernanceCenterConfiguration("TEST", "127.0.0.1:2181",
new Properties()), false);
+ new RegistryCenterConfiguration("TEST", "127.0.0.1:2181", new
Properties()), false);
}
@Test
@@ -67,9 +67,9 @@ public final class GovernanceConfigurationYamlSwapperTest {
GovernanceConfiguration actual = new
GovernanceConfigurationYamlSwapper().swapToObject(expected);
assertThat(actual.getName(), is(expected.getName()));
assertThat(actual.isOverwrite(), is(expected.isOverwrite()));
- assertThat(actual.getGovernanceCenterConfiguration().getType(),
is(expected.getRegistryCenter().getType()));
- assertThat(actual.getGovernanceCenterConfiguration().getServerLists(),
is(expected.getRegistryCenter().getServerLists()));
- assertThat(actual.getGovernanceCenterConfiguration().getProps(),
is(expected.getRegistryCenter().getProps()));
+ assertThat(actual.getRegistryCenterConfiguration().getType(),
is(expected.getRegistryCenter().getType()));
+ assertThat(actual.getRegistryCenterConfiguration().getServerLists(),
is(expected.getRegistryCenter().getServerLists()));
+ assertThat(actual.getRegistryCenterConfiguration().getProps(),
is(expected.getRegistryCenter().getProps()));
}
private YamlGovernanceConfiguration
createYamlGovernanceConfigurationWithoutAdditionalConfigCenterConfiguration() {
@@ -85,9 +85,9 @@ public final class GovernanceConfigurationYamlSwapperTest {
GovernanceConfiguration actual = new
GovernanceConfigurationYamlSwapper().swapToObject(expected);
assertThat(actual.getName(), is(expected.getName()));
assertThat(actual.isOverwrite(), is(expected.isOverwrite()));
- assertThat(actual.getGovernanceCenterConfiguration().getType(),
is(expected.getRegistryCenter().getType()));
- assertThat(actual.getGovernanceCenterConfiguration().getServerLists(),
is(expected.getRegistryCenter().getServerLists()));
- assertThat(actual.getGovernanceCenterConfiguration().getProps(),
is(expected.getRegistryCenter().getProps()));
+ assertThat(actual.getRegistryCenterConfiguration().getType(),
is(expected.getRegistryCenter().getType()));
+ assertThat(actual.getRegistryCenterConfiguration().getServerLists(),
is(expected.getRegistryCenter().getServerLists()));
+ assertThat(actual.getRegistryCenterConfiguration().getProps(),
is(expected.getRegistryCenter().getProps()));
}
private YamlGovernanceConfiguration
createYamlGovernanceConfigurationWithAdditionalConfigCenterConfiguration() {
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceCenterConfigurationYamlSwapperTest.java
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/RegistryCenterConfigurationYamlSwapperTest.java
similarity index 86%
rename from
shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceCenterConfigurationYamlSwapperTest.java
rename to
shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/RegistryCenterConfigurationYamlSwapperTest.java
index affedd9..e4d8ef2 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceCenterConfigurationYamlSwapperTest.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/RegistryCenterConfigurationYamlSwapperTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.governance.core.yaml.swapper;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceCenterConfiguration;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import org.junit.Test;
import java.util.Properties;
@@ -26,11 +26,11 @@ import java.util.Properties;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
-public final class GovernanceCenterConfigurationYamlSwapperTest {
+public final class RegistryCenterConfigurationYamlSwapperTest {
@Test
public void assertToYamlConfiguration() {
- GovernanceCenterConfiguration expected = new
GovernanceCenterConfiguration("TEST", "127.0.0.1:2181", new Properties());
+ RegistryCenterConfiguration expected = new
RegistryCenterConfiguration("TEST", "127.0.0.1:2181", new Properties());
YamlGovernanceCenterConfiguration actual = new
GovernanceCenterConfigurationYamlSwapper().swapToYamlConfiguration(expected);
assertThat(actual.getType(), is(expected.getType()));
assertThat(actual.getServerLists(), is(expected.getServerLists()));
@@ -40,7 +40,7 @@ public final class
GovernanceCenterConfigurationYamlSwapperTest {
@Test
public void assertSwapToObject() {
YamlGovernanceCenterConfiguration yamlConfig =
getYamlGovernanceCenterConfiguration();
- GovernanceCenterConfiguration governanceCenterConfig = new
GovernanceCenterConfigurationYamlSwapper().swapToObject(yamlConfig);
+ RegistryCenterConfiguration governanceCenterConfig = new
GovernanceCenterConfigurationYamlSwapper().swapToObject(yamlConfig);
assertThat(governanceCenterConfig.getType(), is(yamlConfig.getType()));
assertThat(governanceCenterConfig.getServerLists(),
is(yamlConfig.getServerLists()));
assertThat(governanceCenterConfig.getProps(),
is(yamlConfig.getProps()));
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-api/src/main/java/org/apache/shardingsphere/governance/repository/api/RegistryCenterRepository.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-api/src/main/java/org/apache/shardingsphere/governance/repository/api/RegistryCenterRepository.java
index cf6710c..1c82230 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-api/src/main/java/org/apache/shardingsphere/governance/repository/api/RegistryCenterRepository.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-api/src/main/java/org/apache/shardingsphere/governance/repository/api/RegistryCenterRepository.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.governance.repository.api;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEventListener;
import org.apache.shardingsphere.infra.spi.typed.TypedSPI;
@@ -40,7 +40,7 @@ public interface RegistryCenterRepository extends TypedSPI {
* @param name governance center name
* @param config governance center configuration
*/
- void init(String name, GovernanceCenterConfiguration config);
+ void init(String name, RegistryCenterConfiguration config);
/**
* Get data from governance center.
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-api/src/main/java/org/apache/shardingsphere/governance/repository/api/config/GovernanceConfiguration.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-api/src/main/java/org/apache/shardingsphere/governance/repository/api/config/GovernanceConfiguration.java
index 72f05ee..290e5d8 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-api/src/main/java/org/apache/shardingsphere/governance/repository/api/config/GovernanceConfiguration.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-api/src/main/java/org/apache/shardingsphere/governance/repository/api/config/GovernanceConfiguration.java
@@ -29,7 +29,7 @@ public final class GovernanceConfiguration {
private final String name;
- private final GovernanceCenterConfiguration governanceCenterConfiguration;
+ private final RegistryCenterConfiguration registryCenterConfiguration;
private final boolean overwrite;
}
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-api/src/main/java/org/apache/shardingsphere/governance/repository/api/config/GovernanceCenterConfiguration.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-api/src/main/java/org/apache/shardingsphere/governance/repository/api/config/RegistryCenterConfiguration.java
similarity index 92%
rename from
shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-api/src/main/java/org/apache/shardingsphere/governance/repository/api/config/GovernanceCenterConfiguration.java
rename to
shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-api/src/main/java/org/apache/shardingsphere/governance/repository/api/config/RegistryCenterConfiguration.java
index 2b98ee1..d05c3f6 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-api/src/main/java/org/apache/shardingsphere/governance/repository/api/config/GovernanceCenterConfiguration.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-api/src/main/java/org/apache/shardingsphere/governance/repository/api/config/RegistryCenterConfiguration.java
@@ -23,11 +23,11 @@ import lombok.RequiredArgsConstructor;
import java.util.Properties;
/**
- * Governance center configuration.
+ * Registry center configuration.
*/
-@Getter
@RequiredArgsConstructor
-public final class GovernanceCenterConfiguration {
+@Getter
+public final class RegistryCenterConfiguration {
private final String type;
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdRepository.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdRepository.java
index f670ede..282d4de 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdRepository.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdRepository.java
@@ -31,7 +31,7 @@ import lombok.Getter;
import lombok.Setter;
import lombok.SneakyThrows;
import
org.apache.shardingsphere.governance.repository.api.RegistryCenterRepository;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent.Type;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEventListener;
@@ -57,7 +57,7 @@ public final class EtcdRepository implements
RegistryCenterRepository {
private EtcdProperties etcdProperties;
@Override
- public void init(final String name, final GovernanceCenterConfiguration
config) {
+ public void init(final String name, final RegistryCenterConfiguration
config) {
etcdProperties = new EtcdProperties(props);
client =
Client.builder().endpoints(Util.toURIs(Splitter.on(",").trimResults().splitToList(config.getServerLists()))).namespace(ByteSequence.from(name,
StandardCharsets.UTF_8)).build();
}
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepository.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/govern
[...]
index c3f414a..3854e33 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepository.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepository.java
@@ -31,7 +31,7 @@ import
org.apache.curator.framework.recipes.locks.InterProcessMutex;
import org.apache.curator.retry.ExponentialBackoffRetry;
import org.apache.curator.utils.CloseableUtils;
import
org.apache.shardingsphere.governance.repository.api.RegistryCenterRepository;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent.Type;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEventListener;
@@ -72,13 +72,13 @@ public final class CuratorZookeeperRepository implements
RegistryCenterRepositor
private Properties props = new Properties();
@Override
- public void init(final String name, final GovernanceCenterConfiguration
config) {
+ public void init(final String name, final RegistryCenterConfiguration
config) {
ZookeeperProperties zookeeperProperties = new
ZookeeperProperties(props);
client = buildCuratorClient(name, config, zookeeperProperties);
initCuratorClient(zookeeperProperties);
}
- private CuratorFramework buildCuratorClient(final String namespace, final
GovernanceCenterConfiguration config, final ZookeeperProperties
zookeeperProperties) {
+ private CuratorFramework buildCuratorClient(final String namespace, final
RegistryCenterConfiguration config, final ZookeeperProperties
zookeeperProperties) {
int retryIntervalMilliseconds =
zookeeperProperties.getValue(ZookeeperPropertyKey.RETRY_INTERVAL_MILLISECONDS);
int maxRetries =
zookeeperProperties.getValue(ZookeeperPropertyKey.MAX_RETRIES);
int timeToLiveSeconds =
zookeeperProperties.getValue(ZookeeperPropertyKey.TIME_TO_LIVE_SECONDS);
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepositoryTest.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/go
[...]
index 4c9f200..3eb5e90 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepositoryTest.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepositoryTest.java
@@ -42,7 +42,7 @@ import
org.apache.curator.framework.recipes.cache.CuratorCache;
import org.apache.curator.framework.recipes.cache.CuratorCacheListener;
import org.apache.curator.framework.recipes.locks.InterProcessLock;
import org.apache.curator.framework.state.ConnectionStateListener;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent.Type;
import org.apache.zookeeper.AddWatchMode;
@@ -137,7 +137,7 @@ public final class CuratorZookeeperRepositoryTest {
mockClient();
mockField();
mockBuilder();
- GovernanceCenterConfiguration config = new
GovernanceCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
+ RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
REPOSITORY.init("governance", config);
}
@@ -295,7 +295,7 @@ public final class CuratorZookeeperRepositoryTest {
props.setProperty(ZookeeperPropertyKey.MAX_RETRIES.getKey(), "1");
props.setProperty(ZookeeperPropertyKey.TIME_TO_LIVE_SECONDS.getKey(),
"1000");
props.setProperty(ZookeeperPropertyKey.OPERATION_TIMEOUT_MILLISECONDS.getKey(),
"2000");
- GovernanceCenterConfiguration config = new
GovernanceCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
+ RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
REPOSITORY.setProps(props);
REPOSITORY.init("governance", config);
assertThat(REPOSITORY.getProps().getProperty(ZookeeperPropertyKey.RETRY_INTERVAL_MILLISECONDS.getKey()),
is("1000"));
@@ -308,7 +308,7 @@ public final class CuratorZookeeperRepositoryTest {
public void assertBuildCuratorClientWithTimeToLiveSecondsEqualsZero() {
Properties props = new Properties();
props.setProperty(ZookeeperPropertyKey.TIME_TO_LIVE_SECONDS.getKey(),
"0");
- GovernanceCenterConfiguration config = new
GovernanceCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
+ RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
REPOSITORY.setProps(props);
REPOSITORY.init("governance", config);
assertThat(REPOSITORY.getProps().getProperty(ZookeeperPropertyKey.TIME_TO_LIVE_SECONDS.getKey()),
is("0"));
@@ -318,7 +318,7 @@ public final class CuratorZookeeperRepositoryTest {
public void
assertBuildCuratorClientWithOperationTimeoutMillisecondsEqualsZero() {
Properties props = new Properties();
props.setProperty(ZookeeperPropertyKey.OPERATION_TIMEOUT_MILLISECONDS.getKey(),
"0");
- GovernanceCenterConfiguration config = new
GovernanceCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
+ RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
REPOSITORY.setProps(props);
REPOSITORY.init("governance", config);
assertThat(REPOSITORY.getProps().getProperty(ZookeeperPropertyKey.OPERATION_TIMEOUT_MILLISECONDS.getKey()),
is("0"));
@@ -328,7 +328,7 @@ public final class CuratorZookeeperRepositoryTest {
public void assertBuildCuratorClientWithDigest() {
Properties props = new Properties();
props.setProperty(ZookeeperPropertyKey.DIGEST.getKey(), "any");
- GovernanceCenterConfiguration config = new
GovernanceCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
+ RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
REPOSITORY.setProps(props);
REPOSITORY.init("governance", config);
assertThat(REPOSITORY.getProps().getProperty(ZookeeperPropertyKey.DIGEST.getKey()),
is("any"));
diff --git
a/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/api/GovernanceShardingSphereDataSourceFactoryTest.java
b/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/api/GovernanceShardingSphereDataSourceFactoryTest.java
index 59df6bf..a3e3eea 100644
---
a/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/api/GovernanceShardingSphereDataSourceFactoryTest.java
+++
b/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/api/GovernanceShardingSphereDataSourceFactoryTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.driver.governance.api;
import
org.apache.shardingsphere.driver.governance.internal.datasource.GovernanceShardingSphereDataSource;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration;
import org.apache.shardingsphere.infra.config.RuleConfiguration;
import org.junit.Test;
@@ -75,7 +75,7 @@ public final class
GovernanceShardingSphereDataSourceFactoryTest {
private GovernanceConfiguration createGovernanceConfiguration() {
GovernanceConfiguration result = mock(GovernanceConfiguration.class);
- when(result.getGovernanceCenterConfiguration()).thenReturn(new
GovernanceCenterConfiguration("GOV_TEST", "", null));
+ when(result.getRegistryCenterConfiguration()).thenReturn(new
RegistryCenterConfiguration("GOV_TEST", "", null));
return result;
}
}
diff --git
a/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/fixture/TestRegistryCenterRepository.java
b/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/fixture/TestRegistryCenterRepository.java
index 5c9411f..4b4eb57 100644
---
a/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/fixture/TestRegistryCenterRepository.java
+++
b/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/fixture/TestRegistryCenterRepository.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.driver.governance.fixture;
import
org.apache.shardingsphere.governance.repository.api.RegistryCenterRepository;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEventListener;
import java.util.Collections;
@@ -32,7 +32,7 @@ public final class TestRegistryCenterRepository implements
RegistryCenterReposit
private static final Map<String, String> REGISTRY_DATA = new
LinkedHashMap<>();
@Override
- public void init(final String name, final GovernanceCenterConfiguration
config) {
+ public void init(final String name, final RegistryCenterConfiguration
config) {
}
@Override
diff --git
a/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/internal/datasource/GovernanceShardingSphereDataSourceTest.java
b/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/internal/datasource/GovernanceShardingSphereDataSourceTest.java
index 560b97a..ccc0363 100644
---
a/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/internal/datasource/GovernanceShardingSphereDataSourceTest.java
+++
b/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/internal/datasource/GovernanceShardingSphereDataSourceTest.java
@@ -26,7 +26,7 @@ import
org.apache.shardingsphere.governance.core.registry.listener.event.props.P
import
org.apache.shardingsphere.governance.core.registry.listener.event.rule.RuleConfigurationsChangedEvent;
import
org.apache.shardingsphere.governance.core.registry.listener.event.readwritesplitting.DisabledStateChangedEvent;
import
org.apache.shardingsphere.governance.core.registry.schema.GovernanceSchema;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration;
import
org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmConfiguration;
import
org.apache.shardingsphere.infra.config.datasource.DataSourceConfiguration;
@@ -73,10 +73,10 @@ public final class GovernanceShardingSphereDataSourceTest {
return new GovernanceConfiguration("test_name",
getRegistryCenterConfiguration(), true);
}
- private static GovernanceCenterConfiguration
getRegistryCenterConfiguration() {
+ private static RegistryCenterConfiguration
getRegistryCenterConfiguration() {
Properties properties = new Properties();
properties.setProperty("overwrite", "true");
- return new GovernanceCenterConfiguration("GOV_TEST", "localhost:3181",
properties);
+ return new RegistryCenterConfiguration("GOV_TEST", "localhost:3181",
properties);
}
@Test
diff --git
a/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/internal/util/YamlInstanceConfigurationSwapperUtilTest.java
b/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/internal/util/YamlInstanceConfigurationSwapperUtilTest.java
index 4c26a30..4fc21d4 100644
---
a/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/internal/util/YamlInstanceConfigurationSwapperUtilTest.java
+++
b/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/internal/util/YamlInstanceConfigurationSwapperUtilTest.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.driver.governance.internal.util;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceCenterConfiguration;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceConfiguration;
import org.junit.Test;
@@ -32,7 +32,7 @@ public final class YamlInstanceConfigurationSwapperUtilTest {
@Test
public void marshal() {
YamlGovernanceConfiguration expected =
createExpectedYamlGovernanceConfiguration();
- GovernanceCenterConfiguration actual =
YamlGovernanceRepositoryConfigurationSwapperUtil.marshal(expected).getGovernanceCenterConfiguration();
+ RegistryCenterConfiguration actual =
YamlGovernanceRepositoryConfigurationSwapperUtil.marshal(expected).getRegistryCenterConfiguration();
assertThat(actual.getType(),
is(expected.getRegistryCenter().getType()));
assertThat(actual.getServerLists(),
is(expected.getRegistryCenter().getServerLists()));
assertThat(actual.getProps(),
is(expected.getRegistryCenter().getProps()));
diff --git
a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/governance/registry/TestRegistryCenterRepository.java
b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/governance/registry/TestRegistryCenterRepository.java
index 7d70a51..e0fc3f7 100644
---
a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/governance/registry/TestRegistryCenterRepository.java
+++
b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/governance/registry/TestRegistryCenterRepository.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.spring.boot.governance.registry;
import
org.apache.shardingsphere.governance.repository.api.RegistryCenterRepository;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEventListener;
import java.util.Collections;
@@ -32,7 +32,7 @@ public final class TestRegistryCenterRepository implements
RegistryCenterReposit
private static final Map<String, String> REGISTRY_DATA = new
LinkedHashMap<>();
@Override
- public void init(final String name, final GovernanceCenterConfiguration
config) {
+ public void init(final String name, final RegistryCenterConfiguration
config) {
}
@Override
diff --git
a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-namespace/src/main/java/org/apache/shardingsphere/spring/namespace/governance/parser/GovernanceCenterConfigurationBeanDefinitionParser.java
b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-namespace/src/main/java/org/apache/shardingsphere/spring/namespace/governance/parser/Governa
[...]
index cac0b4e..ee63f46 100644
---
a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-namespace/src/main/java/org/apache/shardingsphere/spring/namespace/governance/parser/GovernanceCenterConfigurationBeanDefinitionParser.java
+++
b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-namespace/src/main/java/org/apache/shardingsphere/spring/namespace/governance/parser/GovernanceCenterConfigurationBeanDefinitionParser.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.spring.namespace.governance.parser;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.spring.namespace.governance.constants.GovernanceCenterConfigurationBeanDefinitionTag;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
@@ -35,7 +35,7 @@ public final class
GovernanceCenterConfigurationBeanDefinitionParser extends Abs
@Override
protected AbstractBeanDefinition parseInternal(final Element element,
final ParserContext parserContext) {
- BeanDefinitionBuilder factory =
BeanDefinitionBuilder.rootBeanDefinition(GovernanceCenterConfiguration.class);
+ BeanDefinitionBuilder factory =
BeanDefinitionBuilder.rootBeanDefinition(RegistryCenterConfiguration.class);
factory.addConstructorArgValue(element.getAttribute(GovernanceCenterConfigurationBeanDefinitionTag.TYPE_ATTRIBUTE));
factory.addConstructorArgValue(element.getAttribute(GovernanceCenterConfigurationBeanDefinitionTag.SERVER_LISTS_ATTRIBUTE));
factory.addConstructorArgValue(parseProperties(element,
parserContext));
diff --git
a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/governance/registry/TestRegistryCenterRepository.java
b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/governance/registry/TestRegistryCenterReposi
[...]
index fdb1c7f..4d613aa 100644
---
a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/governance/registry/TestRegistryCenterRepository.java
+++
b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/governance/registry/TestRegistryCenterRepository.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.spring.namespace.governance.registry;
import
org.apache.shardingsphere.governance.repository.api.RegistryCenterRepository;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEventListener;
import java.util.Collections;
@@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit;
public final class TestRegistryCenterRepository implements
RegistryCenterRepository {
@Override
- public void init(final String name, final GovernanceCenterConfiguration
config) {
+ public void init(final String name, final RegistryCenterConfiguration
config) {
}
@Override
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/fixture/FixtureRegistryCenterRepository.java
b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/fixture/FixtureRegistryCenterRepository.java
index 86d037b..b170253 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/fixture/FixtureRegistryCenterRepository.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/fixture/FixtureRegistryCenterRepository.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.proxy.fixture;
import
org.apache.shardingsphere.governance.repository.api.RegistryCenterRepository;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEventListener;
import java.util.Collections;
@@ -32,7 +32,7 @@ public final class FixtureRegistryCenterRepository implements
RegistryCenterRepo
private static final Map<String, String> REGISTRY_DATA = new
LinkedHashMap<>();
@Override
- public void init(final String name, final GovernanceCenterConfiguration
config) {
+ public void init(final String name, final RegistryCenterConfiguration
config) {
}
@Override
diff --git
a/shardingsphere-scaling/shardingsphere-scaling-bootstrap/src/test/java/org/apache/shardingsphere/scaling/web/HttpServerInitializerTest.java
b/shardingsphere-scaling/shardingsphere-scaling-bootstrap/src/test/java/org/apache/shardingsphere/scaling/web/HttpServerInitializerTest.java
index 2af3dee..774f88d 100644
---
a/shardingsphere-scaling/shardingsphere-scaling-bootstrap/src/test/java/org/apache/shardingsphere/scaling/web/HttpServerInitializerTest.java
+++
b/shardingsphere-scaling/shardingsphere-scaling-bootstrap/src/test/java/org/apache/shardingsphere/scaling/web/HttpServerInitializerTest.java
@@ -21,7 +21,7 @@ import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
import lombok.SneakyThrows;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration;
import org.apache.shardingsphere.scaling.core.config.ScalingContext;
import org.apache.shardingsphere.scaling.core.config.ServerConfiguration;
@@ -62,7 +62,7 @@ public final class HttpServerInitializerTest {
private ServerConfiguration mockServerConfig() {
ServerConfiguration result = new ServerConfiguration();
- result.setGovernanceConfig(new GovernanceConfiguration("test", new
GovernanceCenterConfiguration("Zookeeper", "localhost:2181", null), false));
+ result.setGovernanceConfig(new GovernanceConfiguration("test", new
RegistryCenterConfiguration("Zookeeper", "localhost:2181", null), false));
return result;
}
}
diff --git
a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/ScalingAPIFactory.java
b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/ScalingAPIFactory.java
index 83c5338..8a5c85f 100644
---
a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/ScalingAPIFactory.java
+++
b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/ScalingAPIFactory.java
@@ -30,7 +30,7 @@ import
org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;
import
org.apache.shardingsphere.elasticjob.reg.zookeeper.ZookeeperConfiguration;
import
org.apache.shardingsphere.elasticjob.reg.zookeeper.ZookeeperRegistryCenter;
import
org.apache.shardingsphere.governance.repository.api.RegistryCenterRepository;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.infra.spi.typed.TypedSPIRegistry;
@@ -147,7 +147,7 @@ public final class ScalingAPIFactory {
private static GovernanceRepositoryAPI createGovernanceRepositoryAPI()
{
checkServerConfig();
GovernanceConfiguration governanceConfig =
ScalingContext.getInstance().getServerConfig().getGovernanceConfig();
- GovernanceCenterConfiguration registryCenterConfig =
governanceConfig.getGovernanceCenterConfiguration();
+ RegistryCenterConfiguration registryCenterConfig =
governanceConfig.getRegistryCenterConfiguration();
RegistryCenterRepository registryCenterRepository =
TypedSPIRegistry.getRegisteredService(RegistryCenterRepository.class,
registryCenterConfig.getType(), registryCenterConfig.getProps());
registryCenterRepository.init(governanceConfig.getName(),
registryCenterConfig);
return new GovernanceRepositoryAPIImpl(registryCenterRepository);
@@ -169,9 +169,9 @@ public final class ScalingAPIFactory {
checkServerConfig();
GovernanceConfiguration governanceConfig =
ScalingContext.getInstance().getServerConfig().getGovernanceConfig();
String namespace = governanceConfig.getName() +
ScalingConstant.SCALING_ROOT;
- jobStatisticsAPI =
JobAPIFactory.createJobStatisticsAPI(governanceConfig.getGovernanceCenterConfiguration().getServerLists(),
namespace, null);
- jobConfigurationAPI =
JobAPIFactory.createJobConfigurationAPI(governanceConfig.getGovernanceCenterConfiguration().getServerLists(),
namespace, null);
- jobOperateAPI =
JobAPIFactory.createJobOperateAPI(governanceConfig.getGovernanceCenterConfiguration().getServerLists(),
namespace, null);
+ jobStatisticsAPI =
JobAPIFactory.createJobStatisticsAPI(governanceConfig.getRegistryCenterConfiguration().getServerLists(),
namespace, null);
+ jobConfigurationAPI =
JobAPIFactory.createJobConfigurationAPI(governanceConfig.getRegistryCenterConfiguration().getServerLists(),
namespace, null);
+ jobOperateAPI =
JobAPIFactory.createJobOperateAPI(governanceConfig.getRegistryCenterConfiguration().getServerLists(),
namespace, null);
}
public static ElasticJobAPIHolder getInstance() {
@@ -210,9 +210,9 @@ public final class ScalingAPIFactory {
private static ZookeeperConfiguration getZookeeperConfig() {
checkServerConfig();
GovernanceConfiguration governanceConfig =
ScalingContext.getInstance().getServerConfig().getGovernanceConfig();
- ZookeeperConfiguration result = new
ZookeeperConfiguration(governanceConfig.getGovernanceCenterConfiguration().getServerLists(),
+ ZookeeperConfiguration result = new
ZookeeperConfiguration(governanceConfig.getRegistryCenterConfiguration().getServerLists(),
governanceConfig.getName() + ScalingConstant.SCALING_ROOT);
- Properties props =
governanceConfig.getGovernanceCenterConfiguration().getProps();
+ Properties props =
governanceConfig.getRegistryCenterConfiguration().getProps();
result.setMaxSleepTimeMilliseconds(getProperty(props,
"max.sleep.time.milliseconds", result.getMaxSleepTimeMilliseconds()));
result.setBaseSleepTimeMilliseconds(getProperty(props,
"base.sleep.time.milliseconds", result.getBaseSleepTimeMilliseconds()));
result.setConnectionTimeoutMilliseconds(getProperty(props,
"connection.timeout.milliseconds", result.getConnectionTimeoutMilliseconds()));
diff --git
a/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/api/impl/GovernanceRepositoryAPIImplTest.java
b/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/api/impl/GovernanceRepositoryAPIImplTest.java
index 00da777..836dc54 100644
---
a/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/api/impl/GovernanceRepositoryAPIImplTest.java
+++
b/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/api/impl/GovernanceRepositoryAPIImplTest.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.scaling.core.api.impl;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent;
import org.apache.shardingsphere.scaling.core.api.GovernanceRepositoryAPI;
@@ -98,7 +98,7 @@ public final class GovernanceRepositoryAPIImplTest {
private static ServerConfiguration mockServerConfig() {
ServerConfiguration result = new ServerConfiguration();
- result.setGovernanceConfig(new GovernanceConfiguration("test", new
GovernanceCenterConfiguration("Zookeeper",
EmbedTestingServer.getConnectionString(), null), true));
+ result.setGovernanceConfig(new GovernanceConfiguration("test", new
RegistryCenterConfiguration("Zookeeper",
EmbedTestingServer.getConnectionString(), null), true));
return result;
}
diff --git
a/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/api/impl/ScalingAPIImplTest.java
b/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/api/impl/ScalingAPIImplTest.java
index 5c5f281..df3c65b 100644
---
a/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/api/impl/ScalingAPIImplTest.java
+++
b/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/api/impl/ScalingAPIImplTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.scaling.core.api.impl;
import lombok.SneakyThrows;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration;
import org.apache.shardingsphere.scaling.core.api.JobInfo;
import org.apache.shardingsphere.scaling.core.api.ScalingAPI;
@@ -141,7 +141,7 @@ public final class ScalingAPIImplTest {
private static ServerConfiguration mockServerConfig() {
ServerConfiguration result = new ServerConfiguration();
- result.setGovernanceConfig(new GovernanceConfiguration("test", new
GovernanceCenterConfiguration("Zookeeper",
EmbedTestingServer.getConnectionString(), new Properties()), true));
+ result.setGovernanceConfig(new GovernanceConfiguration("test", new
RegistryCenterConfiguration("Zookeeper",
EmbedTestingServer.getConnectionString(), new Properties()), true));
return result;
}
diff --git
a/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/config/yaml/ServerConfigurationYamlSwapperTest.java
b/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/config/yaml/ServerConfigurationYamlSwapperTest.java
index a918088..9997300 100644
---
a/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/config/yaml/ServerConfigurationYamlSwapperTest.java
+++
b/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/config/yaml/ServerConfigurationYamlSwapperTest.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.scaling.core.config.yaml;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceCenterConfiguration;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceConfiguration;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration;
import org.apache.shardingsphere.scaling.core.config.ServerConfiguration;
import org.junit.Test;
@@ -49,7 +49,7 @@ public final class ServerConfigurationYamlSwapperTest {
private ServerConfiguration mockServerConfig() {
ServerConfiguration result = new ServerConfiguration();
result.setWorkerThread(10);
- result.setGovernanceConfig(new GovernanceConfiguration("test", new
GovernanceCenterConfiguration("Zookeeper", "localhost:2181", null), false));
+ result.setGovernanceConfig(new GovernanceConfiguration("test", new
RegistryCenterConfiguration("Zookeeper", "localhost:2181", null), false));
return result;
}
diff --git
a/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/job/FinishedCheckJobTest.java
b/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/job/FinishedCheckJobTest.java
index 649a93f..de8d3a7 100644
---
a/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/job/FinishedCheckJobTest.java
+++
b/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/job/FinishedCheckJobTest.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.scaling.core.job;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import lombok.SneakyThrows;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration;
import org.apache.shardingsphere.scaling.core.api.GovernanceRepositoryAPI;
import org.apache.shardingsphere.scaling.core.api.ScalingAPI;
@@ -104,7 +104,7 @@ public final class FinishedCheckJobTest {
private static ServerConfiguration mockServerConfig() {
ServerConfiguration result = new ServerConfiguration();
- result.setGovernanceConfig(new GovernanceConfiguration("test", new
GovernanceCenterConfiguration("Zookeeper",
EmbedTestingServer.getConnectionString(), null), true));
+ result.setGovernanceConfig(new GovernanceConfiguration("test", new
RegistryCenterConfiguration("Zookeeper",
EmbedTestingServer.getConnectionString(), null), true));
return result;
}
diff --git
a/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/job/ScalingJobTest.java
b/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/job/ScalingJobTest.java
index 1bafa01..54bd61f 100644
---
a/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/job/ScalingJobTest.java
+++
b/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/job/ScalingJobTest.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.scaling.core.job;
import lombok.SneakyThrows;
import org.apache.shardingsphere.elasticjob.api.ShardingContext;
-import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration;
+import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration;
import org.apache.shardingsphere.infra.yaml.engine.YamlEngine;
import org.apache.shardingsphere.scaling.core.config.ScalingContext;
@@ -66,7 +66,7 @@ public final class ScalingJobTest {
private static ServerConfiguration mockServerConfig() {
ServerConfiguration result = new ServerConfiguration();
- result.setGovernanceConfig(new GovernanceConfiguration("test", new
GovernanceCenterConfiguration("Zookeeper",
EmbedTestingServer.getConnectionString(), null), true));
+ result.setGovernanceConfig(new GovernanceConfiguration("test", new
RegistryCenterConfiguration("Zookeeper",
EmbedTestingServer.getConnectionString(), null), true));
return result;
}