Databases Reference
In-Depth Information
This can be described as two different steps, or phases:
The processing phase
A fully parallel phase, many batches are executed at the same time.
The commit phase
A strongly ordered phase, batch two is not committed until batch one has com-
mitted successfully.
Call both of these phases a Storm Transaction .
Storm uses Zookeeper to store transaction metadata. By default the one
used for the topology, will be used to store the metadata. You can change
this by overriding the configuration key transactional.zoo-
keeper.servers and transactional.zookeeper.port .
Transactions in Action
To see how transactions work, you'll create a Twitter analytics tool. You'll be reading
tweets stored in a Redis database, process them through a few bolts, and store—in
another Redis database—the list of all hashtags and their frequency among the tweets,
the list of all users and amount of tweets they appear in, and a list of users with their
hashtags and frequency.
The topology you'll build for this tool is described in Figure 8-1 .
Figure 8-1. Topology overview
As you can see, TweetsTransactionalSpout is the spout that will be connecting to your
tweets database and will be emitting batches of tuples across the topology. Two dif-
 
Search WWH ::




Custom Search