Database Reference
In-Depth Information
validation_class : UTF8Type}]
and compression_options = {'sstable_compression' :
'org.apache.cassandra.io.compress.SnappyCompressor'
};
3. The following changes need to be made to pom.xml in the project. The Hector
dependency should be added to the pom.xml file so that it is fetched at the time
of build and added to the m2 repository, as shown:
<dependency>
<groupId>me.prettyprint</groupId>
<artifactId>hector-core</artifactId>
<version>0.8.0-2</version>
</dependency>
If you are working with a non-Maven project, follow the usual pro-
tocol—download the Hector core JAR file and add it to the project build path so
that all the required dependencies are satisfied.
4. Next, we'll need to get the components in place in our Storm topology. We will
start by creating a CassandraController Java component that will hold all
Cassandra-related functionality, and it will be called from the CassandraBolt
class in the topology to persist the data into Cassandra:
public class CassandraController {
private static final Logger logger =
LogUtils.getLogger(CassandraManager.class);
//various serializers are declared in here
UUIDSerializer timeUUIDSerializer =
UUIDSerializer.get();
StringSerializer stringSerializer =
StringSerializer.get();
DateSerializer dateSerializer =
DateSerializer.get();
LongSerializer longSerializer =
LongSerializer.get();
public CassandraController() {
//list of IPs of Cassandra node in ring
Search WWH ::




Custom Search