Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Shardingsphere
提交
1c7af3a7
Shardingsphere
项目概览
apache
/
Shardingsphere
通知
56
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Shardingsphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
1c7af3a7
编写于
9月 06, 2020
作者:
J
Juan Pan(Trista)
提交者:
GitHub
9月 06, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #7274 from terrymanu/dev
Move governance.core.common.xxx to governance.core.xxx
上级
b715aee3
54d0c9f4
变更
72
隐藏空白更改
内联
并排
Showing
72 changed file
with
135 addition
and
135 deletion
+135
-135
docs/document/content/features/governance/management/config-center.cn.md
...ontent/features/governance/management/config-center.cn.md
+2
-2
docs/document/content/features/governance/management/config-center.en.md
...ontent/features/governance/management/config-center.en.md
+2
-2
docs/document/content/quick-start/shardingsphere-scaling-quick-start.cn.md
...tent/quick-start/shardingsphere-scaling-quick-start.cn.md
+1
-1
docs/document/content/quick-start/shardingsphere-scaling-quick-start.en.md
...tent/quick-start/shardingsphere-scaling-quick-start.en.md
+1
-1
docs/document/content/user-manual/shardingsphere-scaling/usage.cn.md
...nt/content/user-manual/shardingsphere-scaling/usage.cn.md
+1
-1
docs/document/content/user-manual/shardingsphere-scaling/usage.en.md
...nt/content/user-manual/shardingsphere-scaling/usage.en.md
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/GovernanceEvent.java
...shardingsphere/governance/core/event/GovernanceEvent.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/auth/AuthenticationChangedEvent.java
...overnance/core/event/auth/AuthenticationChangedEvent.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/datasource/DataSourceChangeCompletedEvent.java
...core/event/datasource/DataSourceChangeCompletedEvent.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/datasource/DataSourceChangedEvent.java
...ernance/core/event/datasource/DataSourceChangedEvent.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/props/PropertiesChangedEvent.java
...e/governance/core/event/props/PropertiesChangedEvent.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/rule/RuleConfigurationsChangedEvent.java
...nance/core/event/rule/RuleConfigurationsChangedEvent.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/schema/SchemaAddedEvent.java
...sphere/governance/core/event/schema/SchemaAddedEvent.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/schema/SchemaDeletedEvent.java
...here/governance/core/event/schema/SchemaDeletedEvent.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/listener/GovernanceListener.java
...ngsphere/governance/core/listener/GovernanceListener.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/listener/PostGovernanceRepositoryEventListener.java
.../core/listener/PostGovernanceRepositoryEventListener.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/utils/IpUtils.java
.../apache/shardingsphere/governance/core/utils/IpUtils.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/config/YamlDataSourceConfiguration.java
...ernance/core/yaml/config/YamlDataSourceConfiguration.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/config/YamlGovernanceCenterConfiguration.java
...e/core/yaml/config/YamlGovernanceCenterConfiguration.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/config/YamlGovernanceConfiguration.java
...ernance/core/yaml/config/YamlGovernanceConfiguration.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/DataSourceConfigurationYamlSwapper.java
...core/yaml/swapper/DataSourceConfigurationYamlSwapper.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceCenterConfigurationYamlSwapper.java
...aml/swapper/GovernanceCenterConfigurationYamlSwapper.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceConfigurationYamlSwapper.java
...core/yaml/swapper/GovernanceConfigurationYamlSwapper.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/listener/PostGovernanceRepositoryEventListenerTest.java
...e/listener/PostGovernanceRepositoryEventListenerTest.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/utils/IpUtilsTest.java
...che/shardingsphere/governance/core/utils/IpUtilsTest.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/DataSourceConfigurationYamlSwapperTest.java
.../yaml/swapper/DataSourceConfigurationYamlSwapperTest.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceCenterConfigurationYamlSwapperTest.java
...swapper/GovernanceCenterConfigurationYamlSwapperTest.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceConfigurationYamlSwapperTest.java
.../yaml/swapper/GovernanceConfigurationYamlSwapperTest.java
+3
-3
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/main/java/org/apache/shardingsphere/governance/core/config/ConfigCenter.java
...e/shardingsphere/governance/core/config/ConfigCenter.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/main/java/org/apache/shardingsphere/governance/core/config/listener/AuthenticationChangedListener.java
...e/core/config/listener/AuthenticationChangedListener.java
+3
-3
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/main/java/org/apache/shardingsphere/governance/core/config/listener/PropertiesChangedListener.java
...nance/core/config/listener/PropertiesChangedListener.java
+3
-3
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/main/java/org/apache/shardingsphere/governance/core/config/listener/SchemaChangedListener.java
...overnance/core/config/listener/SchemaChangedListener.java
+8
-8
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/test/java/org/apache/shardingsphere/governance/core/config/listener/AuthenticationChangedListenerTest.java
...re/config/listener/AuthenticationChangedListenerTest.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/test/java/org/apache/shardingsphere/governance/core/config/listener/PropertiesChangedListenerTest.java
...e/core/config/listener/PropertiesChangedListenerTest.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/test/java/org/apache/shardingsphere/governance/core/config/listener/SchemaChangedListenerTest.java
...nance/core/config/listener/SchemaChangedListenerTest.java
+5
-5
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/test/resources/yaml/configCenter/data-source-init-sql.yaml
...est/resources/yaml/configCenter/data-source-init-sql.yaml
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/test/resources/yaml/configCenter/data-source.yaml
...fig/src/test/resources/yaml/configCenter/data-source.yaml
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/test/resources/yaml/data-source.yaml
...ance-core-config/src/test/resources/yaml/data-source.yaml
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/main/java/org/apache/shardingsphere/governance/context/schema/GovernanceSchemaContexts.java
...e/governance/context/schema/GovernanceSchemaContexts.java
+7
-7
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/main/java/org/apache/shardingsphere/governance/context/transaction/GovernanceTransactionContexts.java
...ce/context/transaction/GovernanceTransactionContexts.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/test/java/org/apache/shardingsphere/governance/context/schema/GovernanceSchemaContextsTest.java
...vernance/context/schema/GovernanceSchemaContextsTest.java
+6
-6
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/test/java/org/apache/shardingsphere/governance/context/transaction/GovernanceTransactionContextsTest.java
...ontext/transaction/GovernanceTransactionContextsTest.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-metadata/src/main/java/org/apache/shardingsphere/governance/core/metadata/event/MetaDataChangedEvent.java
.../governance/core/metadata/event/MetaDataChangedEvent.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-metadata/src/main/java/org/apache/shardingsphere/governance/core/metadata/listener/MetaDataChangedListener.java
...nance/core/metadata/listener/MetaDataChangedListener.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-metadata/src/test/java/org/apache/shardingsphere/governance/core/metadata/listener/MetaDataChangedListenerTest.java
...e/core/metadata/listener/MetaDataChangedListenerTest.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-registry/src/main/java/org/apache/shardingsphere/governance/core/registry/event/CircuitStateChangedEvent.java
...ernance/core/registry/event/CircuitStateChangedEvent.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-registry/src/main/java/org/apache/shardingsphere/governance/core/registry/event/DisabledStateChangedEvent.java
...rnance/core/registry/event/DisabledStateChangedEvent.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-registry/src/main/java/org/apache/shardingsphere/governance/core/registry/instance/GovernanceInstance.java
...governance/core/registry/instance/GovernanceInstance.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-registry/src/main/java/org/apache/shardingsphere/governance/core/registry/listener/DataSourceStateChangedListener.java
...ore/registry/listener/DataSourceStateChangedListener.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-registry/src/main/java/org/apache/shardingsphere/governance/core/registry/listener/InstanceStateChangedListener.java
.../core/registry/listener/InstanceStateChangedListener.java
+2
-2
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-registry/src/test/java/org/apache/shardingsphere/governance/core/registry/listener/DataSourceStateChangedListenerTest.java
...registry/listener/DataSourceStateChangedListenerTest.java
+1
-1
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-registry/src/test/java/org/apache/shardingsphere/governance/core/registry/listener/InstanceStateChangedListenerTest.java
...e/registry/listener/InstanceStateChangedListenerTest.java
+1
-1
shardingsphere-jdbc/shardingsphere-jdbc-governance/src/main/java/org/apache/shardingsphere/driver/governance/api/yaml/YamlGovernanceShardingSphereDataSourceFactory.java
...i/yaml/YamlGovernanceShardingSphereDataSourceFactory.java
+1
-1
shardingsphere-jdbc/shardingsphere-jdbc-governance/src/main/java/org/apache/shardingsphere/driver/governance/internal/util/YamlGovernanceRepositoryConfigurationSwapperUtil.java
...til/YamlGovernanceRepositoryConfigurationSwapperUtil.java
+2
-2
shardingsphere-jdbc/shardingsphere-jdbc-governance/src/main/java/org/apache/shardingsphere/driver/governance/internal/yaml/YamlGovernanceRootRuleConfigurations.java
...e/internal/yaml/YamlGovernanceRootRuleConfigurations.java
+1
-1
shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/internal/datasource/GovernanceShardingSphereDataSourceTest.java
...al/datasource/GovernanceShardingSphereDataSourceTest.java
+3
-3
shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/internal/util/YamlInstanceConfigurationSwapperUtilTest.java
...ternal/util/YamlInstanceConfigurationSwapperUtilTest.java
+2
-2
shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/governance/GovernanceSpringBootConfiguration.java
...ng/boot/governance/GovernanceSpringBootConfiguration.java
+1
-1
shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/governance/common/GovernanceSpringBootRootConfiguration.java
...ernance/common/GovernanceSpringBootRootConfiguration.java
+1
-1
shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
...es/META-INF/additional-spring-configuration-metadata.json
+1
-1
shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/resources/yaml/data-source.yaml
...ing-boot-starter/src/test/resources/yaml/data-source.yaml
+1
-1
shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/resources/yaml/masterslave-databases.yaml
...tarter/src/test/resources/yaml/masterslave-databases.yaml
+3
-3
shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/resources/yaml/sharding-databases.yaml
...t-starter/src/test/resources/yaml/sharding-databases.yaml
+3
-3
shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/governance/GovernanceBootstrap.java
.../shardingsphere/proxy/governance/GovernanceBootstrap.java
+1
-1
shardingsphere-proxy/shardingsphere-proxy-common/src/main/java/org/apache/shardingsphere/proxy/config/yaml/YamlProxyServerConfiguration.java
...phere/proxy/config/yaml/YamlProxyServerConfiguration.java
+1
-1
shardingsphere-proxy/shardingsphere-proxy-common/src/test/java/org/apache/shardingsphere/proxy/config/yaml/swapper/YamlProxyConfigurationSwapperTest.java
...onfig/yaml/swapper/YamlProxyConfigurationSwapperTest.java
+2
-2
shardingsphere-scaling/shardingsphere-scaling-bootstrap/src/test/java/org/apache/shardingsphere/scaling/web/HttpServerHandlerTest.java
...che/shardingsphere/scaling/web/HttpServerHandlerTest.java
+1
-1
shardingsphere-scaling/shardingsphere-scaling-bootstrap/src/test/resources/config.json
...ngsphere-scaling-bootstrap/src/test/resources/config.json
+1
-1
shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/config/ServerConfiguration.java
...ardingsphere/scaling/core/config/ServerConfiguration.java
+1
-1
shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/job/position/resume/ZookeeperResumeBreakPointManager.java
...job/position/resume/ZookeeperResumeBreakPointManager.java
+2
-2
shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/utils/ConfigurationYamlConverter.java
...sphere/scaling/core/utils/ConfigurationYamlConverter.java
+2
-2
shardingsphere-scaling/shardingsphere-scaling-core/src/test/resources/config.json
...hardingsphere-scaling-core/src/test/resources/config.json
+1
-1
未找到文件。
docs/document/content/features/governance/management/config-center.cn.md
浏览文件 @
1c7af3a7
...
...
@@ -49,7 +49,7 @@ sql.show: true
多个数据库连接池的集合,不同数据库连接池属性自适配(例如:DBCP,C3P0,Druid, HikariCP)。
```
yaml
ds_0
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
ds_0
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
com.zaxxer.hikari.HikariDataSource
props
:
url
:
jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
...
...
@@ -61,7 +61,7 @@ ds_0: !!org.apache.shardingsphere.governance.core.common.yaml.config.YamlDataSou
minPoolSize
:
1
username
:
root
maxLifetimeMilliseconds
:
1800000
ds_1
:
!!org.apache.shardingsphere.governance.core.
common.yaml.config
YamlDataSourceConfiguration
ds_1
:
!!org.apache.shardingsphere.governance.core.
yaml.config.
YamlDataSourceConfiguration
dataSourceClassName
:
com.zaxxer.hikari.HikariDataSource
props
:
url
:
jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
...
...
docs/document/content/features/governance/management/config-center.en.md
浏览文件 @
1c7af3a7
...
...
@@ -49,7 +49,7 @@ sql.show: true
A collection of multiple database connection pools, whose properties (e.g. DBCP, C3P0, Druid and HikariCP) are configured by users themselves.
```
yaml
ds_0
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
ds_0
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
com.zaxxer.hikari.HikariDataSource
props
:
url
:
jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
...
...
@@ -61,7 +61,7 @@ ds_0: !!org.apache.shardingsphere.governance.core.common.yaml.config.YamlDataSou
minPoolSize
:
1
username
:
root
maxLifetimeMilliseconds
:
1800000
ds_1
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
ds_1
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
com.zaxxer.hikari.HikariDataSource
props
:
url
:
jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
...
...
docs/document/content/quick-start/shardingsphere-scaling-quick-start.cn.md
浏览文件 @
1c7af3a7
...
...
@@ -33,7 +33,7 @@ curl -X POST \
-H
'content-type: application/json'
\
-d
'{
"ruleConfiguration": {
"sourceDatasource": "ds_0: !!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration\n dataSourceClassName: com.zaxxer.hikari.HikariDataSource\n props:\n jdbcUrl: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useSSL=false\n username: root\n password: '
\'
'123456'
\'
keyGenerateStrategy
"sourceDatasource": "ds_0: !!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration\n dataSourceClassName: com.zaxxer.hikari.HikariDataSource\n props:\n jdbcUrl: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useSSL=false\n username: root\n password: '
\'
'123456'
\'
keyGenerateStrategy
```
更多管理接口详情请参见
[
使用手册
](
/cn/user-manual/shardingsphere-scaling/usage/
)
。
docs/document/content/quick-start/shardingsphere-scaling-quick-start.en.md
浏览文件 @
1c7af3a7
...
...
@@ -33,7 +33,7 @@ curl -X POST \
-H
'content-type: application/json'
\
-d
'{
"ruleConfiguration": {
"sourceDatasource": "ds_0: !!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration\n dataSourceClassName: com.zaxxer.hikari.HikariDataSource\n props:\n jdbcUrl: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useSSL=false\n username: root\n password: '
\'
'123456'
\'
keyGenerateStrategy
"sourceDatasource": "ds_0: !!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration\n dataSourceClassName: com.zaxxer.hikari.HikariDataSource\n props:\n jdbcUrl: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useSSL=false\n username: root\n password: '
\'
'123456'
\'
keyGenerateStrategy
```
Please refer to
[
Configuration Manual
](
/en/user-manual/shardingsphere-scaling/usage/
)
for more details.
docs/document/content/user-manual/shardingsphere-scaling/usage.cn.md
浏览文件 @
1c7af3a7
...
...
@@ -72,7 +72,7 @@ curl -X POST \
-H 'content-type: application/json' \
-d '{
"ruleConfiguration": {
"sourceDatasource": "ds_0: !!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration\n dataSourceClassName: com.zaxxer.hikari.HikariDataSource\n props:\n jdbcUrl: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useSSL=false\n username: root\n password: '\''123456'\''\n connectionTimeout: 30000\n idleTimeout: 60000\n maxLifetime: 1800000\n maxPoolSize: 50\n minPoolSize: 1\n maintenanceIntervalMilliseconds: 30000\n readOnly: false\n",
"sourceDatasource": "ds_0: !!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration\n dataSourceClassName: com.zaxxer.hikari.HikariDataSource\n props:\n jdbcUrl: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useSSL=false\n username: root\n password: '\''123456'\''\n connectionTimeout: 30000\n idleTimeout: 60000\n maxLifetime: 1800000\n maxPoolSize: 50\n minPoolSize: 1\n maintenanceIntervalMilliseconds: 30000\n readOnly: false\n",
"sourceRule": "defaultDatabaseStrategy:\n inline:\n algorithmExpression: ds_${user_id % 2}\n shardingColumn: user_id\ntables:\n t1:\n actualDataNodes: ds_0.t1\n keyGenerateStrategy:\n column: order_id\n type: SNOWFLAKE\n logicTable: t1\n tableStrategy:\n inline:\n algorithmExpression: t1\n shardingColumn: order_id\n t2:\n actualDataNodes: ds_0.t2\n keyGenerateStrategy:\n column: order_item_id\n type: SNOWFLAKE\n logicTable: t2\n tableStrategy:\n inline:\n algorithmExpression: t2\n shardingColumn: order_id\n",
"destinationDataSources": {
"name": "dt_0",
...
...
docs/document/content/user-manual/shardingsphere-scaling/usage.en.md
浏览文件 @
1c7af3a7
...
...
@@ -72,7 +72,7 @@ curl -X POST \
-H 'content-type: application/json' \
-d '{
"ruleConfiguration": {
"sourceDatasource": "ds_0: !!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration\n dataSourceClassName: com.zaxxer.hikari.HikariDataSource\n props:\n jdbcUrl: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useSSL=false\n username: root\n password: '\''123456'\''\n connectionTimeout: 30000\n idleTimeout: 60000\n maxLifetime: 1800000\n maxPoolSize: 50\n minPoolSize: 1\n maintenanceIntervalMilliseconds: 30000\n readOnly: false\n",
"sourceDatasource": "ds_0: !!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration\n dataSourceClassName: com.zaxxer.hikari.HikariDataSource\n props:\n jdbcUrl: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useSSL=false\n username: root\n password: '\''123456'\''\n connectionTimeout: 30000\n idleTimeout: 60000\n maxLifetime: 1800000\n maxPoolSize: 50\n minPoolSize: 1\n maintenanceIntervalMilliseconds: 30000\n readOnly: false\n",
"sourceRule": "defaultDatabaseStrategy:\n inline:\n algorithmExpression: ds_${user_id % 2}\n shardingColumn: user_id\ntables:\n t1:\n actualDataNodes: ds_0.t1\n keyGenerateStrategy:\n column: order_id\n type: SNOWFLAKE\n logicTable: t1\n tableStrategy:\n inline:\n algorithmExpression: t1\n shardingColumn: order_id\n t2:\n actualDataNodes: ds_0.t2\n keyGenerateStrategy:\n column: order_item_id\n type: SNOWFLAKE\n logicTable: t2\n tableStrategy:\n inline:\n algorithmExpression: t2\n shardingColumn: order_id\n",
"destinationDataSources": {
"name": "dt_0",
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
event/GovernanceEvent.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/GovernanceEvent.java
浏览文件 @
1c7af3a7
...
...
@@ -15,7 +15,7 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
event
;
package
org.apache.shardingsphere.governance.core.event
;
/**
* Governance event.
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
event/auth/AuthenticationChangedEvent.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/auth/AuthenticationChangedEvent.java
浏览文件 @
1c7af3a7
...
...
@@ -15,12 +15,12 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
event.auth
;
package
org.apache.shardingsphere.governance.core.event.auth
;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.infra.auth.Authentication
;
import
org.apache.shardingsphere.governance.core.common.event.GovernanceEvent
;
/**
* Authentication changed event.
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
event/datasource/DataSourceChangeCompletedEvent.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/datasource/DataSourceChangeCompletedEvent.java
浏览文件 @
1c7af3a7
...
...
@@ -15,11 +15,11 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
event.datasource
;
package
org.apache.shardingsphere.governance.core.event.datasource
;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.infra.database.type.DatabaseType
;
import
javax.sql.DataSource
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
event/datasource/DataSourceChangedEvent.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/datasource/DataSourceChangedEvent.java
浏览文件 @
1c7af3a7
...
...
@@ -15,12 +15,12 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
event.datasource
;
package
org.apache.shardingsphere.governance.core.event.datasource
;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.infra.config.datasource.DataSourceConfiguration
;
import
org.apache.shardingsphere.governance.core.common.event.GovernanceEvent
;
import
java.util.Map
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
event/props/PropertiesChangedEvent.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/props/PropertiesChangedEvent.java
浏览文件 @
1c7af3a7
...
...
@@ -15,11 +15,11 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
event.props
;
package
org.apache.shardingsphere.governance.core.event.props
;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
java.util.Properties
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
event/rule/RuleConfigurationsChangedEvent.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/rule/RuleConfigurationsChangedEvent.java
浏览文件 @
1c7af3a7
...
...
@@ -15,12 +15,12 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
event.rule
;
package
org.apache.shardingsphere.governance.core.event.rule
;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.infra.config.RuleConfiguration
;
import
org.apache.shardingsphere.governance.core.common.event.GovernanceEvent
;
import
java.util.Collection
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
event/schema/SchemaAddedEvent.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/schema/SchemaAddedEvent.java
浏览文件 @
1c7af3a7
...
...
@@ -15,14 +15,14 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
event.schema
;
package
org.apache.shardingsphere.governance.core.event.schema
;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.infra.config.datasource.DataSourceConfiguration
;
import
org.apache.shardingsphere.infra.config.RuleConfiguration
;
import
org.apache.shardingsphere.governance.core.common.event.GovernanceEvent
;
import
java.util.Collection
;
import
java.util.Map
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
event/schema/SchemaDeletedEvent.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/event/schema/SchemaDeletedEvent.java
浏览文件 @
1c7af3a7
...
...
@@ -15,11 +15,11 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
event.schema
;
package
org.apache.shardingsphere.governance.core.event.schema
;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
/**
* Schema deleted event.
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
listener/GovernanceListener.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/listener/GovernanceListener.java
浏览文件 @
1c7af3a7
...
...
@@ -15,7 +15,7 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
listener
;
package
org.apache.shardingsphere.governance.core.listener
;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent.ChangedType
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
listener/PostGovernanceRepositoryEventListener.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/listener/PostGovernanceRepositoryEventListener.java
浏览文件 @
1c7af3a7
...
...
@@ -15,13 +15,13 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
listener
;
package
org.apache.shardingsphere.governance.core.listener
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.repository.api.GovernanceRepository
;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent
;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent.ChangedType
;
import
org.apache.shardingsphere.governance.core.common.event.GovernanceEvent
;
import
org.apache.shardingsphere.infra.eventbus.ShardingSphereEventBus
;
import
java.util.Arrays
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
utils/IpUtils.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/utils/IpUtils.java
浏览文件 @
1c7af3a7
...
...
@@ -15,7 +15,7 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
utils
;
package
org.apache.shardingsphere.governance.core.utils
;
import
java.net.InetAddress
;
import
java.net.NetworkInterface
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
yaml/config/YamlDataSourceConfiguration.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/config/YamlDataSourceConfiguration.java
浏览文件 @
1c7af3a7
...
...
@@ -15,7 +15,7 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
yaml.config
;
package
org.apache.shardingsphere.governance.core.yaml.config
;
import
lombok.Getter
;
import
lombok.Setter
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
yaml/config/YamlGovernanceCenterConfiguration.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/config/YamlGovernanceCenterConfiguration.java
浏览文件 @
1c7af3a7
...
...
@@ -15,7 +15,7 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
yaml.config
;
package
org.apache.shardingsphere.governance.core.yaml.config
;
import
lombok.Getter
;
import
lombok.Setter
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
yaml/config/YamlGovernanceConfiguration.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/config/YamlGovernanceConfiguration.java
浏览文件 @
1c7af3a7
...
...
@@ -15,7 +15,7 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
yaml.config
;
package
org.apache.shardingsphere.governance.core.yaml.config
;
import
lombok.Getter
;
import
lombok.Setter
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
yaml/swapper/DataSourceConfigurationYamlSwapper.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/DataSourceConfigurationYamlSwapper.java
浏览文件 @
1c7af3a7
...
...
@@ -15,11 +15,11 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
yaml.swapper
;
package
org.apache.shardingsphere.governance.core.yaml.swapper
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
;
import
org.apache.shardingsphere.infra.config.datasource.DataSourceConfiguration
;
import
org.apache.shardingsphere.infra.yaml.swapper.YamlSwapper
;
import
org.apache.shardingsphere.governance.core.common.yaml.config.YamlDataSourceConfiguration
;
/**
* Data source configuration YAML swapper.
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
yaml/swapper/GovernanceCenterConfigurationYamlSwapper.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceCenterConfigurationYamlSwapper.java
浏览文件 @
1c7af3a7
...
...
@@ -15,9 +15,9 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
yaml.swapper
;
package
org.apache.shardingsphere.governance.core.yaml.swapper
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceCenterConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceCenterConfiguration
;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration
;
import
org.apache.shardingsphere.infra.yaml.swapper.YamlSwapper
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/
common/
yaml/swapper/GovernanceConfigurationYamlSwapper.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceConfigurationYamlSwapper.java
浏览文件 @
1c7af3a7
...
...
@@ -15,10 +15,10 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
yaml.swapper
;
package
org.apache.shardingsphere.governance.core.yaml.swapper
;
import
org.apache.shardingsphere.infra.yaml.swapper.YamlSwapper
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceConfiguration
;
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.GovernanceConfiguration
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/
common/
listener/PostGovernanceRepositoryEventListenerTest.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/listener/PostGovernanceRepositoryEventListenerTest.java
浏览文件 @
1c7af3a7
...
...
@@ -15,9 +15,9 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
listener
;
package
org.apache.shardingsphere.governance.core.listener
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.repository.api.GovernanceRepository
;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent
;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent.ChangedType
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/
common/
utils/IpUtilsTest.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/utils/IpUtilsTest.java
浏览文件 @
1c7af3a7
...
...
@@ -15,7 +15,7 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
utils
;
package
org.apache.shardingsphere.governance.core.utils
;
import
org.junit.Test
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/
common/
yaml/swapper/DataSourceConfigurationYamlSwapperTest.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/DataSourceConfigurationYamlSwapperTest.java
浏览文件 @
1c7af3a7
...
...
@@ -15,10 +15,10 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
yaml.swapper
;
package
org.apache.shardingsphere.governance.core.yaml.swapper
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
;
import
org.apache.shardingsphere.infra.config.datasource.DataSourceConfiguration
;
import
org.apache.shardingsphere.governance.core.common.yaml.config.YamlDataSourceConfiguration
;
import
org.junit.Test
;
import
static
org
.
hamcrest
.
CoreMatchers
.
is
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/
common/
yaml/swapper/GovernanceCenterConfigurationYamlSwapperTest.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceCenterConfigurationYamlSwapperTest.java
浏览文件 @
1c7af3a7
...
...
@@ -15,9 +15,9 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
yaml.swapper
;
package
org.apache.shardingsphere.governance.core.yaml.swapper
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceCenterConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceCenterConfiguration
;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration
;
import
org.junit.Test
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/
common/
yaml/swapper/GovernanceConfigurationYamlSwapperTest.java
→
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceConfigurationYamlSwapperTest.java
浏览文件 @
1c7af3a7
...
...
@@ -15,10 +15,10 @@
* limitations under the License.
*/
package
org.apache.shardingsphere.governance.core.
common.
yaml.swapper
;
package
org.apache.shardingsphere.governance.core.yaml.swapper
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceCenterConfiguration
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceConfiguration
;
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.GovernanceConfiguration
;
import
org.junit.Test
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/main/java/org/apache/shardingsphere/governance/core/config/ConfigCenter.java
浏览文件 @
1c7af3a7
...
...
@@ -24,8 +24,8 @@ import com.google.common.base.Strings;
import
com.google.common.eventbus.Subscribe
;
import
org.apache.shardingsphere.encrypt.algorithm.config.AlgorithmProvidedEncryptRuleConfiguration
;
import
org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.swapper.DataSourceConfigurationYamlSwapper
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.swapper.DataSourceConfigurationYamlSwapper
;
import
org.apache.shardingsphere.governance.repository.api.ConfigurationRepository
;
import
org.apache.shardingsphere.infra.auth.Authentication
;
import
org.apache.shardingsphere.infra.auth.yaml.config.YamlAuthenticationConfiguration
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/main/java/org/apache/shardingsphere/governance/core/config/listener/AuthenticationChangedListener.java
浏览文件 @
1c7af3a7
...
...
@@ -20,9 +20,9 @@ package org.apache.shardingsphere.governance.core.config.listener;
import
org.apache.shardingsphere.infra.auth.yaml.config.YamlAuthenticationConfiguration
;
import
org.apache.shardingsphere.infra.auth.yaml.swapper.AuthenticationYamlSwapper
;
import
org.apache.shardingsphere.infra.yaml.engine.YamlEngine
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.auth.AuthenticationChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
listener.PostGovernanceRepositoryEventListener
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.auth.AuthenticationChangedEvent
;
import
org.apache.shardingsphere.governance.core.listener.PostGovernanceRepositoryEventListener
;
import
org.apache.shardingsphere.governance.core.config.ConfigCenterNode
;
import
org.apache.shardingsphere.governance.repository.api.ConfigurationRepository
;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/main/java/org/apache/shardingsphere/governance/core/config/listener/PropertiesChangedListener.java
浏览文件 @
1c7af3a7
...
...
@@ -18,9 +18,9 @@
package
org.apache.shardingsphere.governance.core.config.listener
;
import
org.apache.shardingsphere.infra.yaml.engine.YamlEngine
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.props.PropertiesChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
listener.PostGovernanceRepositoryEventListener
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.props.PropertiesChangedEvent
;
import
org.apache.shardingsphere.governance.core.listener.PostGovernanceRepositoryEventListener
;
import
org.apache.shardingsphere.governance.core.config.ConfigCenterNode
;
import
org.apache.shardingsphere.governance.repository.api.ConfigurationRepository
;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/main/java/org/apache/shardingsphere/governance/core/config/listener/SchemaChangedListener.java
浏览文件 @
1c7af3a7
...
...
@@ -20,14 +20,14 @@ package org.apache.shardingsphere.governance.core.config.listener;
import
com.google.common.base.Preconditions
;
import
com.google.common.base.Strings
;
import
org.apache.commons.collections4.SetUtils
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.datasource.DataSourceChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.rule.RuleConfigurationsChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.schema.SchemaAddedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.schema.SchemaDeletedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
listener.PostGovernanceRepositoryEventListener
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.swapper.DataSourceConfigurationYamlSwapper
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.datasource.DataSourceChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.rule.RuleConfigurationsChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.schema.SchemaAddedEvent
;
import
org.apache.shardingsphere.governance.core.event.schema.SchemaDeletedEvent
;
import
org.apache.shardingsphere.governance.core.listener.PostGovernanceRepositoryEventListener
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.swapper.DataSourceConfigurationYamlSwapper
;
import
org.apache.shardingsphere.governance.core.config.ConfigCenter
;
import
org.apache.shardingsphere.governance.core.config.ConfigCenterNode
;
import
org.apache.shardingsphere.governance.repository.api.ConfigurationRepository
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/test/java/org/apache/shardingsphere/governance/core/config/listener/AuthenticationChangedListenerTest.java
浏览文件 @
1c7af3a7
...
...
@@ -17,8 +17,8 @@
package
org.apache.shardingsphere.governance.core.config.listener
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.auth.AuthenticationChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.auth.AuthenticationChangedEvent
;
import
org.apache.shardingsphere.governance.repository.api.ConfigurationRepository
;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent
;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent.ChangedType
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/test/java/org/apache/shardingsphere/governance/core/config/listener/PropertiesChangedListenerTest.java
浏览文件 @
1c7af3a7
...
...
@@ -17,8 +17,8 @@
package
org.apache.shardingsphere.governance.core.config.listener
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.props.PropertiesChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.props.PropertiesChangedEvent
;
import
org.apache.shardingsphere.governance.repository.api.ConfigurationRepository
;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent
;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent.ChangedType
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/test/java/org/apache/shardingsphere/governance/core/config/listener/SchemaChangedListenerTest.java
浏览文件 @
1c7af3a7
...
...
@@ -22,11 +22,11 @@ import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import
org.apache.shardingsphere.infra.config.RuleConfiguration
;
import
org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmConfiguration
;
import
org.apache.shardingsphere.masterslave.api.config.MasterSlaveRuleConfiguration
;
import
org.apache.shardingsphere.governance.core.
common.
event.datasource.DataSourceChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.rule.RuleConfigurationsChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.schema.SchemaAddedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.schema.SchemaDeletedEvent
;
import
org.apache.shardingsphere.governance.core.event.datasource.DataSourceChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.rule.RuleConfigurationsChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.schema.SchemaAddedEvent
;
import
org.apache.shardingsphere.governance.core.event.schema.SchemaDeletedEvent
;
import
org.apache.shardingsphere.governance.repository.api.ConfigurationRepository
;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent
;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent.ChangedType
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/test/resources/yaml/configCenter/data-source-init-sql.yaml
浏览文件 @
1c7af3a7
...
...
@@ -15,7 +15,7 @@
# limitations under the License.
#
ds_0
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
ds_0
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
org.apache.commons.dbcp2.BasicDataSource
props
:
driverClassName
:
com.mysql.jdbc.Driver
...
...
@@ -25,7 +25,7 @@ ds_0: !!org.apache.shardingsphere.governance.core.common.yaml.config.YamlDataSou
connectionInitSqls
:
-
set names utf8mb4;
-
set names utf8;
ds_1
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
ds_1
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
org.apache.commons.dbcp2.BasicDataSource
props
:
driverClassName
:
com.mysql.jdbc.Driver
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/test/resources/yaml/configCenter/data-source.yaml
浏览文件 @
1c7af3a7
...
...
@@ -15,14 +15,14 @@
# limitations under the License.
#
ds_0
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
ds_0
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
org.apache.commons.dbcp2.BasicDataSource
props
:
driverClassName
:
com.mysql.jdbc.Driver
url
:
jdbc:mysql://localhost:3306/ds_0
username
:
root
password
:
root
ds_1
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
ds_1
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
org.apache.commons.dbcp2.BasicDataSource
props
:
driverClassName
:
com.mysql.jdbc.Driver
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/test/resources/yaml/data-source.yaml
浏览文件 @
1c7af3a7
...
...
@@ -15,7 +15,7 @@
# limitations under the License.
#
master_ds
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
master_ds
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
com.zaxxer.hikari.HikariDataSource
props
:
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/main/java/org/apache/shardingsphere/governance/context/schema/GovernanceSchemaContexts.java
浏览文件 @
1c7af3a7
...
...
@@ -19,13 +19,13 @@ package org.apache.shardingsphere.governance.context.schema;
import
com.google.common.collect.Maps
;
import
com.google.common.eventbus.Subscribe
;
import
org.apache.shardingsphere.governance.core.
common.
event.auth.AuthenticationChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.datasource.DataSourceChangeCompletedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.datasource.DataSourceChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.props.PropertiesChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.rule.RuleConfigurationsChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.schema.SchemaAddedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.schema.SchemaDeletedEvent
;
import
org.apache.shardingsphere.governance.core.event.auth.AuthenticationChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.datasource.DataSourceChangeCompletedEvent
;
import
org.apache.shardingsphere.governance.core.event.datasource.DataSourceChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.props.PropertiesChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.rule.RuleConfigurationsChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.schema.SchemaAddedEvent
;
import
org.apache.shardingsphere.governance.core.event.schema.SchemaDeletedEvent
;
import
org.apache.shardingsphere.governance.core.facade.GovernanceFacade
;
import
org.apache.shardingsphere.governance.core.metadata.event.MetaDataChangedEvent
;
import
org.apache.shardingsphere.governance.core.registry.event.CircuitStateChangedEvent
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/main/java/org/apache/shardingsphere/governance/context/transaction/GovernanceTransactionContexts.java
浏览文件 @
1c7af3a7
...
...
@@ -18,7 +18,7 @@
package
org.apache.shardingsphere.governance.context.transaction
;
import
com.google.common.eventbus.Subscribe
;
import
org.apache.shardingsphere.governance.core.
common.
event.datasource.DataSourceChangeCompletedEvent
;
import
org.apache.shardingsphere.governance.core.event.datasource.DataSourceChangeCompletedEvent
;
import
org.apache.shardingsphere.infra.eventbus.ShardingSphereEventBus
;
import
org.apache.shardingsphere.transaction.ShardingTransactionManagerEngine
;
import
org.apache.shardingsphere.transaction.context.TransactionContexts
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/test/java/org/apache/shardingsphere/governance/context/schema/GovernanceSchemaContextsTest.java
浏览文件 @
1c7af3a7
...
...
@@ -18,12 +18,12 @@
package
org.apache.shardingsphere.governance.context.schema
;
import
lombok.SneakyThrows
;
import
org.apache.shardingsphere.governance.core.
common.
event.auth.AuthenticationChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.datasource.DataSourceChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.props.PropertiesChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.rule.RuleConfigurationsChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.schema.SchemaAddedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.schema.SchemaDeletedEvent
;
import
org.apache.shardingsphere.governance.core.event.auth.AuthenticationChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.datasource.DataSourceChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.props.PropertiesChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.rule.RuleConfigurationsChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.schema.SchemaAddedEvent
;
import
org.apache.shardingsphere.governance.core.event.schema.SchemaDeletedEvent
;
import
org.apache.shardingsphere.governance.core.facade.GovernanceFacade
;
import
org.apache.shardingsphere.governance.core.metadata.MetaDataCenter
;
import
org.apache.shardingsphere.governance.core.metadata.event.MetaDataChangedEvent
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/test/java/org/apache/shardingsphere/governance/context/transaction/GovernanceTransactionContextsTest.java
浏览文件 @
1c7af3a7
...
...
@@ -18,7 +18,7 @@
package
org.apache.shardingsphere.governance.context.transaction
;
import
lombok.SneakyThrows
;
import
org.apache.shardingsphere.governance.core.
common.
event.datasource.DataSourceChangeCompletedEvent
;
import
org.apache.shardingsphere.governance.core.event.datasource.DataSourceChangeCompletedEvent
;
import
org.apache.shardingsphere.transaction.ShardingTransactionManagerEngine
;
import
org.apache.shardingsphere.transaction.context.TransactionContexts
;
import
org.junit.Test
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-metadata/src/main/java/org/apache/shardingsphere/governance/core/metadata/event/MetaDataChangedEvent.java
浏览文件 @
1c7af3a7
...
...
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.governance.core.metadata.event;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.infra.metadata.schema.RuleSchemaMetaData
;
import
java.util.Collection
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-metadata/src/main/java/org/apache/shardingsphere/governance/core/metadata/listener/MetaDataChangedListener.java
浏览文件 @
1c7af3a7
...
...
@@ -20,8 +20,8 @@ package org.apache.shardingsphere.governance.core.metadata.listener;
import
org.apache.shardingsphere.governance.core.metadata.event.MetaDataChangedEvent
;
import
org.apache.shardingsphere.governance.repository.api.GovernanceRepository
;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.
common.
listener.PostGovernanceRepositoryEventListener
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.listener.PostGovernanceRepositoryEventListener
;
import
org.apache.shardingsphere.governance.core.metadata.yaml.RuleSchemaMetaDataYamlSwapper
;
import
org.apache.shardingsphere.governance.core.metadata.MetaDataCenterNode
;
import
org.apache.shardingsphere.governance.core.metadata.yaml.YamlRuleSchemaMetaData
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-metadata/src/test/java/org/apache/shardingsphere/governance/core/metadata/listener/MetaDataChangedListenerTest.java
浏览文件 @
1c7af3a7
...
...
@@ -17,7 +17,7 @@
package
org.apache.shardingsphere.governance.core.metadata.listener
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.metadata.MetaDataJson
;
import
org.apache.shardingsphere.governance.core.metadata.event.MetaDataChangedEvent
;
import
org.apache.shardingsphere.governance.repository.api.GovernanceRepository
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-registry/src/main/java/org/apache/shardingsphere/governance/core/registry/event/CircuitStateChangedEvent.java
浏览文件 @
1c7af3a7
...
...
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.governance.core.registry.event;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
/**
* Circuit state event.
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-registry/src/main/java/org/apache/shardingsphere/governance/core/registry/event/DisabledStateChangedEvent.java
浏览文件 @
1c7af3a7
...
...
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.governance.core.registry.event;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.registry.schema.GovernanceSchema
;
/**
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-registry/src/main/java/org/apache/shardingsphere/governance/core/registry/instance/GovernanceInstance.java
浏览文件 @
1c7af3a7
...
...
@@ -18,7 +18,7 @@
package
org.apache.shardingsphere.governance.core.registry.instance
;
import
com.google.common.base.Joiner
;
import
org.apache.shardingsphere.governance.core.
common.
utils.IpUtils
;
import
org.apache.shardingsphere.governance.core.utils.IpUtils
;
import
java.lang.management.ManagementFactory
;
import
java.util.UUID
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-registry/src/main/java/org/apache/shardingsphere/governance/core/registry/listener/DataSourceStateChangedListener.java
浏览文件 @
1c7af3a7
...
...
@@ -17,8 +17,8 @@
package
org.apache.shardingsphere.governance.core.registry.listener
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.
common.
listener.PostGovernanceRepositoryEventListener
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.listener.PostGovernanceRepositoryEventListener
;
import
org.apache.shardingsphere.governance.core.registry.RegistryCenterNode
;
import
org.apache.shardingsphere.governance.core.registry.RegistryCenterNodeStatus
;
import
org.apache.shardingsphere.governance.core.registry.event.DisabledStateChangedEvent
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-registry/src/main/java/org/apache/shardingsphere/governance/core/registry/listener/InstanceStateChangedListener.java
浏览文件 @
1c7af3a7
...
...
@@ -17,8 +17,8 @@
package
org.apache.shardingsphere.governance.core.registry.listener
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.
common.
listener.PostGovernanceRepositoryEventListener
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.listener.PostGovernanceRepositoryEventListener
;
import
org.apache.shardingsphere.governance.core.registry.RegistryCenterNode
;
import
org.apache.shardingsphere.governance.core.registry.RegistryCenterNodeStatus
;
import
org.apache.shardingsphere.governance.core.registry.event.CircuitStateChangedEvent
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-registry/src/test/java/org/apache/shardingsphere/governance/core/registry/listener/DataSourceStateChangedListenerTest.java
浏览文件 @
1c7af3a7
...
...
@@ -17,7 +17,7 @@
package
org.apache.shardingsphere.governance.core.registry.listener
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.registry.event.DisabledStateChangedEvent
;
import
org.apache.shardingsphere.governance.core.registry.schema.GovernanceSchema
;
import
org.apache.shardingsphere.governance.repository.api.RegistryRepository
;
...
...
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-registry/src/test/java/org/apache/shardingsphere/governance/core/registry/listener/InstanceStateChangedListenerTest.java
浏览文件 @
1c7af3a7
...
...
@@ -17,7 +17,7 @@
package
org.apache.shardingsphere.governance.core.registry.listener
;
import
org.apache.shardingsphere.governance.core.
common.
event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.event.GovernanceEvent
;
import
org.apache.shardingsphere.governance.core.registry.RegistryCenterNodeStatus
;
import
org.apache.shardingsphere.governance.core.registry.event.CircuitStateChangedEvent
;
import
org.apache.shardingsphere.governance.repository.api.RegistryRepository
;
...
...
shardingsphere-jdbc/shardingsphere-jdbc-governance/src/main/java/org/apache/shardingsphere/driver/governance/api/yaml/YamlGovernanceShardingSphereDataSourceFactory.java
浏览文件 @
1c7af3a7
...
...
@@ -22,7 +22,7 @@ import lombok.NoArgsConstructor;
import
org.apache.shardingsphere.driver.governance.internal.datasource.GovernanceShardingSphereDataSource
;
import
org.apache.shardingsphere.driver.governance.internal.util.YamlGovernanceRepositoryConfigurationSwapperUtil
;
import
org.apache.shardingsphere.driver.governance.internal.yaml.YamlGovernanceRootRuleConfigurations
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceConfiguration
;
import
org.apache.shardingsphere.infra.config.RuleConfiguration
;
import
org.apache.shardingsphere.infra.yaml.engine.YamlEngine
;
import
org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapperEngine
;
...
...
shardingsphere-jdbc/shardingsphere-jdbc-governance/src/main/java/org/apache/shardingsphere/driver/governance/internal/util/YamlGovernanceRepositoryConfigurationSwapperUtil.java
浏览文件 @
1c7af3a7
...
...
@@ -20,8 +20,8 @@ package org.apache.shardingsphere.driver.governance.internal.util;
import
lombok.AccessLevel
;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceConfiguration
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.swapper.GovernanceCenterConfigurationYamlSwapper
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.swapper.GovernanceCenterConfigurationYamlSwapper
;
/**
* YAML governance configuration swapper utility.
...
...
shardingsphere-jdbc/shardingsphere-jdbc-governance/src/main/java/org/apache/shardingsphere/driver/governance/internal/yaml/YamlGovernanceRootRuleConfigurations.java
浏览文件 @
1c7af3a7
...
...
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.driver.governance.internal.yaml;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.apache.shardingsphere.infra.yaml.config.YamlRootRuleConfigurations
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceConfiguration
;
/**
* YAML root rule configurations for governance.
...
...
shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/internal/datasource/GovernanceShardingSphereDataSourceTest.java
浏览文件 @
1c7af3a7
...
...
@@ -21,9 +21,9 @@ import com.google.common.collect.ImmutableMap;
import
org.apache.commons.dbcp2.BasicDataSource
;
import
org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory
;
import
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource
;
import
org.apache.shardingsphere.governance.core.
common.
event.datasource.DataSourceChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.props.PropertiesChangedEvent
;
import
org.apache.shardingsphere.governance.core.
common.
event.rule.RuleConfigurationsChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.datasource.DataSourceChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.props.PropertiesChangedEvent
;
import
org.apache.shardingsphere.governance.core.event.rule.RuleConfigurationsChangedEvent
;
import
org.apache.shardingsphere.governance.core.registry.event.DisabledStateChangedEvent
;
import
org.apache.shardingsphere.governance.core.registry.schema.GovernanceSchema
;
import
org.apache.shardingsphere.governance.context.schema.GovernanceSchemaContexts
;
...
...
shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/internal/util/YamlInstanceConfigurationSwapperUtilTest.java
浏览文件 @
1c7af3a7
...
...
@@ -18,8 +18,8 @@
package
org.apache.shardingsphere.driver.governance.internal.util
;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceCenterConfiguration
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceCenterConfiguration
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceCenterConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceConfiguration
;
import
org.junit.Test
;
import
java.util.Properties
;
...
...
shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/governance/GovernanceSpringBootConfiguration.java
浏览文件 @
1c7af3a7
...
...
@@ -21,7 +21,7 @@ import com.google.common.base.Preconditions;
import
lombok.RequiredArgsConstructor
;
import
org.apache.shardingsphere.driver.governance.internal.datasource.GovernanceShardingSphereDataSource
;
import
org.apache.shardingsphere.infra.config.RuleConfiguration
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.swapper.GovernanceCenterConfigurationYamlSwapper
;
import
org.apache.shardingsphere.governance.core.yaml.swapper.GovernanceCenterConfigurationYamlSwapper
;
import
org.apache.shardingsphere.governance.repository.api.config.GovernanceConfiguration
;
import
org.apache.shardingsphere.spring.boot.datasource.DataSourceMapSetter
;
import
org.apache.shardingsphere.spring.boot.governance.common.GovernanceSpringBootRootConfiguration
;
...
...
shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/governance/common/GovernanceSpringBootRootConfiguration.java
浏览文件 @
1c7af3a7
...
...
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.spring.boot.governance.common;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceConfiguration
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
java.util.Properties
;
...
...
shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
浏览文件 @
1c7af3a7
...
...
@@ -77,7 +77,7 @@
},
{
"name"
:
"spring.shardingsphere.governance"
,
"type"
:
"java.util.Map<java.lang.String,org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceCenterConfiguration>"
,
"type"
:
"java.util.Map<java.lang.String,org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceCenterConfiguration>"
,
"sourceType"
:
"org.apache.shardingsphere.spring.boot.governance.common.GovernanceSpringBootRootConfiguration"
,
"description"
:
"Customize ShardingSphere governance instance."
},
...
...
shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/resources/yaml/data-source.yaml
浏览文件 @
1c7af3a7
...
...
@@ -15,7 +15,7 @@
# limitations under the License.
#
dataSource
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
dataSource
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
org.apache.commons.dbcp2.BasicDataSource
props
:
url
:
jdbc:h2:mem:ds;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
...
...
shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/resources/yaml/masterslave-databases.yaml
浏览文件 @
1c7af3a7
...
...
@@ -15,21 +15,21 @@
# limitations under the License.
#
ds_master
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
ds_master
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
org.apache.commons.dbcp2.BasicDataSource
props
:
url
:
jdbc:h2:mem:ds_master;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
maxTotal
:
16
password
:
username
:
sa
ds_slave_0
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
ds_slave_0
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
org.apache.commons.dbcp2.BasicDataSource
props
:
url
:
jdbc:h2:mem:demo_ds_slave_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
maxTotal
:
16
password
:
username
:
sa
ds_slave_1
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
ds_slave_1
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
org.apache.commons.dbcp2.BasicDataSource
props
:
url
:
jdbc:h2:mem:demo_ds_slave_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
...
...
shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/resources/yaml/sharding-databases.yaml
浏览文件 @
1c7af3a7
...
...
@@ -15,21 +15,21 @@
# limitations under the License.
#
ds
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
ds
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
org.apache.commons.dbcp2.BasicDataSource
props
:
url
:
jdbc:h2:mem:ds;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
maxTotal
:
16
password
:
'
'
username
:
sa
ds_0
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
ds_0
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
org.apache.commons.dbcp2.BasicDataSource
props
:
url
:
jdbc:h2:mem:ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
maxTotal
:
16
password
:
'
'
username
:
sa
ds_1
:
!!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
ds_1
:
!!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
dataSourceClassName
:
org.apache.commons.dbcp2.BasicDataSource
props
:
url
:
jdbc:h2:mem:ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
...
...
shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/governance/GovernanceBootstrap.java
浏览文件 @
1c7af3a7
...
...
@@ -24,7 +24,7 @@ import org.apache.shardingsphere.infra.config.datasource.DataSourceConfiguration
import
org.apache.shardingsphere.infra.config.RuleConfiguration
;
import
org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapperEngine
;
import
org.apache.shardingsphere.infra.context.schema.DataSourceParameter
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.swapper.GovernanceConfigurationYamlSwapper
;
import
org.apache.shardingsphere.governance.core.yaml.swapper.GovernanceConfigurationYamlSwapper
;
import
org.apache.shardingsphere.governance.core.facade.GovernanceFacade
;
import
org.apache.shardingsphere.proxy.config.ProxyConfiguration
;
import
org.apache.shardingsphere.proxy.config.YamlProxyConfiguration
;
...
...
shardingsphere-proxy/shardingsphere-proxy-common/src/main/java/org/apache/shardingsphere/proxy/config/yaml/YamlProxyServerConfiguration.java
浏览文件 @
1c7af3a7
...
...
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.proxy.config.yaml;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceConfiguration
;
import
org.apache.shardingsphere.infra.auth.yaml.config.YamlAuthenticationConfiguration
;
import
org.apache.shardingsphere.infra.yaml.config.YamlConfiguration
;
...
...
shardingsphere-proxy/shardingsphere-proxy-common/src/test/java/org/apache/shardingsphere/proxy/config/yaml/swapper/YamlProxyConfigurationSwapperTest.java
浏览文件 @
1c7af3a7
...
...
@@ -17,8 +17,8 @@
package
org.apache.shardingsphere.proxy.config.yaml.swapper
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceCenterConfiguration
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceCenterConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceConfiguration
;
import
org.apache.shardingsphere.infra.auth.Authentication
;
import
org.apache.shardingsphere.infra.auth.ProxyUser
;
import
org.apache.shardingsphere.infra.auth.yaml.config.YamlAuthenticationConfiguration
;
...
...
shardingsphere-scaling/shardingsphere-scaling-bootstrap/src/test/java/org/apache/shardingsphere/scaling/web/HttpServerHandlerTest.java
浏览文件 @
1c7af3a7
...
...
@@ -27,7 +27,7 @@ import io.netty.handler.codec.http.FullHttpResponse;
import
io.netty.handler.codec.http.HttpMethod
;
import
io.netty.handler.codec.http.HttpVersion
;
import
io.netty.util.CharsetUtil
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
;
import
org.apache.shardingsphere.scaling.core.config.ScalingConfiguration
;
import
org.apache.shardingsphere.scaling.core.config.ScalingContext
;
import
org.apache.shardingsphere.scaling.core.config.ServerConfiguration
;
...
...
shardingsphere-scaling/shardingsphere-scaling-bootstrap/src/test/resources/config.json
浏览文件 @
1c7af3a7
...
...
@@ -17,7 +17,7 @@
{
"ruleConfiguration"
:
{
"sourceDatasource"
:
"ds_0: !!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
\n
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
\n
props:
\n
jdbcUrl: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useSSL=false
\n
username: root
\n
password: '123456'
\n
connectionTimeout: 30000
\n
idleTimeout: 60000
\n
maxLifetime: 1800000
\n
maxPoolSize: 50
\n
minPoolSize: 1
\n
maintenanceIntervalMilliseconds: 30000
\n
readOnly: false
\n
"
,
"sourceDatasource"
:
"ds_0: !!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
\n
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
\n
props:
\n
jdbcUrl: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useSSL=false
\n
username: root
\n
password: '123456'
\n
connectionTimeout: 30000
\n
idleTimeout: 60000
\n
maxLifetime: 1800000
\n
maxPoolSize: 50
\n
minPoolSize: 1
\n
maintenanceIntervalMilliseconds: 30000
\n
readOnly: false
\n
"
,
"sourceRule"
:
"defaultDatabaseStrategy:
\n
standard:
\n
shardingAlgorithmName: inline
\n
shardingColumn: user_id
\n
tables:
\n
t1:
\n
actualDataNodes: ds_0.t1
\n
keyGenerateStrategy:
\n
column: order_id
\n
logicTable: t1
\n
tableStrategy:
\n
standard:
\n
shardingAlgorithmName: inline
\n
shardingColumn: order_id
\n
t2:
\n
actualDataNodes: ds_0.t2
\n
keyGenerateStrategy:
\n
column: order_item_id
\n
logicTable: t2
\n
tableStrategy:
\n
standard:
\n
shardingAlgorithmName: inline
\n
shardingColumn: order_id"
,
"destinationDataSources"
:
{
"name"
:
"dt_0"
,
...
...
shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/config/ServerConfiguration.java
浏览文件 @
1c7af3a7
...
...
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.scaling.core.config;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.apache.shardingsphere.infra.yaml.config.YamlConfiguration
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceCenterConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceCenterConfiguration
;
/**
* Global server configuration.
...
...
shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/job/position/resume/ZookeeperResumeBreakPointManager.java
浏览文件 @
1c7af3a7
...
...
@@ -19,8 +19,8 @@ package org.apache.shardingsphere.scaling.core.job.position.resume;
import
com.google.common.base.Strings
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlGovernanceCenterConfiguration
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.swapper.GovernanceCenterConfigurationYamlSwapper
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlGovernanceCenterConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.swapper.GovernanceCenterConfigurationYamlSwapper
;
import
org.apache.shardingsphere.governance.repository.zookeeper.CuratorZookeeperRepository
;
import
org.apache.shardingsphere.scaling.core.config.ScalingContext
;
...
...
shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/utils/ConfigurationYamlConverter.java
浏览文件 @
1c7af3a7
...
...
@@ -23,8 +23,8 @@ import lombok.AccessLevel;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.infra.config.datasource.DataSourceConfiguration
;
import
org.apache.shardingsphere.infra.yaml.engine.YamlEngine
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
;
import
org.apache.shardingsphere.governance.core.
common.
yaml.swapper.DataSourceConfigurationYamlSwapper
;
import
org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
;
import
org.apache.shardingsphere.governance.core.yaml.swapper.DataSourceConfigurationYamlSwapper
;
import
org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration
;
import
org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration
;
import
org.apache.shardingsphere.sharding.yaml.swapper.ShardingRuleConfigurationYamlSwapper
;
...
...
shardingsphere-scaling/shardingsphere-scaling-core/src/test/resources/config.json
浏览文件 @
1c7af3a7
...
...
@@ -17,7 +17,7 @@
{
"ruleConfiguration"
:
{
"sourceDatasource"
:
"ds_0: !!org.apache.shardingsphere.governance.core.
common.
yaml.config.YamlDataSourceConfiguration
\n
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
\n
props:
\n
jdbcUrl: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useSSL=false
\n
username: root
\n
password: '123456'
\n
connectionTimeout: 30000
\n
idleTimeout: 60000
\n
maxLifetime: 1800000
\n
maxPoolSize: 50
\n
minPoolSize: 1
\n
maintenanceIntervalMilliseconds: 30000
\n
readOnly: false
\n
"
,
"sourceDatasource"
:
"ds_0: !!org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration
\n
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
\n
props:
\n
jdbcUrl: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useSSL=false
\n
username: root
\n
password: '123456'
\n
connectionTimeout: 30000
\n
idleTimeout: 60000
\n
maxLifetime: 1800000
\n
maxPoolSize: 50
\n
minPoolSize: 1
\n
maintenanceIntervalMilliseconds: 30000
\n
readOnly: false
\n
"
,
"sourceRule"
:
"defaultDatabaseStrategy:
\n
standard:
\n
shardingAlgorithmName: inline
\n
shardingColumn: user_id
\n
tables:
\n
t1:
\n
actualDataNodes: ds_0.t1
\n
keyGenerateStrategy:
\n
column: order_id
\n
logicTable: t1
\n
tableStrategy:
\n
standard:
\n
shardingAlgorithmName: inline
\n
shardingColumn: order_id
\n
t2:
\n
actualDataNodes: ds_0.t2
\n
keyGenerateStrategy:
\n
column: order_item_id
\n
logicTable: t2
\n
tableStrategy:
\n
standard:
\n
shardingAlgorithmName: inline
\n
shardingColumn: order_id"
,
"destinationDataSources"
:
{
"name"
:
"dt_0"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录