Skip to content

Commit

Permalink
Setting namespace on the curator instance
Browse files Browse the repository at this point in the history
  • Loading branch information
santanusinha committed Mar 22, 2016
1 parent 5df1b56 commit a868b25
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ public void initialize(Bootstrap<?> bootstrap) {
public void run(T configuration, Environment environment) throws Exception {
serviceDiscoveryConfiguration = getRangerConfiguration(configuration);
val objectMapper = environment.getObjectMapper();
CuratorFramework curator = CuratorFrameworkFactory.newClient(
serviceDiscoveryConfiguration.getZookeeper(),
new RetryForever(serviceDiscoveryConfiguration.getConnectionRetryIntervalMillis()));
final String namespace = serviceDiscoveryConfiguration.getNamespace();
final String serviceName = getServiceName(configuration);
final String hostname = getHost();
final int port = getPort(configuration);
CuratorFramework curator = CuratorFrameworkFactory.builder()
.connectString(serviceDiscoveryConfiguration.getZookeeper())
.namespace(namespace)
.retryPolicy(new RetryForever(serviceDiscoveryConfiguration.getConnectionRetryIntervalMillis()))
.build();

serviceProvider = ServiceProviderBuilders.<ShardInfo>shardedServiceProviderBuilder()
.withCuratorFramework(curator)
Expand Down

0 comments on commit a868b25

Please sign in to comment.