diff --git a/examples/triggers/src/org/apache/cassandra/triggers/InvertedIndex.java b/examples/triggers/src/org/apache/cassandra/triggers/InvertedIndex.java index 11e98b5335..fa90053fde 100644 --- a/examples/triggers/src/org/apache/cassandra/triggers/InvertedIndex.java +++ b/examples/triggers/src/org/apache/cassandra/triggers/InvertedIndex.java @@ -41,13 +41,15 @@ public class InvertedIndex implements ITrigger { List mutations = new ArrayList<>(update.getColumnCount()); + String indexKeySpace = properties.getProperty("keyspace"); + String indexColumnFamily = properties.getProperty("columnfamily") for (Cell cell : update) { // Skip the row marker and other empty values, since they lead to an empty key. if (cell.value().remaining() > 0) { - Mutation mutation = new Mutation(properties.getProperty("keyspace"), cell.value()); - mutation.add(properties.getProperty("columnfamily"), cell.name(), key, System.currentTimeMillis()); + Mutation mutation = new Mutation(indexKeySpace, cell.value()); + mutation.add(indexColumnFamily, cell.name(), key, System.currentTimeMillis()); mutations.add(mutation); } }