cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinak Pani <>
Subject A trigger that modifies the current Mutation
Date Sun, 28 Sep 2014 06:08:03 GMT

I wanted to create a trigger that alters the current mutation. For example,
I wanted to, say, iterate through the ColumnFamily in augment method and
look for all the fields that are of type text or varchar and change them to
upper case. I am not sure how to do that. Can someone help me?

Basically, this is what I wanted to do:

public class AllCapsTrigger implements ITrigger {

  public Collection<Mutation> augment(ByteBuffer key, ColumnFamily cf) {
    for(Cell cell: cf){
        System.out.println("Value:  " + new String(cell.value().array(),

         * Check if cell is of type text/varchar
         * Set cell value to upper case of what it has

    return null;

Thanks for reading this.


View raw message