Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase, mail # user - HTable batch execution order


Copy link to this message
-
Re: HTable batch execution order
Harsh J 2012-08-23, 14:12
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 <[EMAIL PROTECTED]> 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