While submitting storm topology on production cluster, if you mention zookeeper server as mentioned below then it will through the exception
Config conf = new Config();
conf.put(Config.NIMBUS_HOST, "nimbus-ip");
conf.put(Config.NIMBUS_THRIFT_PORT,6627);
conf.put(Config.STORM_ZOOKEEPER_PORT,2181);
conf.put(Config.STORM_ZOOKEEPER_SERVERS,"zkerver-ip");
3126 [main] WARN backtype.storm.StormSubmitter - Topology submission exception: Field storm.zookeeper.servers must be an Iterable of java.lang.String
Exception in thread "main" InvalidTopologyException(msg:Field storm.zookeeper.servers must be an Iterable of java.lang.String)
at backtype.storm.generated.Nimbus$submitTopology_result.read(Nimbus.java:2466)
at org.apache.thrift7.TServiceClient.receiveBase(TServiceClient.java:78)
at backtype.storm.generated.Nimbus$Client.recv_submitTopology(Nimbus.java:162)
at backtype.storm.generated.Nimbus$Client.submitTopology(Nimbus.java:146)
at backtype.storm.StormSubmitter.submitTopology(StormSubmitter.java:127)
at backtype.storm.StormSubmitter.submitTopology(StormSubmitter.java:70)
at com.cisco.PrimeNumberTopology.main(PrimeNumberTopology.java:40)
Solution:
create a list of zookeeper objects
List<String> li=new ArrayList<String>();
li.add("zkserver-1");
and change the above configuration line:
conf.put(Config.STORM_ZOOKEEPER_SERVERS,li);
li.add("zkserver-1");
and change the above configuration line:
conf.put(Config.STORM_ZOOKEEPER_SERVERS,li);
No comments:
Post a Comment