For HBase it's all byte[], so there's currently nothing as involved as
what you describe. What happens is that the second Put will overshadow
the first one, but both are accessible.

In the future I guess you could implement a coprocessor that does that
kind of check, but it's only available in trunk.

The closest you could do at the moment would be to do a Get first and
then do 
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HTable.html#checkAndPut(byte[],
byte[], byte[], byte[], org.apache.hadoop.hbase.client.Put)

J-D

On Thu, Jan 27, 2011 at 1:28 PM, Hiller, Dean  (Contractor)
<[email protected]> wrote:
> Tthere is this really really cool feature in gemfire for conflict
> resolution(and I hope hbase has something similar here as it seems so
> clean).  You can implement an interface that gets called just before the
> write to storage that gives you the old value and the new value(and is
> single threaded for that row so multiple updates on that row are in same
> thread).
>
>
>
> Perfect example
>
> Key="myCar" value=contains people A, B, C version 4
>
>
>
> A put done from node 1 and a put done from node 2 at the same time
>
> 1.       Put people A, B, C, D version 4
>
> 2.       Put people A, B, C, E version 4
>
>
>
> So the conflict resolver can put 1 fine but then on 2, it can see that
> version is 5 on oldValue and can merge A, b, C, E with A, B, C, D
> resulting in the full list A, B, C, D, E.  this is a dang nice feature.
>
>
>
> Does hbase have something similar that one can implement that gets
> called on each node out there to do conflict resolution?
>
>
>
> Thanks,
>
> Dean
>
>
>
>
>
>
> This message and any attachments are intended only for the use of the 
> addressee and
> may contain information that is privileged and confidential. If the reader of 
> the
> message is not the intended recipient or an authorized representative of the
> intended recipient, you are hereby notified that any dissemination of this
> communication is strictly prohibited. If you have received this communication 
> in
> error, please notify us immediately by e-mail and delete the message and any
> attachments from your system.
>
>

Reply via email to