Database Reference
In-Depth Information
//defining the mutator
public Mutator < Composite > getCompositeMutator() {
return compositeMutator;
}
public void setCompositeMutator(Mutator < Composite
> compositeMutator) {
this.compositeMutator = compositeMutator;
}
//getter and setters for all mutators and
serializers
public StringSerializer getStringSerializer() {
return stringSerializer;
}
public Keyspace getKeyspace() {
return keySpaceObj;
}
}
5. Last but not least in our topology is actually the component that will write into
Cassandra, the Storm bolt that will make use of CassandraController cre-
ated earlier to write the real-time data into Cassandra:
public class CassandraBolt extends BaseBasicBolt {
private static final Logger logger =
LogUtils.getLogger(CassandraBolt.class);
public void prepare(Map stormConf, TopologyContext
context) {
logger.debug("Cassandra bolt, prepare()");
try {
cassandraMngr = new CassandraController();
myCf = "my_columnfamily";
);
} catch (Exception e) {
Search WWH ::




Custom Search