// Load the config.yaml file specified as the first argument.
CalculatorConfiguration config = ConfigurationFactory
.forClass(CalculatorConfiguration.class, new Validator())
.build(new File(args[0]));
CuratorFramework curator = config.getZooKeeperConfiguration().newCurator();
curator.start();
// Connection caching is optional, but included here for the sake of demonstration.
ServiceCachingPolicy cachingPolicy = new ServiceCachingPolicyBuilder()
.withMaxNumServiceInstances(10)
.withMaxNumServiceInstancesPerEndPoint(1)