Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 33873 invoked from network); 17 Mar 2011 16:57:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Mar 2011 16:57:12 -0000 Received: (qmail 24606 invoked by uid 500); 17 Mar 2011 16:57:09 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 24582 invoked by uid 500); 17 Mar 2011 16:57:09 -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 24574 invoked by uid 99); 17 Mar 2011 16:57:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Mar 2011 16:57:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of anurag.gujral@gmail.com designates 209.85.216.44 as permitted sender) Received: from [209.85.216.44] (HELO mail-qw0-f44.google.com) (209.85.216.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Mar 2011 16:57:05 +0000 Received: by qwg5 with SMTP id 5so2599336qwg.31 for ; Thu, 17 Mar 2011 09:56:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=KvFe8OEfQMmr5/d40EfDGTGxQmcwqlxRyunUWhUtdwo=; b=XitqrHbPtpzZm1dkL7N+7UYkt44SWBMmSHgz9rMBuOBMt6Q8DhNAHWf5K1ebJVLejK YQAJCU8QK2kvhZle4bhDQ9Iot5D4znI9/VIQBBhbpzmeC3BVpxejKCry/y6tP2y3WrUI s8Dxf9MzsvV0l0Ai9U4bcnx7t1Hiw9BCaeqgA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=BMkHtLEedjcZeyEEgBpKZ2nVCuhDltOBpLxwpoZY4FqJ+c4iow1a3258dVMu6LVEkY 9J8+hfDUStksXHVEQXjErr/QqNJbrNYQY2BA1EzTjjbj9/WAqvdUFbooNbKGnBhOUKod pV+yQOVOoJIb/T2iGCnKbadmqDfOLWqei7Fwk= MIME-Version: 1.0 Received: by 10.224.214.1 with SMTP id gy1mr1304597qab.269.1300381002982; Thu, 17 Mar 2011 09:56:42 -0700 (PDT) Received: by 10.229.70.208 with HTTP; Thu, 17 Mar 2011 09:56:42 -0700 (PDT) In-Reply-To: References: Date: Thu, 17 Mar 2011 09:56:42 -0700 Message-ID: Subject: Re: InvalidRequestException: Mutation must have one ColumnOrSuperColumn or one Deletion From: Anurag Gujral To: Jonathan Ellis Cc: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=20cf3005dc1ec163cc049eb08be2 --20cf3005dc1ec163cc049eb08be2 Content-Type: text/plain; charset=ISO-8859-1 Yes thanks I was able to see that . Now I am getting the following error OutboundTcpConnection.java (line 159) attempting to connect to astrix.com where astrix.com is the machine on which I have installed cassandra Any suggestions. Thanks Anurag On Thu, Mar 17, 2011 at 9:49 AM, Jonathan Ellis wrote: > Internal error means "there is a stacktrace in the server system.log" > and in this case probably also means "you sent some kind of invalid > request that our validation didn't catch." > > On Thu, Mar 17, 2011 at 11:29 AM, Anurag Gujral > wrote: > > Thanks for the reply. I added > mutation.__isset.column_or_supercolumn=true; > > > > Now I am getting TApplicationException: Internal error processing > > batch_mutate > > > > Any suggestions? > > Thanks > > Anurag > > > > On Thu, Mar 17, 2011 at 8:13 AM, Anurag Gujral > > wrote: > >> > >> Hi All, > >> I am using function batch_mutate of cassandra 0.7 and I am > >> getting the error InvalidRequestException: Mutation must have one > >> ColumnOrSuperColumn or one Deletion. I have my own C++ cassandra client > >> using thrift 0.0.5 api. > >> > >> Any Suggestions. > >> > >> Sample Code > >> map > cfmap; > >> > >> vector mutations; > >> > >> Column temp_col; > >> temp_col.name.assign("abcd"); > >> temp_col.value.assign("efgh"); > >> temp_col.timestamp = timestamp; > >> temp_col.ttl = 0; // TODO: TTL > >> ColumnOrSuperColumn cosc; > >> cosc.column = temp_col; > >> cosc.__isset.column = true; // must set which data type, col or > >> super > >> > >> Mutation mutation ; > >> mutation.column_or_supercolumn=cosc; > >> mutations.push_back(mutation); > >> > >> cfmap.insert(make_pair(colspace, mutations)); > >> map > > mutationMap; > >> mutationMap.insert(make_pair("firstRow",cfmap)) > >> > >> conn->client->batch_mutate( > >> mutationMap, > >> (org::apache::cassandra::ConsistencyLevel::type)cons); > >> > >> > >> Thanks > >> Anurag > > > > > > > > -- > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of DataStax, the source for professional Cassandra support > http://www.datastax.com > --20cf3005dc1ec163cc049eb08be2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yes thanks I was able to see that .
Now I am getting the following error=

OutboundTcpConnection.java (line 159) attempting to connect to astrix.com
where astrix.com is the machine on which I have installed cassandra

Any suggestions.

Thanks
Anurag

On Thu, Mar 17, 2011 at 9:49 AM, Jonathan Ellis <<= a href=3D"mailto:jbellis@gmail.com">jbellis@gmail.com> wrote:=
Internal error me= ans "there is a stacktrace in the server system.log"
and in this case probably also means "you sent some kind of invalid request that our validation didn't catch."

On Thu, Mar 17, 2011 at 11:29 AM, Anurag Gujral <anurag.gujral@gmail.com> wrote:
> Thanks for the reply. I added mutation.__isset.column_or_supercolumn= =3Dtrue;
>
> Now I am getting TApplicationException: Internal error processing
> batch_mutate
>
> Any suggestions?
> Thanks
> Anurag
>
> On Thu, Mar 17, 2011 at 8:13 AM, Anurag Gujral <anurag.gujral@gmail.com>
> wrote:
>>
>> Hi All,
>> =A0=A0=A0=A0=A0=A0=A0=A0=A0 I am using function batch_mutate of ca= ssandra 0.7 and I am
>> getting the error InvalidRequestException: Mutation must have one<= br> >> ColumnOrSuperColumn or one Deletion. I have my own C++ cassandra c= lient
>> using thrift 0.0.5 api.
>>
>> Any Suggestions.
>>
>> Sample Code
>> =A0=A0=A0 map<string, vector<Mutation> > cfmap;
>>
>> =A0=A0=A0 vector<Mutation> mutations;
>>
>> =A0=A0=A0=A0=A0=A0 Column temp_col;
>> =A0=A0=A0=A0=A0=A0=A0 temp_col.name.assign("abcd");
>> =A0=A0=A0=A0=A0=A0=A0 temp_col.value.assign("efgh");
>> =A0=A0=A0=A0=A0=A0=A0 temp_col.timestamp =3D timestamp;
>> =A0=A0=A0=A0=A0=A0=A0 temp_col.ttl =3D 0; // TODO: TTL
>> =A0=A0=A0=A0=A0=A0=A0 ColumnOrSuperColumn cosc;
>> =A0=A0=A0=A0=A0=A0=A0 cosc.column =3D temp_col;
>> =A0=A0=A0=A0=A0=A0=A0 cosc.__isset.column =3D true; // must set wh= ich data type, col or
>> super
>>
>> =A0=A0=A0=A0=A0=A0=A0 Mutation mutation ;
>> =A0=A0=A0=A0=A0=A0=A0 mutation.column_or_supercolumn=3Dcosc;
>> =A0=A0=A0=A0=A0=A0=A0 mutations.push_back(mutation);
>>
>> =A0 =A0 =A0=A0 cfmap.insert(make_pair(colspace, mutations));
>> =A0=A0=A0 map<string, map<string, vector<Mutation> >= ; > mutationMap;
>> =A0=A0=A0 mutationMap.insert(make_pair("firstRow",cfmap)= )
>>
>> conn->client->batch_mutate(
>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 mutationMap,
>> (org::apache::cassandra::ConsistencyLevel::type)cons);
>>
>>
>> Thanks
>> Anurag
>
>



--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.c= om

--20cf3005dc1ec163cc049eb08be2--