This section will explain how we can persist the process data into a data store. We are using MySQL as a data store for the log processing use case. I am assuming you have MySQL installed on your centOS machine or you can follow the blog at http://www.rackspace.com/knowledge_center/article/installing-mysql-server-on-centos to install the MySQL on the centOS machine. Let's perform the following steps to persist the record into MySQL:
- Add the following dependency to pom.xml:
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.6</version> </dependency>
- We are creating a MySQLConnection class in the com.stormadvance.logprocessing package. This class contains getMySQLConnection(String ...