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/23 05:20:01 UTC

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

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 3305ed3  update governance document (#6170)
3305ed3 is described below

commit 3305ed3b4a215b714cec281a6f9aa40de3f14705
Author: Haoran Meng <lo...@163.com>
AuthorDate: Tue Jun 23 13:19:46 2020 +0800

    update governance document (#6170)
---
 .../configuration/java-api/governance.cn.md        | 57 +++++++++++++++++-----
 .../configuration/java-api/governance.en.md        | 57 +++++++++++++++++-----
 .../spring-boot-starter/governance.cn.md           |  2 +-
 .../spring-boot-starter/governance.en.md           |  2 +-
 .../spring-namespace/governance.cn.md              |  6 +--
 .../spring-namespace/governance.en.md              |  6 +--
 .../configuration/yaml/governance.cn.md            |  6 +--
 .../configuration/yaml/governance.en.md            |  6 +--
 8 files changed, 102 insertions(+), 40 deletions(-)

diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.cn.md
index 376bee9..3a4c833 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.cn.md
@@ -3,7 +3,11 @@ title = "分布式治理"
 weight = 6
 +++
 
-## 配置入口
+## 配置项说明
+
+### 治理
+
+*配置入口*
 
 类名称:org.apache.shardingsphere.orchestration.center.config.OrchestrationConfiguration
 
@@ -11,9 +15,9 @@ weight = 6
 
 | *名称*                    | *数据类型*                           | *说明*                                                            |
 | ------------------------ | ----------------------------------- | ----------------------------------------------------------------- |
-| instanceConfigurationMap | Map\<String, CenterConfiguration\>  | 配置/注册/元数据中心的配置 map,key 为名称,value 为配置/注册/元数据中心 |
+| instanceConfigurationMap | Map\<String, CenterConfiguration\>  | 治理实例的配置 map,key 为名称,value 为治理实例 |
 
-## 配置/注册中心配置
+*治理实例配置*
 
 类名称:org.apache.shardingsphere.orchestration.center.config.CenterConfiguration
 
@@ -21,19 +25,19 @@ weight = 6
 
 | *名称*             | *数据类型* | *说明*                                                                                         |
 | ----------------- | ---------- | --------------------------------------------------------------------------------------------- |
-| instanceType      | String     | 配置/注册中心的实例类型,例如:ZooKeeper 或 Etcd、Apollo、Nacos 等                                 |
-| properties        | Properties | 配置本实例需要的其他参数,例如 ZooKeeper 的连接参数等                                               |
-| orchestrationType | String     | 治理类型,例如:config_center、registry_center、metadata_center,多个类型用逗号分隔                |
-| serverLists       | String     | 连接配置/注册/元数据中心服务器的列表,包括IP地址和端口号,多个地址用逗号分隔。如: host1:2181,host2:2181 |
-| namespace (?)     | String     | 配置/注册/元数据中心的命名空间                                                                    |
+| orchestrationType | String     | 治理类型,多个类型用逗号分隔,如 config_center,registry_center,metadata_center                |
+| instanceType      | String     | 治理实例类型,如:zookeeper, etcd, apollo, nacos                                 |
+| serverLists       | String     | 治理服务列表,包括 IP 地址和端口号,多个地址用逗号分隔,如: host1:2181,host2:2181 |
+| namespace (?)     | String     | 治理命名空间                                                                    |
+| props        | Properties | 配置本实例需要的其他参数,例如 ZooKeeper 的连接参数等                                               |
 
-### 通用属性配置
+通用属性配置
 
 | *名称*           | *数据类型* | *说明*                                                     | *默认值* |
 | --------------- | --------- | ---------------------------------------------------------- | ------- |
 | overwrite       | boolean   | 本地配置是否覆盖配置中心配置,如果可覆盖,每次启动都以本地配置为准 | false   |
 
-### ZooKeeper 属性配置
+ZooKeeper 属性配置
 
 | *名称*                            | *数据类型* | *说明*                 | *默认值* |
 | -------------------------------- | ---------- | --------------------- | ------- |
@@ -43,13 +47,13 @@ weight = 6
 | retryIntervalMilliseconds (?)    | int        | 重试间隔毫秒数          | 500 毫秒 |
 | timeToLiveSeconds (?)            | int        | 临时节点存活秒数        | 60 秒    |
 
-### Etcd 属性配置
+Etcd 属性配置
 
 | *名称*                 | *数据类型* | *说明*     | *默认值* |
 | --------------------- | --------- | ---------- | ------- |
 | timeToLiveSeconds (?) | long      | 数据存活秒数 | 30秒    |
 
-### Apollo 属性配置
+Apollo 属性配置
 
 | *名称*             | *数据类型* | *说明*               | *默认值*               |
 | ------------------ | -------- | -------------------- | --------------------- |
@@ -62,9 +66,36 @@ weight = 6
 | connectTimeout (?) | int      | 连接超时毫秒数         | 1000 毫秒             |
 | readTimeout (?)    | int      | 读取超时毫秒数         | 5000 毫秒             |
 
-### Nacos 属性配置
+Nacos 属性配置
 
 | *名称*       | *数据类型* | *说明*                 | *默认值*                      |
 | ----------- | --------- | ---------------------- | ---------------------------- |
 | group (?)   | String    | nacos group 配置       | SHARDING_SPHERE_DEFAULT_GROUP |
 | timeout (?) | long      | nacos 获取数据超时毫秒数 | 3000 毫秒                     |
+
+### 集群管理
+
+*配置入口*
+
+类名称:org.apache.shardingsphere.cluster.configuration.config.ClusterConfiguration
+
+可配置属性:
+
+| *名称*                    | *数据类型*                           | *说明*                                                            |
+| ------------------------ | ----------------------------------- | ----------------------------------------------------------------- |
+| heartbeat | HeartbeatConfiguration  | 心跳检测配置 |
+
+*心跳检测配置*
+
+类名称:org.apache.shardingsphere.orchestration.center.config.HeartbeatConfiguration
+
+可配置属性:
+
+| *名称*       | *数据类型* | *说明*                 |
+| ----------- | --------- | ---------------------- |
+| sql   | String    | 心跳检测 SQL       |
+| interval | int      | 心跳检测间隔时间 (s) |
+| threadCount   | int    | 心跳检测线程池大小       |
+| retryEnable | Boolean      | 是否支持失败重试,可设置 true 或 false |
+| retryMaximum(?)   | int    | 最大重试次数      |
+| retryInterval(?) | int      | 重试间隔时间 (s) |
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.en.md
index e80669e..61e8e83 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/governance.en.md
@@ -3,7 +3,11 @@ title = "Governance"
 weight = 6
 +++
 
-## Root Configuration
+## Configuration Item Explanation
+
+### Management
+
+*Configuration Entrance*
 
 Class name: org.apache.shardingsphere.orchestration.center.config.OrchestrationConfiguration
 
@@ -11,9 +15,9 @@ Attributes:
 
 | *Name*                   | *Data Type*                         | *Description*                                                                                                         |
 | ------------------------ | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
-| instanceConfigurationMap | Map\<String, CenterConfiguration\>  | Config map of config-center&registry-center, the key is center's name, the value is the config-center/registry-center |
+| instanceConfigurationMap | Map\<String, CenterConfiguration\>  | Config map of config-center&registry-center, the key is orchestration name, the value is the orchestration instance |
 
-## Config / Registry Center Configuration
+*Orchestration Instance Configuration*
 
 Class name: org.apache.shardingsphere.orchestration.center.config.CenterConfiguration
 
@@ -21,19 +25,19 @@ Attributes:
 
 | *Name*            | *Data Type* | *Description*                                                                                                                               |
 | ----------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
-| instanceType      | String      | The type of center instance(zookeeper/etcd/apollo/nacos)                                                                                    |
-| properties        | String      | Properties for center instance config, such as options of zookeeper                                                                         |
-| orchestrationType | String      | The type of orchestration center: config_center or registry_center or metadata_center, multiple types are separated by commas               |
-| serverLists       | String      | Connect to server lists in center, including IP address and port number; addresses are separated by commas, such as `host1:2181,host2:2181` |
-| namespace (?)     | String      | Namespace of center instance                                                                                                                |
+| orchestrationType | String      | Orchestration type, use commas to separate, such as: config_center,registry_center,metadata_center               |
+| instanceType      | String      | Orchestration instance type, such as: zookeeper, etcd, apollo, nacos                                                                                    |
+| serverLists       | String      | The list of servers that connect to orchestration instance, including IP and port number, use commas to separate, such as: host1:2181,host2:2181 |
+| namespace (?)     | String      | Orchestration namespace                                                                                                               |
+| props        | Properties      | Properties for center instance config, such as options of zookeeper                                                                         |
 
-### Common Properties Configuration
+Common Properties Configuration
 
 | *Name*          | *Data Type* | *Description*                                                                                                                             | *Default Value* |
 | --------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
 | overwrite       | boolean     | Local configurations overwrite config center configurations or not; if they overwrite, each start takes reference of local configurations | false           |
 
-### ZooKeeper Properties Configuration
+ZooKeeper Properties Configuration
 
 | *Name*                           | *Data Type* | *Description*                                  | *Default Value*       |
 | -------------------------------- | ----------- | ---------------------------------------------- | --------------------- |
@@ -44,13 +48,13 @@ Attributes:
 | timeToLiveSeconds (?)            | int         | Time to live seconds for ephemeral nodes       | 60 seconds            |
 
 
-### Etcd Properties Configuration
+Etcd Properties Configuration
 
 | *Name*                | *Data Type* | *Description*                         | *Default Value* |
 | --------------------- | ----------- | ------------------------------------- | --------------- |
 | timeToLiveSeconds (?) | long        | Time to live seconds for data persist | 30 seconds      |
 
-### Apollo Properties Configuration
+Apollo Properties Configuration
 
 | *Name*             | *Data Type* | *Description*                | *Default Value*       |
 | ------------------ | ----------- | ---------------------------- | --------------------- |
@@ -63,9 +67,36 @@ Attributes:
 | connectTimeout (?) | int         | Connect timeout milliseconds | 1000 milliseconds     |
 | readTimeout (?)    | int         | Read timeout milliseconds    | 5000 milliseconds     |
 
-### Nacos Properties Configuration
+Nacos Properties Configuration
 
 | *Name*      | *Data Type* | *Description* | *Default Value*               |
 | ----------- | ----------- | ------------- | ----------------------------- |
 | group (?)   | String      | group         | SHARDING_SPHERE_DEFAULT_GROUP |
 | timeout (?) | long        | timeout       | 3000 milliseconds             |
+
+### Cluster
+
+*Configuration Entrance*
+
+Class name:org.apache.shardingsphere.cluster.configuration.config.ClusterConfiguration
+
+Attributes:
+
+| *Name*                    | *Data Type*                           | *Description*                                                            |
+| ------------------------ | ----------------------------------- | ----------------------------------------------------------------- |
+| heartbeat | HeartbeatConfiguration  | heartbeat detection configuration |
+
+*Heartbeat Detection Configuration*
+
+Class name:org.apache.shardingsphere.orchestration.center.config.HeartbeatConfiguration
+
+Attributes:
+
+| *Name*       | *Data Type* | *Description*                 |
+| ----------- | --------- | ---------------------- |
+| sql   | String    | Heartbeat detection SQL       |
+| interval | int      | Heartbeat detection task interval (s) |
+| threadCount   | int    | Thread pool size       |
+| retryEnable | Boolean      | Whether to enable retry, set true or false |
+| retryMaximum(?)   | int    | Maximum number of retry, effective when retryEnable is true      |
+| retryInterval(?) | int      | Retry interval (s), effective when retryEnable is true |
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 83a4900..96b2a5e 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
@@ -8,7 +8,7 @@ weight = 6
 ### 治理
 
 ```properties
-spring.shardingsphere.orchestration.spring_boot_ds_sharding.orchestration-type= #治理类型,例如 config_center, registry_center, metadata_center
+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= #治理命名空间
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 e07f1fe..0199052 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
@@ -8,7 +8,7 @@ weight = 6
 ### 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.orchestration-type= #Orchestration type, use commas to separate, such as: 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
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 f681460..2273117 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
@@ -38,12 +38,12 @@ Namespace: [http://shardingsphere.apache.org/schema/shardingsphere/orchestration
 
 | *名称*                              | *类型* | *说明*                                                                                    |
 | ----------------------------------- | ----- | ------------------------------------------------------------------------------------------|
-| id                                  | 属性  | 治理实例 ID                                                                   |
-| orchestration-type                  | 属性  | 治理类型,例如 config_center, registry_center, metadata_center                       |
+| id                                  | 属性  | 治理实例名称                                                                 |
+| orchestration-type                  | 属性  | 治理类型,多个类型用逗号分隔,例如 config_center, registry_center, metadata_center                       |
 | instance-type                       | 属性  | 治理实例类型。如:zookeeper, etcd, apollo, nacos                                                           |
 | server-lists                        | 属性  | 治理服务列表。包括 IP 地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181   |
 | namespace (?)                       | 属性  | 治理命名空间                                                                         |
-| props (?)                       | 属性  | 其它属性                                                                           |
+| props (?)                       | 属性  | 配置本实例需要的其他参数,例如 ZooKeeper 的连接参数等                                                                           |
 
 ### 集群管理
 
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 cf9ea23..ab82b98 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
@@ -38,12 +38,12 @@ Namespace: [http://shardingsphere.apache.org/schema/shardingsphere/orchestration
 
 | *Name*                              | *Type* | *Description*                                                                                    |
 | ----------------------------------- | ----- | ------------------------------------------------------------------------------------------|
-| id                                  | Attribute  | Orchestration ID                                                                   |
-| orchestration-type                  | Attribute  | Orchestration type: config_center, registry_center, metadata_center                       |
+| id                                  | Attribute  | Orchestration instance name                                                                 |
+| orchestration-type                  | Attribute  | Orchestration type, use commas to separate, such as: 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    
+| props (?)                       | Attribute  | Properties for center instance config, such as options of zookeeper    
 
 ### Cluster
 
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 0dcebc0..691a574 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
@@ -9,12 +9,12 @@ weight = 6
 
 ```yaml
 orchestration:
-  demo_yaml_ds_sharding: #治理实例 ID
-    orchestrationType: #治理类型,例如 config_center, registry_center, metadata_center
+  demo_yaml_ds_sharding: #治理实例名称
+    orchestrationType: #治理类型,多个类型用逗号分隔,例如 config_center,registry_center,metadata_center
     instanceType: #治理实例类型。如:zookeeper, etcd, apollo, nacos
     serverLists: #治理服务列表。包括 IP 地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181
     namespace: #治理命名空间
-    props: #其它属性
+    props: #配置本实例需要的其他参数,例如 ZooKeeper 的连接参数等
       overwrite: #本地配置是否覆盖配置中心配置。如果可覆盖,每次启动都以本地配置为准
 ```
 
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 5735a83..ace21a9 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
@@ -9,12 +9,12 @@ weight = 6
 
 ```yaml
 orchestration:
-  demo_yaml_ds_sharding: #Orchestration ID
-    orchestrationType: #Orchestration type: config_center, registry_center, metadata_center
+  demo_yaml_ds_sharding: #Orchestration instance name
+    orchestrationType: #Orchestration type, use commas to separate, such as: 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
+    props: #Properties for center instance config, such as options of zookeeper
       overwrite: #Whether to overwrite local configurations with config center configurations; if it can, each initialization should refer to local configurations
 ```