incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: InvalidRequestException: Mutation must have one ColumnOrSuperColumn or one Deletion
Date Thu, 17 Mar 2011 16:49:06 GMT
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 <anurag.gujral@gmail.com> 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 <anurag.gujral@gmail.com>
> 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<string, vector<Mutation> > cfmap;
>>
>>     vector<Mutation> 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<string, map<string, vector<Mutation> > > 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

Mime
View raw message