This section will explain how we can deploy the LogProcessingTopology. Perform the following steps:
- Execute the following command on the MySQL console to define the database schema:
mysql> create database apachelog; mysql> use apachelog; mysql> create table apachelog( id INT NOT NULL AUTO_INCREMENT, ip VARCHAR(100) NOT NULL, dateTime VARCHAR(200) NOT NULL, request VARCHAR(100) NOT NULL, response VARCHAR(200) NOT NULL, bytesSent VARCHAR(200) NOT NULL, referrer VARCHAR(500) NOT NULL, useragent VARCHAR(500) NOT NULL, country VARCHAR(200) NOT NULL, browser VARCHAR(200) NOT NULL, os VARCHAR(200) NOT NULL, keyword VARCHAR(200) NOT NULL, PRIMARY KEY (id) );
- I am assuming you have already produced some data on the apache_log topic by using Logstash...