Kafka spout, sentiments bolt, and HDFS bolt

In this section, we are going to write/configure a Kafka spout to consume the tweets from the Kafka cluster. We are going to use the open source Storm spout connectors for consuming the data from Kafka:

  1. Create a new maven project with the groupID as com.stormadvance and artifactId as Kafka_twitter_topology.
  2. Add the following maven dependencies to the pom.xml file:
 <dependencies> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.9.13</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-client</artifactId> <version>2.2.0</version> <exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> ...

Get Mastering Apache Storm now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.