You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/07/14 03:00:33 UTC

[GitHub] [dolphinscheduler] wen-hemin commented on a change in pull request #5814: [Improvement][Api Module] refactor registry client, remove spring annotation

wen-hemin commented on a change in pull request #5814:
URL: https://github.com/apache/dolphinscheduler/pull/5814#discussion_r669244844



##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/RegistryCenterUtils.java
##########
@@ -106,11 +99,23 @@ public void initRegistry() {
         return list;
     }
 
-    public Map<String, String> getServerMaps(NodeType nodeType, boolean hostOnly) {
+    public static Map<String, String> getServerMaps(NodeType nodeType, boolean hostOnly) {
         return registryClient.getServerMaps(nodeType, hostOnly);
     }
 
-    public List<String> getServerNodeList(NodeType nodeType, boolean hostOnly) {
+    public static List<String> getServerNodeList(NodeType nodeType, boolean hostOnly) {
         return registryClient.getServerNodeList(nodeType, hostOnly);
     }
+
+    public static boolean isExisted(String key) {
+        return registryClient.isExisted(key);
+    }
+
+    public static List<String> getChildrenKeys(final String key) {

Review comment:
       Thx, I will fix

##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkerGroupServiceImpl.java
##########
@@ -147,7 +137,7 @@ private boolean checkWorkerGroupNameExists(WorkerGroup workerGroup) {
         }
         // check zookeeper
         String workerGroupPath = Constants.REGISTRY_DOLPHINSCHEDULER_WORKERS + Constants.SLASH + workerGroup.getName();
-        return registryClient.isExisted(workerGroupPath);
+        return RegistryCenterUtils.isExisted(workerGroupPath);

Review comment:
       Thx, I will fix




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org