Example: Processing MapR Streams with Storm

The Storm installation directory contains example programs. stormStreamsTest is an example program that integrate Storm with MapR Streams.

The stormStreamsTest example performs the following steps:

  1. Reads messages from a topic.
  2. Calculates amount of message passed through the topology in 5 seconds.
  3. Sends the calculated number of messages to a topic.
  4. Sends a copy of the source data to a topic.

For more information, see the source code and a README file in the following location: /opt/mapr/storm/storm-<version>/examples/stormStreamsTest.

NOTE: The storm topology defined in the example uses the following syntax:
storm jar [jar file] [topology][zookeeperHost:port] [bootstrap server host:port] [use kafka
      09 API: true/false] [topic to read from] [topic to write to] [topic to send duplicated
      source data]
The [zookeeperHost:port] and [bootstrapServer:port] are ignored when you run submit the Storm topology to MapR Streams. Regardless, including the placeholder text is required.
For example, when you submit the topology to MapR Streams the following statement can be used:
storm jar storm-streams-test-1.0-jar-with-dependencies.jar storm.example.DemoTopology
      localhost:5181 localhost:9092 true /streaming_data/marlin:events
      /streaming_data/marlin:average /streaming_data/marlin:trash