You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Mark Jarecki <mj...@bigpond.net.au> on 2011/05/25 10:47:26 UTC
REST & Atomic increment
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
Re: REST & Atomic increment
Posted by Mark Jarecki <mj...@bigpond.net.au>.
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 <mj...@bigpond.net.au> wrote:
>
>> From: Mark Jarecki <mj...@bigpond.net.au>
>> Subject: REST & Atomic increment
>> To: user@hbase.apache.org
>> 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
Re: REST & Atomic increment
Posted by Andrew Purtell <ap...@apache.org>.
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 <mj...@bigpond.net.au> wrote:
> From: Mark Jarecki <mj...@bigpond.net.au>
> Subject: REST & Atomic increment
> To: user@hbase.apache.org
> 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