hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeremy p <athomewithagroove...@gmail.com>
Subject Re: 答复: How to pass multiple operations to HBase and be guaranteed of execution order
Date Tue, 18 Mar 2014 18:09:35 GMT
Thanks for the info.  I was hoping to batch my get and put calls for
greater efficiency, but this operation requires them to be run in order.
 Sounds like batching is not an option.


On Fri, Mar 14, 2014 at 2:16 AM, 冯宏华 <fenghonghua@xiaomi.com> wrote:

> your understanding of batch is correct, multiple put() and get() against a
> same region in a single batch() operation will be executed as multiple sub
> steps, all operations on the same region are iterated one by one, the get()
> will be executed immediately and serially, while the put() will be
> accumulated as iterated first(batched and delayed) and then executed in a
> batch fashion after all mutations are collected, so you can assume the
> get() always can't get the result of put() in the same batch()...
> IMHO, seems the only way to guarantee multiple get() and put() be executed
> in the order you provide is to execute them serially where the latter is
> always issued after the former is returned successfully.
> ________________________________________
> 发件人: jeremy p [athomewithagroovebox@gmail.com]
> 发送时间: 2014年3月14日 6:39
> 收件人: user@hbase.apache.org
> 主题: How to pass multiple operations to HBase and be guaranteed of
> execution order
> Hello all,
> The documentation for htable.batch() warns us :
> "The execution ordering of the actions is not defined. Meaning if you do a
> Put and a Get in the same batch() call, you will not necessarily be
> guaranteed that the Get returns what the Put had put."
> Is there a way to pass multiple get() and put() calls to HBase and be
> guaranteed that they will be executed in the order that you provide?
> --Jeremy

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message