hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 冯宏华 <fenghong...@xiaomi.com>
Subject 答复: How to pass multiple operations to HBase and be guaranteed of execution order
Date Fri, 14 Mar 2014 09:16:01 GMT
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
Mime
View raw message