Github user tillrohrmann commented on the issue:
https://github.com/apache/flink/pull/3617
Thanks for your contribution @WangTaoTheTonic. Your observation of the
problem is correct.
Actually I'm also working on refactoring the usage of the ZooKeeper based
leader election and retrieval services. The respective issue is
[FLINK-6078](https://issues.apache.org/jira/browse/FLINK-6078). The problem is
not only creating a single curator framework but also preventing the leader
retrieval and election services from closing it when shutting down the
respective service. Moreover, we should use the newly introduced
`HighAvailabilityServices` as a factory for the services. That way the service
instantiation can be controlled from a single place.
Given that, I think that we can close this PR. I will open a PR for
FLINK-6078 in the next days. Feel free to review it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---