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:
- Create a new maven project with the
groupID
ascom.stormadvance
andartifactId
asKafka_twitter_topology
. - 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> ...