Sunil's Notes: HelloWorld - Apache Storm Word Counter program
HelloWorld - Apache Storm Word Counter program I wanted to learn Apache Storm so i started by creating this simple Hello World type Word counter program, the basic idea behind the program is it takes .txt file as input and passes it to LineReaderSpout.java, which reads the file one line at a time and passes it to Storm for further processing. Storm will pass each line to WordSpitterBolt.java, this class is responsible for splitting the line into multiple words and passing them back to Storm for further processing, The last part is WordCounterBolt.java which takes each of the word and maintains a HashMap of words with their frequency count. At the end the WordCounetrBolt.java will print all the words to the console. You can download the project from here First download the Apache Storm binaries from storm-project.net . In my case i did download storm-0.9.0.1, extract the content onto your local directory Create HelloStorm project in eclipse, add all .Read full article from Sunil's Notes: HelloWorld - Apache Storm Word Counter program
No comments:
Post a Comment