Skip to content

Instantly share code, notes, and snippets.

@ericacm
Last active December 11, 2015 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericacm/4588071 to your computer and use it in GitHub Desktop.
Save ericacm/4588071 to your computer and use it in GitHub Desktop.
class ZookeeperService(hostInfo: HostInfo)
extends ClusterService with EmbeddedZookeeper {
def nodeId: String = hostInfo.hostname + ":" + hostInfo.basePort + 1
@Value("${zookeeperService.client.enabled:false}")
var enabled: Boolean = _
@Value("${zookeeperService.leaderPath:/ls}")
var leaderPath: String = _
@Value("${zookeeperService.sessionTimeoutSec:30}")
var sessionTimeoutSec: Int = _
@Value("${zookeeperService.connectionTimeoutSec:5}")
var connectionTimeoutSec: Int = _
var curatorFramework: CuratorFramework = _
var leaderLatch: LeaderLatch = _
// ClusterService implementation
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment