You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2022/07/19 03:17:37 UTC
[shardingsphere] branch master updated: Update dev-manual/mode doc (#19343)
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 eb86899de7f Update dev-manual/mode doc (#19343)
eb86899de7f is described below
commit eb86899de7f9719bd19e2958cb7bceb3a1185130
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Tue Jul 19 11:17:32 2022 +0800
Update dev-manual/mode doc (#19343)
---
docs/document/content/dev-manual/mode.cn.md | 1 -
docs/document/content/dev-manual/mode.en.md | 29 +++++++++++-----------
.../config/watcher/PropertiesChangedWatcher.java | 2 +-
3 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/docs/document/content/dev-manual/mode.cn.md b/docs/document/content/dev-manual/mode.cn.md
index 3ab24e8e66a..e7b993dd6ab 100644
--- a/docs/document/content/dev-manual/mode.cn.md
+++ b/docs/document/content/dev-manual/mode.cn.md
@@ -19,7 +19,6 @@ chapter = true
| *已知实现类* | *详细说明* |
| ----------------------------- | -------------------------- |
-| FileRepository | 基于 File 的持久化 |
| H2Repository | 基于 H2 的持久化 |
### ClusterPersistRepository
diff --git a/docs/document/content/dev-manual/mode.en.md b/docs/document/content/dev-manual/mode.en.md
index b7db5729285..134957a3e25 100644
--- a/docs/document/content/dev-manual/mode.en.md
+++ b/docs/document/content/dev-manual/mode.en.md
@@ -17,10 +17,9 @@ Standalone mode configuration information persistence definition
### Implementation classes
-| *Configuration Type* | *Description* | *Fully-qualified class name* |
-| -------------------- | ----------------------------------------- | ---------------------------- |
-| FileRepository | File-based persistence | [`..`]() |
-| 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-h2/src/main/java/org/apache/shardingsphere/mode/repository/standalone/h2/H2Repository.java) |
+| *Configuration Type* | *Description* | *Fully-qualified class name* |
+| -------------------- | -------------------- | ---------------------------- |
+| 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-h2/src/main/java/org/apache/shardingsphere/mode/repository/standalone/h2/H2Repository.java) |
## ClusterPersistRepository
@@ -36,8 +35,8 @@ Cluster mode configuration information persistence definition
| *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/Curato [...]
-| 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) |
+| 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) |
## GovernanceWatcher
@@ -51,12 +50,12 @@ Governance listener definition
### Implementation classes
-| *Configuration Type* | *Description* | *Fully-qualified class name* |
-| -------------------- | ----------------------------------------- | ---------------------------- |
-| Arrays.asList(Type.ADDED, Type.UPDATED, Type.DELETED) , Collections.singleton(ComputeNode.getComputeNodePath()) | Compute node state change listener | [`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/c [...]
-| Arrays.asList(Type.ADDED, Type.DELETED) , Collections.singleton(lockNode.getLocksNodePath()) | Database lock state change listener | [`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/data [...]
-| Arrays.asList(Type.ADDED, Type.DELETED) , Collections.singleton(lockNode.getLocksNodePath()) | Distributed lock change listener | [`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/ [...]
-| Collections.singleton(Type.UPDATED) , Collections.singleton(GlobalNode.getGlobalRuleNode()) | The global rule configuration change listener | [`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/reg [...]
-| Arrays.asList(Type.ADDED, Type.UPDATED, Type.DELETED) , Collections.singleton(DatabaseMetaDataNode.getMetaDataNodePath()) | Metadata change listener | [`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/c [...]
-| Arrays.asList(Type.UPDATED, Type.ADDED) , Collections.singleton(GlobalNode.getPropsPath()) | Property change listener | [`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/wat [...]
-| Arrays.asList(Type.ADDED, Type.UPDATED, Type.DELETED) , Collections.singletonList(StorageNode.getRootPath()) | Storage node state change listener | [`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/clus [...]
+| *Configuration Type* | *Description* | *Fully-qualified class name* |
+| ----------------------------------------------------------------------- | --------------------------------------------- | ---------------------------- |
+| Types: ADDED, UPDATED, DELETED; WatchingKeys: /nodes/compute_nodes | Compute node state change listener | [`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/s [...]
+| Types: ADDED, DELETED; WatchingKeys: /lock/database/locks | Database lock state change listener | [`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/Da [...]
+| Types: ADDED, DELETED; WatchingKeys: /lock/distributed/locks | Distributed lock change listener | [`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/w [...]
+| Types: UPDATED; WatchingKeys: /rules | The global rule configuration change listener | [`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/ [...]
+| Types: ADDED, UPDATED, DELETED; WatchingKeys: /metadata/${databaseName} | Metadata change listener | [`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/watche [...]
+| Types: ADDED, UPDATED; WatchingKeys: /props | Property change listener | [`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/ [...]
+| Types: ADDED, UPDATED, DELETED; WatchingKeys: /nodes/storage_nodes | Storage node state change listener | [`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/s [...]
diff --git a/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 b/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
index b98551e8536..bab7e060a8c 100644
--- a/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
+++ b/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
@@ -42,7 +42,7 @@ public final class PropertiesChangedWatcher implements GovernanceWatcher<Propert
@Override
public Collection<Type> getWatchingTypes() {
- return Arrays.asList(Type.UPDATED, Type.ADDED);
+ return Arrays.asList(Type.ADDED, Type.UPDATED);
}
@Override