Book Image

Real-time Analytics with Storm and Cassandra

By : Shilpi Saxena
Book Image

Real-time Analytics with Storm and Cassandra

By: Shilpi Saxena

Overview of this book

Table of Contents (19 chapters)
Real-time Analytics with Storm and Cassandra
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Executing the topology from Command Prompt


Once the UI is visible and all the daemons are started, the topology can be submitted on Nimbus using the following command:

storm jar storm-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jar  storm.starter.WordCountTopology WordCount -c nimbus.host=localhost

The Storm UI with the WordCount topology running in distributed mode is shown here. It depicts the topology state, uptime, and other details (we shall discuss the features of the UI in detail in a later chapter). We can kill the topology from the UI.

Tweaking the WordCount topology to customize it

Now that we have deployed the WordCount topology in distributed mode, let's tweak the code in the bolts a bit to write WordCount onto a file. To achieve this, we will proceed with the following steps:

  1. We intend to create a new bolt, FileWriterBolt, to achieve this. Open WordCountTopology.java and add the following snippet to WordCountTopology.java:

    public static class FileWriterBolt extends BaseBasicBolt...