List of usage examples for org.apache.cassandra.db.partitions Partition unfilteredIterator
public UnfilteredRowIterator unfilteredIterator();
From source file:io.jmnarloch.cassandra.kafka.trigger.KafkaCommitLogTrigger.java
License:Apache License
@Override public Collection<Mutation> augment(Partition update) { try (final CommitLog commitLog = new KafkaCommitLog(environment)) { final String key = getKey(update); final RowIterator rows = rowIterator(update.unfilteredIterator()); while (rows.hasNext()) { final byte[] data = formatter .format(new RowInfo(update.metadata(), update.partitionKey(), rows.next())); commitLog.commit(key, data); }/*from w w w .j a va 2s .c om*/ return nothing(); } catch (Exception e) { throw new CommitLogException("An unexpected error occurred when trying to export the row data", e); } }