Can Java – Apache storm sprouts communicate with each other?

I have a directory and another process imports files

Our current storm implementation reads this directory, selects the oldest file and opens the file reader This reader is saved as a field in spuut, so when nexttuple() is called, a line will be output from the file Once the nozzle finishes reading, it will close the reader and open a new reader to a new file

In order to increase throughput, one idea is to let multiple sputs read multiple files at the same time, because these sputs will compete on the same files in the same directory. Is there a way to communicate between sputs so that they can negotiate which files to read? (or there is a general manager who assigns documents to spots)

Directories and files are stored in and read from HDFS

Solution

I think it's out of the box. There's no way for the two nozzles to communicate together

Basesignalspout relies on zookeeper to send messages between storm components

I hope it helps!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>