ruanwenjun commented on code in PR #12980:
URL:
https://github.com/apache/dolphinscheduler/pull/12980#discussion_r1030989212
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/ServerNodeManager.java:
##########
@@ -241,8 +235,7 @@ private void updateMasterNodes() {
try {
registryClient.getLock(nodeLock);
Collection<String> currentNodes =
registryClient.getMasterNodesDirectly();
- List<Server> masterNodes =
registryClient.getServerList(NodeType.MASTER);
- syncMasterNodes(currentNodes, masterNodes);
+ syncMasterNodes(currentNodes,
registryClient.getServerList(NodeType.MASTER));
Review Comment:
There is no need to do this code change.
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/ServerNodeManager.java:
##########
@@ -153,29 +153,15 @@ class WorkerNodeInfoAndGroupDbSyncTask implements
Runnable {
@Override
public void run() {
try {
-
// sync worker node info
updateWorkerNodes();
updateWorkerGroupMappings();
- notifyWorkerInfoChangeListeners();
Review Comment:
Why you remove this? this is used to notifier the `LowerWeightHostManager`
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/ServerNodeManager.java:
##########
@@ -382,10 +366,8 @@ public synchronized void
addWorkerInfoChangeListener(WorkerInfoChangeListener li
}
private void notifyWorkerInfoChangeListeners() {
- Map<String, Set<String>> workerGroupNodes = getWorkerGroupNodes();
- Map<String, WorkerHeartBeat> workerNodeInfo = getWorkerNodeInfo();
for (WorkerInfoChangeListener listener : workerInfoChangeListeners) {
- listener.notify(workerGroupNodes, workerNodeInfo);
+ listener.notify(getWorkerGroupNodes(), getWorkerNodeInfo());
Review Comment:
I don't think this will make the code clean.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]