Repository: cassandra
Updated Branches:
  refs/heads/trunk 33939cae6 -> 3ce2ce714


minor cleanups in trigger sample


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3ce2ce71
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3ce2ce71
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3ce2ce71

Branch: refs/heads/trunk
Commit: 3ce2ce7144df8ac4cc6d6c401f1c6c4f4c2b51c5
Parents: 33939ca
Author: Dave Brosius <[email protected]>
Authored: Thu May 15 22:23:02 2014 -0400
Committer: Dave Brosius <[email protected]>
Committed: Thu May 15 22:23:02 2014 -0400

----------------------------------------------------------------------
 .../src/org/apache/cassandra/triggers/InvertedIndex.java       | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3ce2ce71/examples/triggers/src/org/apache/cassandra/triggers/InvertedIndex.java
----------------------------------------------------------------------
diff --git 
a/examples/triggers/src/org/apache/cassandra/triggers/InvertedIndex.java 
b/examples/triggers/src/org/apache/cassandra/triggers/InvertedIndex.java
index 11e98b5..fa90053 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<Mutation> 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);
             }
         }

Reply via email to