topology.newStream("parallel", spout).each(new Fields("text", "actor"), new PereTweetsFilter())
.parallelismHint(5).each(new Fields("text", "actor"), new Utils.PrintFilter());
// A stream can be partitioned in various ways.
// Let's partition it by "actor". What happens with previous example?
topology.newStream("parallel_and_partitioned", spout).partitionBy(new Fields("actor"))
.each(new Fields("text", "actor"), new PereTweetsFilter()).parallelismHint(5)
.each(new Fields("text", "actor"), new Utils.PrintFilter());
// Only one partition is filtering, which makes sense for the case.
// If we remove the partitionBy we get the previous behavior.