>> But i am getting error: Bad Request: Key may not be empty My guess is the trigger is trying to create a row with an empty key.
Add some logging to the trigger to see what it’s doing. Cheers ----------------- Aaron Morton New Zealand @aaronmorton Co-Founder & Principal Consultant Apache Cassandra Consulting http://www.thelastpickle.com On 12/01/2014, at 11:50 am, Thunder Stumpges <thunder.stump...@gmail.com> wrote: > I'm not sure if this is your issue as I have not used these triggers before > but shouldn't the invertedindex table have a different primary key than the > primary table (either f2 or f3)? > > -Thunder > > > On Jan 11, 2014, at 12:03 PM, Vidit Asthana <vidit.astha...@gmail.com> wrote: > >> I am new to cassandra and trying to run the trigger example provided by >> cassandra on a pseudo cluster using instructions provided on >> https://github.com/apache/cassandra/tree/cassandra-2.0/examples/triggers >> >> But i am getting error: Bad Request: Key may not be empty >> >> Can someone tell me if my "CREATE table" is proper? What else can be wrong? >> >> I am doing following using cqlsh. >> • CREATE KEYSPACE keyspace1 WITH REPLICATION = { 'class' : >> 'SimpleStrategy', 'replication_factor' : 1 }; >> • use keyspace1; >> • CREATE TABLE invertedindex ( f1 varchar , f2 varchar, f3 varchar, >> PRIMARY KEY(f1)); >> • CREATE TABLE table1 ( f1 varchar , f2 varchar, f3 varchar, PRIMARY >> KEY(f1)); >> • CREATE TRIGGER mytrigger ON table1 USING >> 'org.apache.cassandra.triggers.InvertedIndex'; >> • insert into table1 (f1,f2,f3) values ('aaa','bbb','ccc'); >> >> This is what i get in system.log: >> >> INFO [Thrift:1] 2014-01-11 14:48:09,875 InvertedIndex.java:67 - loaded >> property file, InvertedIndex.properties >> >> This is content of conf/InvertedIndex.properties file: >> >> keyspace=keyspace1 >> columnfamily=invertedindex >> >> Thanks in advance. >> >> Vidit >> >>