For checkAndPut, is there a column that you know will exist that
you're not updating that you know for sure which value it will have?
Worst case you could use a dummy column just for that.

For increments, I can't think of a way to do it without either
implementing a checkAndIncrement or doing 2 roundtrips.

J-D

On Wed, Sep 14, 2011 at 7:00 PM, sagar naik <[email protected]> wrote:
> Hello Friends,
>
> We have a case in our application where we need to update values or
> increment values only if the row is present.
> Primary reason being, row key received may be corrupt or invalid. We dont
> want to create dangling rows.
>
> Obviously,
>  - get row key and check if the row exists, then update is a costly call. 2
> round trips for each update
>  - checkAndPut -> one needs to knw row,family,qualifer and value to
> accomplish this. I initially thought passing just rowkey and value=rowKey
> will work. But, u need all the arguments.
>  - Is there any hack u can recommend to work around this problem.
>  - Also, for increment, how do I implement it.
>
> In short, any update/increment should happen only if row key is present. So
> this will help me achieve some data integrity
>
>
> Thanks
> The community is super helpful
> So Thanks again :)
>
> -Sagar
>

Reply via email to