Storm and Cassandra topology
As discussed in Chapter 4, Setting up the Infrastructure for Storm, Storm has spouts and bolts. The Casandra bolt is required to persist records. There are two common ways to integrate Storm with Cassandra. The first is by using the storm-cassandra
built-in library where you just need to call CassndraBolt
and the required parameters. The second way is by using the DataStax Cassandra library, which needs to be imported using the build manager and using the wrapper classes to make a connection with Cassandra. The following are the steps to integrate Storm with Cassandra using the DataStax
library:
- Add the following dependencies:
<dependency> <groupId>com.datastax.cassandra</groupId> <artifactId>cassandra-driver-core</artifactId> <version>3.1.0</version> </dependency> <dependency> <groupId>com.datastax.cassandra</groupId> <artifactId>cassandra-driver-mapping</artifactId...