Creating our final topology consists of the following steps:
Let's look at the TwitterGraphTopology class in detail.
public class TwitterGraphTopology { public static StormTopology buildTopology() { TridentTopology topology = new TridentTopology(); StaticHosts kafkaHosts = StaticHosts.fromHostString(Arrays.asList(new String[] { "localhost" }), 1); TridentKafkaConfig spoutConf = new TridentKafkaConfig(kafkaHosts, "twitter-feed"); spoutConf.scheme = new StringScheme(); spoutConf.forceStartOffsetTime(-2); OpaqueTridentKafkaSpout spout = new OpaqueTridentKafkaSpout(spoutConf); Stream spoutStream = topology.newStream("kafka-stream", spout); Fields jsonFields = new Fields("timestamp...