incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anurag Gujral <anurag.guj...@gmail.com>
Subject Re: InvalidRequestException: Mutation must have one ColumnOrSuperColumn or one Deletion
Date Thu, 17 Mar 2011 16:56:42 GMT
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 <jbellis@gmail.com> 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 <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