This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang 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 9f11534fdc8 Add consul doc (#21337)
9f11534fdc8 is described below
commit 9f11534fdc83eef9d02d93616a3839c2e7015aaa
Author: Liang Zhang <[email protected]>
AuthorDate: Tue Oct 4 11:38:22 2022 +0800
Add consul doc (#21337)
---
docs/document/content/dev-manual/mode.cn.md | 17 +++++++++--------
docs/document/content/dev-manual/mode.en.md | 11 ++++++-----
.../builtin-algorithm/metadata-repository.cn.md | 13 +++++++++++++
.../builtin-algorithm/metadata-repository.en.md | 13 +++++++++++++
4 files changed, 41 insertions(+), 13 deletions(-)
diff --git a/docs/document/content/dev-manual/mode.cn.md
b/docs/document/content/dev-manual/mode.cn.md
index c2e0247260d..ec39a653ce3 100644
--- a/docs/document/content/dev-manual/mode.cn.md
+++ b/docs/document/content/dev-manual/mode.cn.md
@@ -17,9 +17,9 @@ chapter = true
### 已知实现
-| *配置标识* | *详细说明* | *全限定类名* |
-| -------------------- | -------------------- | ---------------------------- |
-| H2 | 基于 H2 的持久化 |
[`org.apache.shardingsphere.mode.repository.standalone.h2.H2Repository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-jdbc-h2/src/main/java/org/apache/shardingsphere/mode/repository/standalone/h2/H2Repository.java)
|
+| *配置标识* | *详细说明* | *全限定类名* |
+| -------- | -------------- | ---------- |
+| H2 | 基于 H2 的持久化 |
[`org.apache.shardingsphere.mode.repository.standalone.h2.H2Repository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-jdbc-h2/src/main/java/org/apache/shardingsphere/mode/repository/standalone/h2/H2Repository.java)
|
## ClusterPersistRepository
@@ -33,11 +33,12 @@ chapter = true
### 已知实现
-| *配置标识* | *详细说明* | *全限定类名*
|
-| -------------------- | ----------------------------------------- |
---------------------------- |
-| ZooKeeper | 基于 ZooKeeper 的持久化 |
[`org.apache.shardingsphere.mode.repository.cluster.zookeeper.CuratorZookeeperRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/mode/repository/cluster/zo
[...]
-| etcd | 基于 Etcd 的持久化 |
[`org.apache.shardingsphere.mode.repository.cluster.etcd.EtcdRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-etcd/src/main/java/org/apache/shardingsphere/mode/repository/cluster/etcd/EtcdRepository.java)
|
-| Nacos | 基于 Nacos 的持久化 |
[`org.apache.shardingsphere.mode.repository.cluster.nacos.NacosRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/NacosRepository.java)
|
+| *配置标识* | *详细说明* | *全限定类名* |
+| --------- | --------------------- | ---------- |
+| ZooKeeper | 基于 ZooKeeper 的持久化 |
[`org.apache.shardingsphere.mode.repository.cluster.zookeeper.CuratorZookeeperRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/CuratorZookeeperReposit
[...]
+| etcd | 基于 Etcd 的持久化 |
[`org.apache.shardingsphere.mode.repository.cluster.etcd.EtcdRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-etcd/src/main/java/org/apache/shardingsphere/mode/repository/cluster/etcd/EtcdRepository.java)
|
+| Nacos | 基于 Nacos 的持久化 |
[`org.apache.shardingsphere.mode.repository.cluster.nacos.NacosRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/NacosRepository.java)
|
+| Consul | 基于 Consul 的持久化 |
[`org.apache.shardingsphere.mode.repository.cluster.consul.ConsulRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-consul/src/main/java/org/apache/shardingsphere/mode/repository/cluster/consul/ConsulRepository.java)
|
## GovernanceWatcher
diff --git a/docs/document/content/dev-manual/mode.en.md
b/docs/document/content/dev-manual/mode.en.md
index c78c0a35f15..c0c26b3249e 100644
--- a/docs/document/content/dev-manual/mode.en.md
+++ b/docs/document/content/dev-manual/mode.en.md
@@ -33,11 +33,12 @@ Cluster mode configuration information persistence
definition
### Implementation classes
-| *Configuration Type* | *Description* |
*Fully-qualified class name* |
-| -------------------- | ----------------------------------------- |
---------------------------- |
-| ZooKeeper | ZooKeeper-based persistence |
[`org.apache.shardingsphere.mode.repository.cluster.zookeeper.CuratorZookeeperRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/mode/repository/cluste
[...]
-| etcd | Etcd-based persistence |
[`org.apache.shardingsphere.mode.repository.cluster.etcd.EtcdRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-etcd/src/main/java/org/apache/shardingsphere/mode/repository/cluster/etcd/EtcdRepository.java)
|
-| Nacos | Nacos-based persistence |
[`org.apache.shardingsphere.mode.repository.cluster.nacos.NacosRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/NacosRepository.java)
|
+| *Configuration Type* | *Description* | *Fully-qualified class
name* |
+| -------------------- | --------------------------- |
---------------------------- |
+| ZooKeeper | ZooKeeper based persistence |
[`org.apache.shardingsphere.mode.repository.cluster.zookeeper.CuratorZookeeperRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/Cu
[...]
+| etcd | Etcd based persistence |
[`org.apache.shardingsphere.mode.repository.cluster.etcd.EtcdRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-etcd/src/main/java/org/apache/shardingsphere/mode/repository/cluster/etcd/EtcdRepository.java)
|
+| Nacos | Nacos based persistence |
[`org.apache.shardingsphere.mode.repository.cluster.nacos.NacosRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/NacosRepository.java)
|
+| Consul | Consul based persistence |
[`org.apache.shardingsphere.mode.repository.cluster.consul.ConsulRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-consul/src/main/java/org/apache/shardingsphere/mode/repository/cluster/consul/ConsulRepository.java)
|
## GovernanceWatcher
diff --git
a/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.cn.md
b/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.cn.md
index 66640334c39..c05e3a50943 100644
---
a/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.cn.md
+++
b/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.cn.md
@@ -69,6 +69,19 @@ Apache ShardingSphere 为不同的运行模式提供了不同的元数据持久
| maxRetries | int | 客户端检查数据可用性的最大重试次数 | 3
|
| timeToLiveSeconds | int | 临时实例失效的秒数 | 30
|
+### Consul 持久化
+
+类型:Consul
+
+适用模式:Cluster
+
+可配置属性:
+
+| *名称* | *数据类型* | *说明* | *默认值*
|
+| ---------------------------- | --------- | ----------------------------- |
--------------- |
+| timeToLiveSeconds | String | 临时实例失效的秒数 | 30s
|
+| blockQueryTimeToSeconds | long | 查询请求超时秒数 | 60
|
+
## 操作步骤
1. 在 server.yaml 中配置 Mode 运行模式
diff --git
a/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.en.md
b/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.en.md
index 711daed22c4..6c1c14abe97 100644
---
a/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.en.md
+++
b/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.en.md
@@ -68,6 +68,19 @@ Attributes:
| maxRetries | int | Max retries for client to check data
availability | 3 |
| timeToLiveSeconds | int | Seconds of ephemeral instance live
| 30 |
+### Consul Repository
+
+Type: Consul
+
+Mode: Cluster
+
+Attributes:
+
+| *Name* | *Type* | *Description*
| *Default Value* |
+| ---------------------------- | ------- |
------------------------------------------------- | --------------- |
+| timeToLiveSeconds | String | Seconds of ephemeral instance live
| 30s |
+| blockQueryTimeToSeconds | long | Seconds of query timeout
| 60 |
+
## Procedure
1. Configure running mode in server.yaml.