Now, we are creating a new topology, which will read the data from Kafka using the KafkaSpout spout. In this section, we are writing an ApacheLogSplitter bolt, that has a logic to fetch the IP, status code, referrer, bytes sent, and so on, information from the Apache log line. As this is a new topology, we must first create the new project.
- Create a new Maven project with groupId as com.stormadvance and artifactId as logprocessing.
- Add the following dependencies in the pom.xml file:
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-core</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<!-- Utilities -->
<dependency>
...