def create_mock_medium_topology(<EOL>self,<EOL>spout_parallelism=<NUM_LIT:1>,<EOL>bolt1_parallelism=<NUM_LIT:1>,<EOL>bolt2_parallelism=<NUM_LIT:1>,<EOL>bolt3_parallelism=<NUM_LIT:1>):
topology = protoTopology.Topology()<EOL>topology.id = "<STR_LIT>"<EOL>topology.name = "<STR_LIT>"<EOL>stream1 = protoTopology.StreamId()<EOL>stream1.id = "<STR_LIT>"<EOL>stream1.component_name = "<STR_LIT>"<EOL>stream2 = protoTopology.StreamId()<EOL>stream2.id = "<STR_LIT>"<EOL>stream2.component_name = "<STR_LIT>"<EOL>stream3 = protoTopology.StreamId()<EOL>stream3.id = "<STR_LIT>"<EOL>stream3.component_name = "<STR_LIT>"<EOL>stream4 = protoTopology.StreamId()<EOL>stream4.id = "<STR_LIT>"<EOL>stream4.component_name = "<STR_LIT>"<EOL>spout1 = self.create_mock_spout("<STR_LIT>",<EOL>[stream1, stream2],<EOL>spout_parallelism)<EOL>topology.spouts.extend([spout1])<EOL>bolt1 = self.create_mock_bolt("<STR_LIT>",<EOL>[stream1],<EOL>[stream3],<EOL>bolt1_parallelism)<EOL>bolt2 = self.create_mock_bolt("<STR_LIT>",<EOL>[stream2],<EOL>[stream4],<EOL>bolt2_parallelism)<EOL>bolt3 = self.create_mock_bolt("<STR_LIT>",<EOL>[stream3, stream4],<EOL>[],<EOL>bolt3_parallelism)<EOL>topology.bolts.extend([bolt1, bolt2, bolt3])<EOL>return topology<EOL>
Medium topology is a three stage topology
with one spout, two mid stage bolts, and one
last stage bolt.
S -str1-> B1 -str3-> B3
S -str2-> B2 -str4-> B3