hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angus He <angu...@gmail.com>
Subject Re: Is it safe to use timestamps (or versions) to load old values.
Date Thu, 15 Jul 2010 09:16:17 GMT
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).


View raw message