use of me.prettyprint.cassandra.serializers.StringSerializer in project cassandra-indexing by hmsonline.
the class AbstractIndexingTest method persist.
protected void persist(Keyspace keyspace, String columnFamily, String rowKey, Map<String, String> columns) throws Exception {
logger.debug("Writing [" + rowKey + "] in [" + columnFamily + "] @ [" + keyspace.getKeyspaceName() + "]");
StringSerializer serializer = StringSerializer.get();
Mutator<String> mutator = HFactory.createMutator(keyspace, serializer);
for (String columnName : columns.keySet()) {
logger.debug("Writing [" + columnName + "] @ [" + rowKey + "] in [" + columnFamily + "] @ [" + keyspace + "]");
mutator.addInsertion(rowKey, columnFamily, HFactory.createStringColumn(columnName, columns.get(columnName)));
}
mutator.execute();
}
Aggregations