yangyichao-mango commented on a change in pull request #3244:
URL:
https://github.com/apache/incubator-dolphinscheduler/pull/3244#discussion_r456988311
##########
File path:
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistry.java
##########
@@ -83,19 +83,6 @@ public void registry() {
String address = NetUtils.getHost();
String localNodePath = getMasterPath();
zookeeperRegistryCenter.getZookeeperCachedOperator().persistEphemeral(localNodePath,
"");
-
zookeeperRegistryCenter.getZookeeperCachedOperator().getZkClient().getConnectionStateListenable().addListener(new
ConnectionStateListener() {
- @Override
- public void stateChanged(CuratorFramework client, ConnectionState
newState) {
- if(newState == ConnectionState.LOST){
- logger.error("master : {} connection lost from zookeeper",
address);
- } else if(newState == ConnectionState.RECONNECTED){
- logger.info("master : {} reconnected to zookeeper",
address);
-
zookeeperRegistryCenter.getZookeeperCachedOperator().persistEphemeral(localNodePath,
"");
- } else if(newState == ConnectionState.SUSPENDED){
- logger.warn("master : {} connection SUSPENDED ", address);
- }
- }
- });
Review comment:
Hi,
Good job,
But why we need to delete the state changed and log for record the master
address from `MasterRegistry`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]