hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Stepachev <oct...@gmail.com>
Subject Re: Is it safe to use timestamps (or versions) to load old values.
Date Thu, 15 Jul 2010 09:31:58 GMT
Thanks for reply.
But it is huge data load, and checkAndPut use get internally.
It leads to significant slowdown (70k records per host vs 0.4k records
per host).


2010/7/15 Angus He <angushe@gmail.com>:
> HTable.checkAndPut might be useful in your case.
>
>  public synchronized boolean checkAndPut(final byte [] row,
>      final byte [] family, final byte [] qualifier, final byte [] value,
>      final Put put)
>
> Try to populate the parameter <value> and <put> with the data from
> your loaders. If the value matches the cell stored in hbase, then just
> rewrite the same value again, if not, the cell value in hbase must be
> changed by users earlier, and hbase will skip the put.
>
> On Thu, Jul 15, 2010 at 4:44 PM, Andrey Stepachev <octo47@gmail.com> wrote:
>> By mistake email was sent ;).
>>
>> To be more specific, here is example of my schema
>>
>> table bsn.main:
>> key: long
>> family: names
>>     type:date:version => json object
>> family: addresses
>>     type:date:version => json object
>> etc.
>>
>> so, loader can put old name into names with old data (even if some
>> name json object was updated).
>> in such case i increment version and later remove multiple version (to
>> save space and time).
>>
>
>
>
> --
> Regards
> Angus
>

Mime
View raw message