Database Reference
In-Depth Information
Now that the storm-start jar file is built, I can run a topology from its contents. Remember that this topology will
run forever, processing a simulated data feed created by the example code. So, I run the exclamation topology, which
just randomly adds exclamation marks to the incoming data. (This may seem like a simple process, but the aim here is
to show how to use and run topologies on Storm. Later, you can investigate building and running your own.) The storm
command line tool launches the topology onto the cluster and has four parameters. The first is the jar parameter,
which is followed by the jar file name that was just built. The third and fourth are the class name and topology name:
storm jar target/storm-starter-*-incubating-jar-with-dependencies.jar \
storm.starter.ExclamationTopology \
exclamation-topology
I now check the status of the topology on the cluster by using the Storm list option. The output that follows
shows that the topology is active, provides timing information, and shows the number of tasks:
[hadoop@hc1nn starter]$ storm list
Topology_name Status Num_tasks Num_workers Uptime_secs
-----------------------------------------------------------------------------------
exclamation-topology ACTIVE 18 3 62
As mentioned, this topology will run forever, providing a series of snapshots of data processed within given data
windows. If I check the Storm user interface (Figure 6-8 ), I see that there is an active topology called “exclamation-
topology” shown in the Topology Summary section.
Figure 6-8. Storm user interface with running topology
By clicking on the topology name in the user interface, I can drill down into the topology to get more information.
The detailed topology view in Figure 6-9 gives information about the spouts and bolts within the topology, for
example. Remember that spouts provide data sources while bolts process the streams of data. My example includes a
single spout data source, called “word,” whose data is being passed to two bolts, called “exclaim1” and “exclaim2.” The
detailed topology view also lists the volume of data processed and the number of tasks involved.
 
Search WWH ::




Custom Search