JIRA Issue: KIEKER-1452 Kieker Extension for Cassandra DB
Original Reporter: Armin Möbius
In the following, we describe how we have extended Kieker to work with Cassandra DB. To get a basic knowledge how a monitoring writer works, we used the official Kieker user guide and the class files available on github. Since version 0.9 Kieker provides an implementation for writing monitoring data to databases. SyncDbWriter and AsyncDbWriter are these classes. They provide access to different databases. Due to using Cassandra, we decided to build our own classes and extend the available abstract classes and interfaces from Kieker. This classes are build to work with Cassandra databases only and can work with any monitoring record. Finally we had four classes. The first one is CassandraDb, which is a basic implementation to access the Cassandra database with the help of the
DataStax Java driver. This class provides methods for creating tables and inserting data. The second class is CassandraSyncDbWriter, which extends Kieker's AbstractMonitoringWriter. We override the method newMonitoringRecord, which is called from the framework, when a new record is available. First we need to check, if we already have a database table for this record. If no table exists, we create a table. Our last two classes are very similar to CassandraSyncDbWriter. CassandraAsyncDbWriter is the asynchronous implementation of our writer. In order to make this work we had to extend
AbstractAsyncWriter. The worker threads, who are persisting the monitoring data, were build with the help of the class AbstractAsyncThread in our class CassandraWriterThread. In order to get the Kieker framework to work with our implementation we had to add some configuration into the kieker.monitoring.properties file.
JIRA Issue: KIEKER-1452 Kieker Extension for Cassandra DB Original Reporter: Armin Möbius
In the following, we describe how we have extended Kieker to work with Cassandra DB. To get a basic knowledge how a monitoring writer works, we used the official Kieker user guide and the class files available on github. Since version 0.9 Kieker provides an implementation for writing monitoring data to databases. SyncDbWriter and AsyncDbWriter are these classes. They provide access to different databases. Due to using Cassandra, we decided to build our own classes and extend the available abstract classes and interfaces from Kieker. This classes are build to work with Cassandra databases only and can work with any monitoring record. Finally we had four classes. The first one is CassandraDb, which is a basic implementation to access the Cassandra database with the help of the
DataStax Java driver. This class provides methods for creating tables and inserting data. The second class is CassandraSyncDbWriter, which extends Kieker's AbstractMonitoringWriter. We override the method newMonitoringRecord, which is called from the framework, when a new record is available. First we need to check, if we already have a database table for this record. If no table exists, we create a table. Our last two classes are very similar to CassandraSyncDbWriter. CassandraAsyncDbWriter is the asynchronous implementation of our writer. In order to make this work we had to extend
AbstractAsyncWriter. The worker threads, who are persisting the monitoring data, were build with the help of the class AbstractAsyncThread in our class CassandraWriterThread. In order to get the Kieker framework to work with our implementation we had to add some configuration into the kieker.monitoring.properties file.