You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2021/09/18 09:30:29 UTC

[shardingsphere] branch master updated: Rename privilege_nodes (#12555)

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

menghaoran 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 35a9113  Rename privilege_nodes (#12555)
35a9113 is described below

commit 35a9113ad3d848245bfba8bbd8b16e9782b8c408
Author: Liang Zhang <te...@163.com>
AuthorDate: Sat Sep 18 17:29:57 2021 +0800

    Rename privilege_nodes (#12555)
---
 .../registry/status/compute/node/ComputeStatusNode.java           | 8 ++++----
 .../registry/status/storage/node/StorageStatusNode.java           | 8 ++++----
 .../coordinator/registry/status/user/node/UserStatusNode.java     | 4 ++--
 .../coordinator/registry/status/user/node/UserStatusNodeTest.java | 2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

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/status/compute/node/ComputeStatusNode.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/status/compute/node/ComputeStatusNode.java
index 384954c..b48f707 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/status/compute/node/ComputeStatusNode.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/status/compute/node/ComputeStatusNode.java
@@ -28,7 +28,7 @@ import org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.statu
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
 public final class ComputeStatusNode {
     
-    private static final String COMPUTE_NODE = "compute_nodes";
+    private static final String COMPUTE_NODES = "compute_nodes";
     
     /**
      * Get compute node root path.
@@ -36,7 +36,7 @@ public final class ComputeStatusNode {
      * @return root path of compute node
      */
     public static String getRootPath() {
-        return String.join("/", "", StatusNode.ROOT_NODE, COMPUTE_NODE);
+        return String.join("/", "", StatusNode.ROOT_NODE, COMPUTE_NODES);
     }
     
     /**
@@ -46,7 +46,7 @@ public final class ComputeStatusNode {
      * @return status path of compute node
      */
     public static String getStatusPath(final ComputeNodeStatus status) {
-        return String.join("/", "", StatusNode.ROOT_NODE, COMPUTE_NODE, status.name().toLowerCase());
+        return String.join("/", "", StatusNode.ROOT_NODE, COMPUTE_NODES, status.name().toLowerCase());
     }
     
     /**
@@ -57,6 +57,6 @@ public final class ComputeStatusNode {
      * @return status path of compute node
      */
     public static String getStatusPath(final ComputeNodeStatus status, final String instanceId) {
-        return String.join("/", "", StatusNode.ROOT_NODE, COMPUTE_NODE, status.name().toLowerCase(), instanceId);
+        return String.join("/", "", StatusNode.ROOT_NODE, COMPUTE_NODES, status.name().toLowerCase(), instanceId);
     }
 }
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/status/storage/node/StorageStatusNode.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/status/storage/node/StorageStatusNode.java
index 14637d2..b2a9d78 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/status/storage/node/StorageStatusNode.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/status/storage/node/StorageStatusNode.java
@@ -33,7 +33,7 @@ import java.util.regex.Pattern;
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
 public final class StorageStatusNode {
     
-    private static final String STORAGE_NODE = "storage_nodes";
+    private static final String STORAGE_NODES = "storage_nodes";
     
     /**
      * Get storage node root path.
@@ -41,7 +41,7 @@ public final class StorageStatusNode {
      * @return root path of storage node
      */
     public static String getRootPath() {
-        return String.join("/", "", StatusNode.ROOT_NODE, STORAGE_NODE);
+        return String.join("/", "", StatusNode.ROOT_NODE, STORAGE_NODES);
     }
     
     /**
@@ -51,7 +51,7 @@ public final class StorageStatusNode {
      * @return status path of storage node
      */
     public static String getStatusPath(final StorageNodeStatus status) {
-        return String.join("/", "", StatusNode.ROOT_NODE, STORAGE_NODE, status.name().toLowerCase());
+        return String.join("/", "", StatusNode.ROOT_NODE, STORAGE_NODES, status.name().toLowerCase());
     }
     
     /**
@@ -62,7 +62,7 @@ public final class StorageStatusNode {
      * @return status path of storage node
      */
     public static String getStatusPath(final StorageNodeStatus status, final ClusterSchema schema) {
-        return String.join("/", "", StatusNode.ROOT_NODE, STORAGE_NODE, status.name().toLowerCase(), schema.toString());
+        return String.join("/", "", StatusNode.ROOT_NODE, STORAGE_NODES, status.name().toLowerCase(), schema.toString());
     }
     
     /**
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/status/user/node/UserStatusNode.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/status/user/node/UserStatusNode.java
index 0a76490..a6ca25a 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/status/user/node/UserStatusNode.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/status/user/node/UserStatusNode.java
@@ -27,7 +27,7 @@ import org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.statu
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
 public final class UserStatusNode {
     
-    private static final String PRIVILEGE_NODE = "privilegenode";
+    private static final String PRIVILEGE_NODES = "privilege_nodes";
     
     /**
      * Get privilege node path.
@@ -35,6 +35,6 @@ public final class UserStatusNode {
      * @return privilege node path
      */
     public static String getPrivilegeNodePath() {
-        return String.join("/", "", StatusNode.ROOT_NODE, PRIVILEGE_NODE);
+        return String.join("/", "", StatusNode.ROOT_NODE, PRIVILEGE_NODES);
     }
 }
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/user/node/UserStatusNodeTest.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/user/node/UserStatusNodeTest.java
index eec4b1a..ad3cf02 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/user/node/UserStatusNodeTest.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/user/node/UserStatusNodeTest.java
@@ -26,6 +26,6 @@ public final class UserStatusNodeTest {
     
     @Test
     public void assertGetPrivilegeNodePath() {
-        assertThat(UserStatusNode.getPrivilegeNodePath(), is("/status/privilegenode"));
+        assertThat(UserStatusNode.getPrivilegeNodePath(), is("/status/privilege_nodes"));
     }
 }