hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <ha...@cloudera.com>
Subject Re: HTable batch execution order
Date Thu, 23 Aug 2012 14:12:48 GMT
Hi Shagun,

The original ordering index is still maintained.

Yes you will have them back in order. Don't be confused by that
javadoc statement. The result list is ordered in the same way as the
actions list, but the "order" of which they are executed depends on
variable things, and hence the statement "The Get may not return what
the Put, in the same batch, had put".

On Thu, Aug 23, 2012 at 2:49 PM, Shagun Agarwal <shagun@yahoo-inc.com> wrote:
> Hi,
>
> I have a question about HTable.batch(List<? extends Row> actions,Object[] results)
API, according to java doc -The ordering of execution 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.
> however my question is if I don't mix up the actions & only provide Get action, do
I get the result in same order in which Get was provided.
> e.g if I provide 3 Get with row keys [r1, r2, r3], will I get [result1, result2, result3]?
>
> Thanks
> Shagun Agarwal



-- 
Harsh J

Mime
View raw message