You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ki...@apache.org on 2020/06/22 09:14:52 UTC

[shardingsphere] branch master updated: update governance document (#6154)

This is an automated email from the ASF dual-hosted git repository.

kimmking 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 6b18ba4  update governance document (#6154)
6b18ba4 is described below

commit 6b18ba4d28dc202cb069ee26530eeca27031dafc
Author: Haoran Meng <lo...@163.com>
AuthorDate: Mon Jun 22 17:14:26 2020 +0800

    update governance document (#6154)
---
 .../spring-boot-starter/governance.cn.md           | 21 +++++-
 .../spring-boot-starter/governance.en.md           | 21 +++++-
 .../spring-namespace/governance.cn.md              | 74 +++++++++++++++++++++-
 .../spring-namespace/governance.en.md              | 74 +++++++++++++++++++++-
 .../configuration/yaml/governance.cn.md            | 26 +++++++-
 .../configuration/yaml/governance.en.md            | 26 +++++++-
 6 files changed, 236 insertions(+), 6 deletions(-)

diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/governance.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/governance.cn.md
index 7a2b49a..83a4900 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/governance.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/governance.cn.md
@@ -5,4 +5,23 @@ weight = 6
 
 ## 配置项说明
 
-TODO
\ No newline at end of file
+### 治理
+
+```properties
+spring.shardingsphere.orchestration.spring_boot_ds_sharding.orchestration-type= #治理类型,例如 config_center, registry_center, metadata_center
+spring.shardingsphere.orchestration.spring_boot_ds_sharding.instance-type= #治理实例类型。如:zookeeper, etcd, apollo, nacos
+spring.shardingsphere.orchestration.spring_boot_ds_sharding.server-lists= #治理服务列表。包括 IP 地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181
+spring.shardingsphere.orchestration.spring_boot_ds_sharding.namespace= #治理命名空间
+spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.overwrite= #本地配置是否覆盖配置中心配置。如果可覆盖,每次启动都以本地配置为准
+```
+
+### 集群管理
+
+```properties
+spring.shardingsphere.cluster.heartbeat.sql= #心跳检测 SQL
+spring.shardingsphere.cluster.heartbeat.interval= #心跳检测间隔时间 (s)
+spring.shardingsphere.cluster.heartbeat.threadCount= #心跳检测线程池大小
+spring.shardingsphere.cluster.heartbeat.retryEnable= #是否支持失败重试,可设置 true 或 false
+spring.shardingsphere.cluster.heartbeat.retryInterval= #重试间隔时间 (s)
+spring.shardingsphere.cluster.heartbeat.retryMaximum= #最大重试次数
+```
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/governance.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/governance.en.md
index 321d814..e07f1fe 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/governance.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/governance.en.md
@@ -5,4 +5,23 @@ weight = 6
 
 ## Configuration Item Explanation
 
-TODO
\ No newline at end of file
+### Management
+
+```properties
+spring.shardingsphere.orchestration.spring_boot_ds_sharding.orchestration-type= #Orchestration type: config_center, registry_center, metadata_center
+spring.shardingsphere.orchestration.spring_boot_ds_sharding.instance-type= #Orchestration instance type. Example:zookeeper, etcd, apollo, nacos
+spring.shardingsphere.orchestration.spring_boot_ds_sharding.server-lists= #The list of servers that connect to orchestration instance, including IP and port number; use commas to separate
+spring.shardingsphere.orchestration.spring_boot_ds_sharding.namespace= #Orchestration namespace
+spring.shardingsphere.orchestration.spring_boot_ds_sharding.properties.overwrite= #Whether to overwrite local configurations with config center configurations; if it can, each initialization should refer to local configurations
+```
+
+### Cluster
+
+```properties
+spring.shardingsphere.cluster.heartbeat.sql= #Heartbeat detection SQL
+spring.shardingsphere.cluster.heartbeat.interval= #Heartbeat detection task interval (s)
+spring.shardingsphere.cluster.heartbeat.threadCount= #Thread pool size
+spring.shardingsphere.cluster.heartbeat.retryEnable= #Whether to enable retry, set true or false
+spring.shardingsphere.cluster.heartbeat.retryInterval= #Retry interval (s), effective when retryEnable is true
+spring.shardingsphere.cluster.heartbeat.retryMaximum= #Maximum number of retry, effective when retryEnable is true
+```
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/governance.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/governance.cn.md
index 7a2b49a..f681460 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/governance.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/governance.cn.md
@@ -5,4 +5,76 @@ weight = 6
 
 ## 配置项说明
 
-TODO
\ No newline at end of file
+### 治理
+
+```xml
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/orchestration/sharding"
+       xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/orchestration/masterslave"
+       xmlns:orchestration="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                           http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://shardingsphere.apache.org/schema/shardingsphere/datasource
+                           http://shardingsphere.apache.org/schema/shardingsphere/datasource/datasource.xsd
+                           http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                           http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                           http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                           http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd
+">
+    
+    <orchestration:instance id="regCenter" orchestration-type="registry_center,config_center,metadata_center" instance-type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-demo">
+        <props>
+            <prop key="overwrite">true</prop>
+        </props>
+     </orchestration:instance>
+    <orchestration:data-source id="shardingDatabasesTablesDataSource" data-source-ref="realShardingDatabasesTablesDataSource" instance-ref="regCenter" />
+</beans>
+```
+Namespace: [http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd](http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd)
+
+<orchestration:instance />
+
+| *名称*                              | *类型* | *说明*                                                                                    |
+| ----------------------------------- | ----- | ------------------------------------------------------------------------------------------|
+| id                                  | 属性  | 治理实例 ID                                                                   |
+| orchestration-type                  | 属性  | 治理类型,例如 config_center, registry_center, metadata_center                       |
+| instance-type                       | 属性  | 治理实例类型。如:zookeeper, etcd, apollo, nacos                                                           |
+| server-lists                        | 属性  | 治理服务列表。包括 IP 地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181   |
+| namespace (?)                       | 属性  | 治理命名空间                                                                         |
+| props (?)                       | 属性  | 其它属性                                                                           |
+
+### 集群管理
+
+```xml
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:orchestration="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xmlns:cluster="http://shardingsphere.apache.org/schema/shardingsphere/cluster"
+       xmlns="http://www.springframework.org/schema/beans"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                           http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                           http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd
+                           http://shardingsphere.apache.org/schema/shardingsphere/cluster
+                           http://shardingsphere.apache.org/schema/shardingsphere/cluster/cluster.xsd
+                           ">
+ 
+    <orchestration:data-source id="shardingDatabasesTablesDataSource" data-source-ref="realShardingDatabasesTablesDataSource" instance-ref="regCenter" cluster-ref="cluster" />
+    <cluster:heartbeat id="cluster" sql="select 1" threadCount="1" interval="60" retryEnable="false" retryMaximum="3" retryInterval="3"/>
+</beans>
+```
+Namespace: [http://shardingsphere.apache.org/schema/shardingsphere/cluster/cluster.xsd](http://shardingsphere.apache.org/schema/shardingsphere/cluster/cluster.xsd)
+
+<cluster:heartbeat />
+
+| *名称*                              | *类型* | *说明*                                                                                    |
+| ----------------------------------- | ----- | ------------------------------------------------------------------------------------------|
+| id                                  | 属性  | 心跳检测配置 ID                                                                   |
+| sql                       | 属性  | 心跳检测 SQL                                                           |
+| threadCount                  | 属性  | 心跳检测线程池大小                       |
+| interval                        | 属性  | 心跳检测间隔时间 (s)   |
+| retryEnable                       | 属性  | 是否支持失败重试,可设置 true 或 false                                                                         |
+| retryMaximum (?)                       | 属性  | 最大重试次数                                                                           |
+| retryInterval (?)                       | 属性  | 重试间隔时间 (s)                                                                           |
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/governance.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/governance.en.md
index 321d814..cf9ea23 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/governance.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/governance.en.md
@@ -5,4 +5,76 @@ weight = 6
 
 ## Configuration Item Explanation
 
-TODO
\ No newline at end of file
+### Management
+
+```xml
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/orchestration/sharding"
+       xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/orchestration/masterslave"
+       xmlns:orchestration="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                           http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://shardingsphere.apache.org/schema/shardingsphere/datasource
+                           http://shardingsphere.apache.org/schema/shardingsphere/datasource/datasource.xsd
+                           http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                           http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                           http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                           http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd
+">
+    
+    <orchestration:instance id="regCenter" orchestration-type="registry_center,config_center,metadata_center" instance-type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-demo">
+        <props>
+            <prop key="overwrite">true</prop>
+        </props>
+     </orchestration:instance>
+    <orchestration:data-source id="shardingDatabasesTablesDataSource" data-source-ref="realShardingDatabasesTablesDataSource" instance-ref="regCenter" />
+</beans>
+```
+Namespace: [http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd](http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd)
+
+<orchestration:instance />
+
+| *Name*                              | *Type* | *Description*                                                                                    |
+| ----------------------------------- | ----- | ------------------------------------------------------------------------------------------|
+| id                                  | Attribute  | Orchestration ID                                                                   |
+| orchestration-type                  | Attribute  | Orchestration type: config_center, registry_center, metadata_center                       |
+| instance-type                       | Attribute  | Orchestration instance type. Example:zookeeper, etcd, apollo, nacos                                                           |
+| server-lists                        | Attribute  | The list of servers that connect to orchestration instance, including IP and port number; use commas to separate   |
+| namespace (?)                       | Attribute  | Orchestration namespace                                                                         |
+| props (?)                       | Attribute  | Other properties    
+
+### Cluster
+
+```xml
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:orchestration="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xmlns:cluster="http://shardingsphere.apache.org/schema/shardingsphere/cluster"
+       xmlns="http://www.springframework.org/schema/beans"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                           http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                           http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd
+                           http://shardingsphere.apache.org/schema/shardingsphere/cluster
+                           http://shardingsphere.apache.org/schema/shardingsphere/cluster/cluster.xsd
+                           ">
+ 
+    <orchestration:data-source id="shardingDatabasesTablesDataSource" data-source-ref="realShardingDatabasesTablesDataSource" instance-ref="regCenter" cluster-ref="cluster" />
+    <cluster:heartbeat id="cluster" sql="select 1" threadCount="1" interval="60" retryEnable="false" retryMaximum="3" retryInterval="3"/>
+</beans>
+```
+Namespace: [http://shardingsphere.apache.org/schema/shardingsphere/cluster/cluster.xsd](http://shardingsphere.apache.org/schema/shardingsphere/cluster/cluster.xsd)
+
+<cluster:heartbeat />
+
+| *Name*                              | *Type* | *Description*                                                                                    |
+| ----------------------------------- | ----- | ------------------------------------------------------------------------------------------|
+| id                                  | Attribute  | Heartbeat detection ID                                                                   |
+| sql                       | Attribute  | Heartbeat detection SQL                                                           |
+| threadCount                  | Attribute  | Thread pool size                       |
+| interval                        | Attribute  | Heartbeat detection task interval (s)   |
+| retryEnable                       | Attribute  | Whether to enable retry, set true or false                                                                         |
+| retryMaximum (?)                       | Attribute  | Maximum number of retry, effective when retryEnable is true                                                                           |
+| retryInterval (?)                       | Attribute  | Retry interval (s), effective when retryEnable is true                                                                           |
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/governance.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/governance.cn.md
index 7a2b49a..0dcebc0 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/governance.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/governance.cn.md
@@ -5,4 +5,28 @@ weight = 6
 
 ## 配置项说明
 
-TODO
\ No newline at end of file
+### 治理
+
+```yaml
+orchestration:
+  demo_yaml_ds_sharding: #治理实例 ID
+    orchestrationType: #治理类型,例如 config_center, registry_center, metadata_center
+    instanceType: #治理实例类型。如:zookeeper, etcd, apollo, nacos
+    serverLists: #治理服务列表。包括 IP 地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181
+    namespace: #治理命名空间
+    props: #其它属性
+      overwrite: #本地配置是否覆盖配置中心配置。如果可覆盖,每次启动都以本地配置为准
+```
+
+### 集群管理
+
+```yaml
+cluster:
+  heartbeat:
+    sql: #心跳检测 SQL
+    threadCount: #心跳检测线程池大小
+    interval: #心跳检测间隔时间 (s)
+    retryEnable: #是否支持失败重试,可设置 true 或 false
+    retryMaximum: #最大重试次数
+    retryInterval: #重试间隔时间 (s)
+```
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/governance.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/governance.en.md
index 321d814..5735a83 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/governance.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/governance.en.md
@@ -5,4 +5,28 @@ weight = 6
 
 ## Configuration Item Explanation
 
-TODO
\ No newline at end of file
+### Management
+
+```yaml
+orchestration:
+  demo_yaml_ds_sharding: #Orchestration ID
+    orchestrationType: #Orchestration type: config_center, registry_center, metadata_center
+    instanceType: #Orchestration instance type. Example:zookeeper, etcd, apollo, nacos
+    serverLists: #The list of servers that connect to orchestration instance, including IP and port number; use commas to separate
+    namespace: #Orchestration namespace
+    props: #Other properties
+      overwrite: #Whether to overwrite local configurations with config center configurations; if it can, each initialization should refer to local configurations
+```
+
+### Cluster
+
+```yaml
+cluster:
+  heartbeat:
+    sql: #Heartbeat detection SQL
+    threadCount: #Thread pool size 
+    interval: #Heartbeat detection task interval (s)
+    retryEnable: #Whether to enable retry, set true or false
+    retryMaximum: #Maximum number of retry, effective when retryEnable is true
+    retryInterval: #Retry interval (s), effective when retryEnable is true
+```