Not a preference, per se.
I just imagine calling something like:
POST increment/<table>/<row>/<column>( : <qualifier> )?( / <timestamp>
)?/<increment integer>
Which, if successful returns:
HTTP/1.1 200 OK
Content-Type: application/json
{"$":<new integer>}
I imagine it returning errors in the event of the increment request being
applied to a column value that cannot be incremented.
I basically imagine it working in a similar fashion to the HBase shell and
Thrift API.
On 26/05/2011, at 12:57 AM, Andrew Purtell wrote:
> Do you have any preference for how this might be accomplished?
>
> Best regards,
>
> - Andy
>
> Problems worthy of attack prove their worth by hitting back. - Piet Hein (via
> Tom White)
>
>
> --- On Wed, 5/25/11, Mark Jarecki <[email protected]> wrote:
>
>> From: Mark Jarecki <[email protected]>
>> Subject: REST & Atomic increment
>> To: [email protected]
>> Date: Wednesday, May 25, 2011, 1:47 AM
>> Hi,
>>
>> Is there - or are there plans for implementing - an atomic
>> increment method for a column value in the REST API? I
>> noticed such a method in Thrift.
>>
>> Just thinking of a way to increment a column value integer
>> in a single operation - avoiding the need for a GET request
>> followed by a PUT request.
>>
>> Thanks
>>
>> Mark