[GitHub] incubator-eagle pull request #684: [EAGLE-800] Use InterProcessMutex to sync...
Github user r7raul1984 commented on a diff in the pull request: https://github.com/apache/incubator-eagle/pull/684#discussion_r89582088 --- Diff: eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/jobrecover/RunningJobManager.java --- @@ -49,12 +52,14 @@ private CuratorFramework newCurator(String zkQuorum, int zkSessionTimeoutMs, int ); } -public RunningJobManager(String zkQuorum, int zkSessionTimeoutMs, int zkRetryTimes, int zkRetryInterval, String zkRoot) { +public RunningJobManager(String zkQuorum, int zkSessionTimeoutMs, int zkRetryTimes, int zkRetryInterval, String zkRoot, String lockPath) { this.zkRoot = zkRoot; +curator = newCurator(zkQuorum, zkSessionTimeoutMs, zkRetryTimes, zkRetryInterval); +curator.start(); --- End diff -- In the future,we should follow http://stackoverflow.com/questions/20384869/when-curatorframeworks-methods-start-and-close-shoud-be-called --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-eagle pull request #684: [EAGLE-800] Use InterProcessMutex to sync...
Github user wujinhu commented on a diff in the pull request: https://github.com/apache/incubator-eagle/pull/684#discussion_r89567435 --- Diff: eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/jobrecover/RunningJobManager.java --- @@ -49,12 +53,21 @@ private CuratorFramework newCurator(String zkQuorum, int zkSessionTimeoutMs, int ); } -public RunningJobManager(String zkQuorum, int zkSessionTimeoutMs, int zkRetryTimes, int zkRetryInterval, String zkRoot) { +public RunningJobManager(String zkQuorum, int zkSessionTimeoutMs, int zkRetryTimes, int zkRetryInterval, String zkRoot, String siteId) { --- End diff -- I think pass the lock path to utility class directly will be better since utility class does not need to know how to make the lock path. How to define the lock path is decided by applications --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---