Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9D69A104BA for ; Sat, 11 Jan 2014 22:50:56 +0000 (UTC) Received: (qmail 9340 invoked by uid 500); 11 Jan 2014 22:50:49 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 9311 invoked by uid 500); 11 Jan 2014 22:50:46 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 9302 invoked by uid 99); 11 Jan 2014 22:50:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Jan 2014 22:50:45 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of thunder.stumpges@gmail.com designates 209.85.192.176 as permitted sender) Received: from [209.85.192.176] (HELO mail-pd0-f176.google.com) (209.85.192.176) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Jan 2014 22:50:38 +0000 Received: by mail-pd0-f176.google.com with SMTP id r10so2011117pdi.21 for ; Sat, 11 Jan 2014 14:50:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:from:subject:date:to; bh=eGyhupO7Od11Vwglddp4GIU4Zb51R8Huz+ZUSIFX/d4=; b=rMiJWV+0RZHDflyiSek25fpJqhkeIiuXUjN0D1JOkYPpzTqe1ufYfHWcZguNIGXTyV /pmbT7Ne1mZD9hILR9vHROCHKnkYB4YckQGN3A76v6bFHyjpIiQCnLGNofzyKTfVJsLW A0HrlcehOb2jTDxcOALhBH2LY5gxSCVWOAnD9Z/SGaq5qlsB/8Goxx9HJy3PwRoQcPxL hrZ1O7gJkqOjYUD3P9kuR7uD2MHayYjfPJFn7rCNsOSEWZm01w0sXAsnftopNdJbUqxX x+eBQ6yi0RFmZZrKuGShUmGwR2pW3PeXy930bDCkPcIMtG2LMu/Stb2ky8LanDyz/qY2 RNcg== X-Received: by 10.66.121.164 with SMTP id ll4mr20994024pab.48.1389480617098; Sat, 11 Jan 2014 14:50:17 -0800 (PST) Received: from [192.168.37.145] (ip72-199-220-200.sd.sd.cox.net. [72.199.220.200]) by mx.google.com with ESMTPSA id un5sm34452625pab.3.2014.01.11.14.50.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 11 Jan 2014 14:50:16 -0800 (PST) References: In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: 7bit Content-Type: multipart/alternative; boundary=Apple-Mail-1965F84E-C07B-4692-A017-1B33228FEFA1 Message-Id: <46A69FBF-18A8-4F3C-8758-29F392ACB914@gmail.com> Cc: "user@cassandra.apache.org" X-Mailer: iPhone Mail (11B554a) From: Thunder Stumpges Subject: Re: Problem in running cassandra-2.0.4 trigger example Date: Sat, 11 Jan 2014 14:50:14 -0800 To: "user@cassandra.apache.org" X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-1965F84E-C07B-4692-A017-1B33228FEFA1 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable I'm not sure if this is your issue as I have not used these triggers before b= ut shouldn't the invertedindex table have a different primary key than the p= rimary table (either f2 or f3)? -Thunder > On Jan 11, 2014, at 12:03 PM, Vidit Asthana wro= te: >=20 > I am new to cassandra and trying to run the trigger example provided by ca= ssandra on a pseudo cluster using instructions provided on https://github.co= m/apache/cassandra/tree/cassandra-2.0/examples/triggers >=20 > But i am getting error: Bad Request: Key may not be empty >=20 > Can someone tell me if my "CREATE table" is proper? What else can be wrong= ? >=20 > I am doing following using cqlsh. > CREATE KEYSPACE keyspace1 WITH REPLICATION =3D { 'class' : 'SimpleStrategy= ', 'replication_factor' : 1 };=20 > use keyspace1; > CREATE TABLE invertedindex ( f1 varchar , f2 varchar, f3 varchar, PRIMARY K= EY(f1)); > CREATE TABLE table1 ( f1 varchar , f2 varchar, f3 varchar, PRIMARY KEY(f1)= ); > CREATE TRIGGER mytrigger ON table1 USING 'org.apache.cassandra.triggers.In= vertedIndex'; > insert into table1 (f1,f2,f3) values ('aaa','bbb','ccc'); >=20 > This is what i get in system.log:=20 >=20 > INFO [Thrift:1] 2014-01-11 14:48:09,875 InvertedIndex.java:67 - loaded pr= operty file, InvertedIndex.properties >=20 > This is content of conf/InvertedIndex.properties file: >=20 > keyspace=3Dkeyspace1 > columnfamily=3Dinvertedindex >=20 > Thanks in advance. >=20 > Vidit >=20 >=20 --Apple-Mail-1965F84E-C07B-4692-A017-1B33228FEFA1 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
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.asthana7@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


--Apple-Mail-1965F84E-C07B-4692-A017-1B33228FEFA1--