-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to connect to ES Cluster because of blank ES Cluster name and HOST properties #8
Comments
Hi, |
The settings we are passing to ClientFactoty.Transport (see below) method has all the ES related configuration but in the makeClient method of Transport class we are picking ES host and name properties from different configuration map (which contains only storm related configurations not the one which we set)?? Settings settings = ImmutableSettings.settingsBuilder().put("storm.elasticsearch.hosts", "localhost").put("storm.elasticsearch.cluster.name", "testingcluster").build(); StateFactory stateFactory = ESIndexMapState.nonTransactional(new ClientFactory.Transport(settings.getAsMap()), Map.class); |
Actually, properties should be set into the storm configuration :
Then, you can instantiate your StateFactory as follows :
|
Yes it can be done that way but then what kind of settings should we set in Transport class? |
In the Elastic Search ClientFactory.java makeClient() (under static class Transport) method is not getting elastic search properties from settings map instead it tries to get HOST and CLUSTER name from storm configuration map (in which these are not present).
@OverRide
public TransportClient makeClient(Map conf) {
String clusterHosts = (String)settings.get(HOSTS); // instead of conf.get(HOSTS);
String clusterName = (String)settings.get(NAME); // instead of conf.get(NAME);
Preconditions.checkNotNull(clusterHosts,"no setting found for Transport Client, make sure that you set property " + HOSTS);
........................
The text was updated successfully, but these errors were encountered: