Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 52227 invoked from network); 15 Mar 2010 20:19:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Mar 2010 20:19:16 -0000 Received: (qmail 53195 invoked by uid 500); 15 Mar 2010 20:18:28 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 53176 invoked by uid 500); 15 Mar 2010 20:18:28 -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 53167 invoked by uid 99); 15 Mar 2010 20:18:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Mar 2010 20:18:28 +0000 X-ASF-Spam-Status: No, hits=-1.1 required=10.0 tests=AWL,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbellis@gmail.com designates 74.125.82.44 as permitted sender) Received: from [74.125.82.44] (HELO mail-ww0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Mar 2010 20:18:23 +0000 Received: by wwf26 with SMTP id 26so1210092wwf.31 for ; Mon, 15 Mar 2010 13:18:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=lI/o5c/KGED/tZRM6Qj80aaWuTTRycyiVfWlIyZ9i2Y=; b=gtEgA/w+xCGEweK+nszp3N9FjGAq36S86BbbMpeILWnoxBsBY5MUyywQUzGNgeaLSD gl3cHRnUS4ty5CMyfCzCMlTqhj9Z59UpFBqdB4ujhCYyu1BrBextOPushGVonMbna1wB LBsCXetHNmw5TCchsV+7fdc0+XD+bXakfFZZ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=vTAuHQOQ5qN1VoSomD7fxR+t5e7w/DSGGzsvUF4ANT3GuF0tx0Nv2tYOSCQngyxFT3 h/VHSGqG4Jk0vO/yCs4ohccty1brAT+pBTtXlYbE1Nx2H8n8Y5Ev4x9Gp5LvcoZO9axo 7Bpm/RzMBivIVi5V0wlYUeeBS9C+pDKBUdgEE= MIME-Version: 1.0 Received: by 10.216.159.130 with SMTP id s2mr27307wek.13.1268684281496; Mon, 15 Mar 2010 13:18:01 -0700 (PDT) In-Reply-To: References: From: Jonathan Ellis Date: Mon, 15 Mar 2010 15:17:41 -0500 Message-ID: Subject: Re: SuperColumns in C++ API To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Ah, thrift is letting you set something to be null, that shouldn't be legal. This is fixed in 0.6 svn, btw. it looks like you are setting new_col.__isset.column to true, but not actually assigning it a value. On Mon, Mar 15, 2010 at 3:14 PM, Juan Manuel Garcia del Moral wrote: > This is what the log says: > > ERROR [pool-1-thread-8] 2010-03-15 15:54:06,753 Cassandra.java (line 1482= ) > Internal error processing insert > java.lang.AssertionError: QueryPath(columnFamilyName=3D'Anonimos', > superColumnName=3D'[B@d0357a', columnName=3D'null') > =A0=A0=A0=A0=A0=A0=A0 at > org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:165) > =A0=A0=A0=A0=A0=A0=A0 at > org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:159) > =A0=A0=A0=A0=A0=A0=A0 at org.apache.cassandra.db.RowMutation.add(RowMutat= ion.java:159) > =A0=A0=A0=A0=A0=A0=A0 at > org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:3= 51) > =A0=A0=A0=A0=A0=A0=A0 at > org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.= java:1474) > =A0=A0=A0=A0=A0=A0=A0 at > org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:11= 15) > =A0=A0=A0=A0=A0=A0=A0 at > org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolS= erver.java:253) > =A0=A0=A0=A0=A0=A0=A0 at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor= .java:886) > =A0=A0=A0=A0=A0=A0=A0 at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.jav= a:908) > =A0=A0=A0=A0=A0=A0=A0 at java.lang.Thread.run(Thread.java:619) > > > I need to do replicate this: > set SocialAds.Anonimos['122']['Tag']['150'] =3D '100'; > > from my code... > > any ideas? > > thanks in advance > > Juan > > > 2010/3/15 Jonathan Ellis >> >> check the server log for exception. =A0and if you are not on 0.5.1 or >> 0.6 svn branch, upgrade. >> >> On Mon, Mar 15, 2010 at 12:47 PM, Juan Manuel Garcia del Moral >> wrote: >> > Many thanks! >> > >> > That seems to be useful, >> > >> > But now I'm getting >> > =A0The error message: "Internal error processing insert" >> > >> > I'm not sure if I'm setting the timestamp properly >> > >> > >> > >> > 2010/3/15 Padraig O'Sullivan >> >> >> >> You need to manually set the __isset fields when using the thift API >> >> in C++. Since you are trying to insert a super column, you need to se= t >> >> the super_column __isset field. >> >> >> >> So this: >> >> >> >> new_col.__isset.column =3D true; >> >> >> >> should become: >> >> >> >> new_col.__isset.super_column =3D true; >> >> >> >> -Padraig >> >> >> >> On Mon, Mar 15, 2010 at 12:36 PM, Juan Manuel Garcia del Moral >> >> wrote: >> >> > Hello >> >> > >> >> > I'm trying to add values using supercolumns but I get this error >> >> > >> >> > ERROR: supercolumn parameter is not optional for super CF Anonimos >> >> > >> >> > This is my code >> >> > >> >> > // ********** >> >> > =A0ColumnPath new_col; >> >> > =A0=A0=A0 new_col.__isset.column=A0=A0=A0 =A0=3D true; /* this is r= equired! */ >> >> > =A0=A0=A0 new_col.column_family.assign("Anonimos"); >> >> > =A0=A0=A0 new_col.super_column.assign("Tag"); >> >> > >> >> > =A0=A0=A0 client.insert("SocialAds", >> >> > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "1", >> >> > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 new_col, >> >> > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "200", >> >> > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 123456789, >> >> > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ONE); >> >> > >> >> > // ********** >> >> > >> >> > What I'm doing wrong? >> >> > >> >> > Thanks >> >> > >> >> > Juan >> >> > >> >> > >> > >> > >> > >> > > >