|
|
@ -19,7 +19,6 @@ package org.apache.dolphinscheduler.server.master.registry; |
|
|
|
import org.apache.curator.framework.CuratorFramework; |
|
|
|
import org.apache.curator.framework.CuratorFramework; |
|
|
|
import org.apache.curator.framework.state.ConnectionState; |
|
|
|
import org.apache.curator.framework.state.ConnectionState; |
|
|
|
import org.apache.curator.framework.state.ConnectionStateListener; |
|
|
|
import org.apache.curator.framework.state.ConnectionStateListener; |
|
|
|
import org.apache.dolphinscheduler.common.Constants; |
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.common.utils.DateUtils; |
|
|
|
import org.apache.dolphinscheduler.common.utils.DateUtils; |
|
|
|
import org.apache.dolphinscheduler.common.utils.NetUtils; |
|
|
|
import org.apache.dolphinscheduler.common.utils.NetUtils; |
|
|
|
import org.apache.dolphinscheduler.remote.utils.NamedThreadFactory; |
|
|
|
import org.apache.dolphinscheduler.remote.utils.NamedThreadFactory; |
|
|
@ -37,8 +36,6 @@ import java.util.concurrent.Executors; |
|
|
|
import java.util.concurrent.ScheduledExecutorService; |
|
|
|
import java.util.concurrent.ScheduledExecutorService; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
|
|
|
|
|
|
|
|
import static org.apache.dolphinscheduler.remote.utils.Constants.COMMA; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* master registry |
|
|
|
* master registry |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -113,6 +110,7 @@ public class MasterRegistry { |
|
|
|
public void unRegistry() { |
|
|
|
public void unRegistry() { |
|
|
|
String address = getLocalAddress(); |
|
|
|
String address = getLocalAddress(); |
|
|
|
String localNodePath = getMasterPath(); |
|
|
|
String localNodePath = getMasterPath(); |
|
|
|
|
|
|
|
heartBeatExecutor.shutdownNow(); |
|
|
|
zookeeperRegistryCenter.getZookeeperCachedOperator().remove(localNodePath); |
|
|
|
zookeeperRegistryCenter.getZookeeperCachedOperator().remove(localNodePath); |
|
|
|
logger.info("master node : {} unRegistry to ZK.", address); |
|
|
|
logger.info("master node : {} unRegistry to ZK.", address); |
|
|
|
} |
|
|
|
} |
|
|
|