|
|
@ -16,6 +16,8 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
package org.apache.dolphinscheduler.service.zk; |
|
|
|
package org.apache.dolphinscheduler.service.zk; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.common.thread.ThreadUtils; |
|
|
|
|
|
|
|
|
|
|
|
import org.apache.curator.framework.CuratorFramework; |
|
|
|
import org.apache.curator.framework.CuratorFramework; |
|
|
|
import org.apache.curator.framework.recipes.cache.ChildData; |
|
|
|
import org.apache.curator.framework.recipes.cache.ChildData; |
|
|
|
import org.apache.curator.framework.recipes.cache.TreeCache; |
|
|
|
import org.apache.curator.framework.recipes.cache.TreeCache; |
|
|
@ -83,10 +85,7 @@ public class ZookeeperCachedOperator extends ZookeeperOperator { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void close() { |
|
|
|
public void close() { |
|
|
|
treeCache.close(); |
|
|
|
treeCache.close(); |
|
|
|
try { |
|
|
|
ThreadUtils.sleep(500); |
|
|
|
Thread.sleep(500); |
|
|
|
|
|
|
|
} catch (InterruptedException ignore) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
super.close(); |
|
|
|
super.close(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|