incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Molinaro <antho...@alumni.caltech.edu>
Subject Re: Batch mutate doesn't work
Date Fri, 30 Apr 2010 17:48:49 GMT

On Fri, Apr 30, 2010 at 03:58:09PM +0200, Zubair Quraishi wrote:
>  %
>  % set second property ( fails! - why? )
>  %
>  MutationMap =
>  {
>    Key,
>    {
>      <<"KeyValue">>,
>      [
>        #mutation{
>          column_or_supercolumn = #column{ name = "property" , value =
> "value" , timestamp = 2 }
>        }
>      ]
>    }
>  },
>  thrift_client:call( C,
>    'batch_mutate',
>    [ "Keyspace1",
>       MutationMap,
>       1
>    ] )

I haven't actually tried compiling this, but looking at the records in
the generated .hrl file and the .thrift file it looks like column_or_supercolumn
in the mutation record is a #columnOrSuperColumn record, so I think you want

  MutationMap =
  {
    Key,
    {
      <<"KeyValue">>,
      [
        #mutation {
          column_or_supercolumn =
            #columnOrSuperColumn {
              column =
                #column {
                  name = "property",
                  value = "value",
                  timestamp = 2
                }
            }
        }
      ]
    }
  },

Try that,

-Anthony

-- 
------------------------------------------------------------------------
Anthony Molinaro                           <anthonym@alumni.caltech.edu>

Mime
View raw message