Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 51679 invoked from network); 15 Mar 2010 20:16:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Mar 2010 20:16:05 -0000 Received: (qmail 50068 invoked by uid 500); 15 Mar 2010 20:15:17 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 50002 invoked by uid 500); 15 Mar 2010 20:15:17 -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 49994 invoked by uid 99); 15 Mar 2010 20:15:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Mar 2010 20:15:17 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [209.85.220.216] (HELO mail-fx0-f216.google.com) (209.85.220.216) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Mar 2010 20:15:10 +0000 Received: by fxm8 with SMTP id 8so3800592fxm.25 for ; Mon, 15 Mar 2010 13:14:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.239.183.147 with SMTP id u19mr493264hbg.106.1268684089664; Mon, 15 Mar 2010 13:14:49 -0700 (PDT) In-Reply-To: References: Date: Mon, 15 Mar 2010 17:14:49 -0300 Message-ID: Subject: Re: SuperColumns in C++ API From: Juan Manuel Garcia del Moral To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001485f5cef27f25bd0481dc88c3 X-Virus-Checked: Checked by ClamAV on apache.org --001485f5cef27f25bd0481dc88c3 Content-Type: text/plain; charset=ISO-8859-1 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='Anonimos', superColumnName='[B@d0357a', columnName='null') at org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:165) at org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:159) at org.apache.cassandra.db.RowMutation.add(RowMutation.java:159) at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:351) at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:1474) at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:1115) at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) I need to do replicate this: set SocialAds.Anonimos['122']['Tag']['150'] = '100'; from my code... any ideas? thanks in advance Juan 2010/3/15 Jonathan Ellis > check the server log for exception. and 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 > > The 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 set > >> the super_column __isset field. > >> > >> So this: > >> > >> new_col.__isset.column = true; > >> > >> should become: > >> > >> new_col.__isset.super_column = 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 > >> > > >> > // ********** > >> > ColumnPath new_col; > >> > new_col.__isset.column = true; /* this is required! */ > >> > new_col.column_family.assign("Anonimos"); > >> > new_col.super_column.assign("Tag"); > >> > > >> > client.insert("SocialAds", > >> > "1", > >> > new_col, > >> > "200", > >> > 123456789, > >> > ONE); > >> > > >> > // ********** > >> > > >> > What I'm doing wrong? > >> > > >> > Thanks > >> > > >> > Juan > >> > > >> > > > > > > > > > --001485f5cef27f25bd0481dc88c3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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', super= ColumnName=3D'[B@d0357a', columnName=3D'null')
=A0=A0=A0=A0=A0=A0=A0 at org.apache.cassandra.db.ColumnFamily.addColumn(Col= umnFamily.java:165)
=A0=A0=A0=A0=A0=A0=A0 at org.apache.cassandra.db.Col= umnFamily.addColumn(ColumnFamily.java:159)
=A0=A0=A0=A0=A0=A0=A0 at org.= apache.cassandra.db.RowMutation.add(RowMutation.java:159)
=A0=A0=A0=A0=A0=A0=A0 at org.apache.cassandra.thrift.CassandraServer.insert= (CassandraServer.java:351)
=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:1115)
=A0=A0=A0=A0=A0=A0=A0 at org.apache.thrift.server.TThreadPoolServer$WorkerP= rocess.run(TThreadPoolServer.java:253)
=A0=A0=A0=A0=A0=A0=A0 at java.uti= l.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)=
=A0=A0=A0=A0=A0=A0=A0 at java.util.concurrent.ThreadPoolExecutor$Worker= .run(ThreadPoolExecutor.java: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']['T= ag']['150'] =3D '100';

from my code...

an= y ideas?

thanks in advance

Juan


201= 0/3/15 Jonathan Ellis <jbellis@gmail.com>
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
<juan@southcode.com.ar> 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 <osullivan.padraig@gmail.com>
>>
>> You need to manually set the __isset fields when using the thift A= PI
>> in C++. Since you are trying to insert a super column, you need to= set
>> 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
>> <juan@southcode.com.ar= > wrote:
>> > Hello
>> >
>> > I'm trying to add values using supercolumns but I get thi= s error
>> >
>> > ERROR: supercolumn parameter is not optional for super CF Ano= nimos
>> >
>> > This is my code
>> >
>> > // **********
>> > =A0ColumnPath new_col;
>> > =A0=A0=A0 new_col.__isset.column=A0=A0=A0 =A0=3D true; /* thi= s is required! */
>> > =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&q= uot;,
>> > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 new_col,<= br> >> > =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
>> >
>> >
>
>
>



--001485f5cef27f25bd0481dc88c3--