java - Define SpoutConfig parameter -


i have storm topology in using kafkaspout.

brokerhosts zk = new zkhosts("localhost:2181"); spoutconfig spoutconf = new spoutconfig(zk, "topic", "/topic", "discovery"); 

i want know 3rd , 4th parameter passed in spoutconfig.

  • is 3rd parameter, zookeeper root path zookeeper install or datadir path?

  • the 4th parameter id, don't know why used , should have give?

zkroot , id used construct zookeeper path under storm stores kafka offset. can read here.

the spout stores state of offsets consumed in zookeeper. spout parameterized root path store offsets , id particular spout. offsets partitions stored in these paths, "0", "1" ids partitions:

{root path}/{id}/0
{root path}/{id}/1
{root path}/{id}/2
{root path}/{id}/3
...


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -