Github user harshach commented on a diff in the pull request:
https://github.com/apache/storm/pull/432#discussion_r26591966
--- Diff: storm-core/src/jvm/backtype/storm/utils/Utils.java ---
@@ -363,9 +384,30 @@ public static CuratorFramework newCurator(Map conf,
List<String> servers, Object
return builder.build();
}
- protected static void setupBuilder(CuratorFrameworkFactory.Builder
builder, String zkStr, Map conf, ZookeeperAuthInfo auth)
+ protected static void setupBuilder(CuratorFrameworkFactory.Builder
builder, final String zkStr, Map conf, ZookeeperAuthInfo auth)
{
- builder.connectString(zkStr)
+ List<String> exhibitorServers =
getStrings(conf.get(Config.STORM_EXHIBITOR_SERVERS));
+ if (!exhibitorServers.isEmpty()) {
+ // use exhibitor servers
+ builder.ensembleProvider(new ExhibitorEnsembleProvider(
+ new Exhibitors(exhibitorServers,
Utils.getInt(conf.get(Config.STORM_EXHIBITOR_PORT), 8080),
+ new Exhibitors.BackupConnectionStringProvider() {
+ @Override
+ public String getBackupConnectionString() throws
Exception {
+ // use zk servers as backup if they exist
+ return zkStr;
+ }}),
+ new DefaultExhibitorRestClient(),
+ (String) Utils.get(conf, Config.STORM_EXHIBITOR_URIPATH,
"/exhibitor/v1/cluster/list"),
--- End diff --
this should also be in defaults.yaml
---
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.
---