Radeity commented on code in PR #14887:
URL:
https://github.com/apache/dolphinscheduler/pull/14887#discussion_r1320808986
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/ServerNodeManager.java:
##########
@@ -210,40 +213,59 @@ class MasterDataListener implements SubscribeListener {
public void notify(Event event) {
final String path = event.path();
final Type type = event.type();
+ final String data = event.data();
if (registryClient.isMasterPath(path)) {
try {
+ String[] parts = path.split("/");
+ final String masterAddress = parts[parts.length - 1];
if (type.equals(Type.ADD)) {
log.info("master node : {} added.", path);
updateMasterNodes();
- }
- if (type.equals(Type.REMOVE)) {
+ } else if (type.equals(Type.REMOVE)) {
log.info("master node : {} down.", path);
updateMasterNodes();
alertDao.sendServerStoppedAlert(1, path, "MASTER");
+ } else if (type == Type.UPDATE) {
Review Comment:
Okay, I will move all slot-related info to `MasterSlotManager`, but it seems
that whenever we receive `ADD/UPDATE/DELETE` event, we all have to update
master heartbeat info and call `MasterSlotManager` to update slot.
--
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]