| commit 6eb798ff6aed09abe17fcadb1636c02349d8276c |
| Author: zhaojinchao <zhaojinchao@apache.org> |
| Date: Fri Aug 12 10:45:01 2022 +0800 |
| |
| refactor mode.cn and ha.cn document (#20089) |
| |
| * refactor mode.cn document |
| |
| * Refactor ha document |
| |
| diff --git a/docs/document/content/dev-manual/ha.cn.md b/docs/document/content/dev-manual/ha.cn.md |
| index 9ac435363dd..7c0d2b0b5aa 100644 |
| --- a/docs/document/content/dev-manual/ha.cn.md |
| +++ b/docs/document/content/dev-manual/ha.cn.md |
| @@ -5,18 +5,20 @@ weight = 9 |
| chapter = true |
| +++ |
| |
| -## SPI 接口 |
| +## DatabaseDiscoveryProviderAlgorithm |
| |
| -| *SPI 名称* | *详细说明* | |
| -| ------------------------------------------------------------ | -------------------------------- | |
| -| DatabaseDiscoveryProviderAlgorithm | 数据库发现算法 | |
| +### 全限定类名 |
| |
| -## 示例 |
| +[`org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryProviderAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-api/src/main/java/org/apache/shardingsphere/dbdiscovery/spi/DatabaseDiscoveryProviderAlgorithm.java) |
| |
| -### DatabaseDiscoveryProviderAlgorithm |
| +### 定义 |
| |
| -| *已知实现类* | *详细说明* | |
| -| ------------------------------------------------------------ | --------------------------------- | |
| -| MGRDatabaseDiscoveryProviderAlgorithm | 基于 MySQL MGR 的数据库发现算法 | |
| -| MySQLNormalReplicationDatabaseDiscoveryProviderAlgorithm | 基于 MySQL 主从同步的数据库发现算法 | |
| -| OpenGaussNormalReplicationDatabaseDiscoveryProviderAlgorithm | 基于 openGauss 主从同步的数据库发现算法 | |
| +数据库发现提供算法的定义 |
| + |
| +### 已知实现 |
| + |
| +| *配置标识* | *详细说明* | *全限定类名* | |
| +| ---------------------------- | -----------------------------------------------| ---------------------------- | |
| +| MySQL.MGR | 基于 MySQL MGR 的数据库发现算法 | [`org.apache.shardingsphere.dbdiscovery.mysql.type.MGRMySQLDatabaseDiscoveryProviderAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MGRMySQLDatabaseDiscoveryProviderAlgorithm.java) | |
| +| MySQL.NORMAL_REPLICATION | 基于 MySQL 主从同步的数据库发现算法 | [`org.apache.shardingsphere.dbdiscovery.mysql.type.MySQLNormalReplicationDatabaseDiscoveryProviderAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MySQLNormalReplicationDatabaseDiscoveryProviderAlgorithm.java) | |
| +| openGauss.NORMAL_REPLICATION | 基于 openGauss 主从同步的数据库发现算法 | [`org.apache.shardingsphere.dbdiscovery.opengauss.OpenGaussNormalReplicationDatabaseDiscoveryProviderAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-opengauss/src/main/java/org/apache/shardingsphere/dbdiscovery/opengauss/OpenGaussNormalReplicationDatabaseDiscoveryProviderAlgorithm.java) | |
| diff --git a/docs/document/content/dev-manual/mode.cn.md b/docs/document/content/dev-manual/mode.cn.md |
| index 0f1692aa251..1bdb16d19fa 100644 |
| --- a/docs/document/content/dev-manual/mode.cn.md |
| +++ b/docs/document/content/dev-manual/mode.cn.md |
| @@ -5,37 +5,57 @@ weight = 1 |
| chapter = true |
| +++ |
| |
| -## SPI 接口 |
| +## StandalonePersistRepository |
| |
| -| *SPI 名称* | *详细说明* | |
| -| ----------------------------- | ----------------------- | |
| -| StandalonePersistRepository | Standalone 模式配置信息持久化 | |
| -| ClusterPersistRepository | Cluster 模式配置信息持久化 | |
| -| GovernanceWatcher | 治理监听器 | |
| +### 全限定类名 |
| |
| -## 示例 |
| +[`org.apache.shardingsphere.mode.repository.standalone.StandalonePersistRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-api/src/main/java/org/apache/shardingsphere/mode/repository/standalone/StandalonePersistRepository.java) |
| |
| -### StandalonePersistRepository |
| +### 定义 |
| |
| -| *已知实现类* | *详细说明* | |
| -| ----------------------------- | -------------------------- | |
| -| H2Repository | 基于 H2 的持久化 | |
| +单机模式配置信息持久化定义 |
| |
| -### ClusterPersistRepository |
| +### 已知实现 |
| |
| -| *已知实现类* | *详细说明* | |
| -| ----------------------------- | ------------------------- | |
| -| CuratorZookeeperRepository | 基于 ZooKeeper 的持久化 | |
| -| EtcdRepository | 基于 Etcd 的持久化 | |
| +| *配置标识* | *详细说明* | *全限定类名* | |
| +| -------------------- | -------------------- | ---------------------------- | |
| +| H2 | H2-based persistence | [`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) | |
| |
| -### GovernanceWatcher |
| +## ClusterPersistRepository |
| |
| -| *已知实现类* | *详细说明* | |
| -| ----------------------------- | ------------------ | |
| -| ComputeNodeStateChangedWatcher | 计算节点状态变化监听器 | |
| -| DatabaseLockChangedWatcher | 数据库锁状态变化监听器 | |
| -| DistributedLockChangedWatcher | 分布式锁变化监听器 | |
| -| GlobalRuleChangedWatcher | 全局规则配置变化监听器 | |
| -| MetaDataChangedWatcher | 元数据变化监听器 | |
| -| PropertiesChangedWatcher | 属性变化监听器 | |
| -| StorageNodeStateChangedWatcher | 存储节点状态变化监听器 | |
| +### 全限定类名 |
| + |
| +[`org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-api/src/main/java/org/apache/shardingsphere/mode/repository/cluster/ClusterPersistRepository.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/CuratorZookeeperRepository.java) | |
| +| 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) | |
| + |
| +## GovernanceWatcher |
| + |
| +### 全限定类名 |
| + |
| +[`org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.GovernanceWatcher`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/GovernanceWatcher.java) |
| + |
| +### 定义 |
| + |
| +治理监听器定义 |
| + |
| +### 已知实现 |
| + |
| +| *配置标识* | *详细说明* | *全限定类名* | |
| +| ----------------------------------------------------------------------- | --------------------------------------| ---------------------------- | |
| +| Types: ADDED, UPDATED, DELETED; WatchingKeys: /nodes/compute_nodes | 计算节点状态变化监听器 | [`org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.watcher.ComputeNodeStateChangedWatcher`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChangedWatcher.java) | |
| +| Types: ADDED, DELETED; WatchingKeys: /lock/database/locks | 数据库锁状态变化监听器 | [`org.apache.shardingsphere.mode.manager.cluster.coordinator.lock.database.watcher.DatabaseLockChangedWatcher`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/lock/database/watcher/DatabaseLockChangedWatcher.java) | |
| +| Types: ADDED, DELETED; WatchingKeys: /lock/distributed/locks | 分布式锁变化监听器 | [`org.apache.shardingsphere.mode.manager.cluster.coordinator.lock.distributed.watcher.DistributedLockChangedWatcher`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/lock/distributed/watcher/DistributedLockChangedWatcher.java) | |
| +| Types: UPDATED; WatchingKeys: /rules | 全局规则配置变化监听器 | [`org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.config.watcher.GlobalRuleChangedWatcher`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/config/watcher/GlobalRuleChangedWatcher.java) | |
| +| Types: ADDED, UPDATED, DELETED; WatchingKeys: /metadata/${databaseName} | 元数据变化监听器 | [`org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.metadata.watcher.MetaDataChangedWatcher`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/metadata/watcher/MetaDataChangedWatcher.java) | |
| +| Types: ADDED, UPDATED; WatchingKeys: /props | 属性变化监听器 | [`org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.config.watcher.PropertiesChangedWatcher`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/config/watcher/PropertiesChangedWatcher.java) | |
| +| Types: ADDED, UPDATED, DELETED; WatchingKeys: /nodes/storage_nodes | 存储节点状态变化监听器 | [`org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.storage.watcher.StorageNodeStateChangedWatcher`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/storage/watcher/StorageNodeStateChangedWatcher.java) | |