hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Marc Spaggiari <jean-m...@spaggiari.org>
Subject Re: Batch returned value and exception handling.
Date Thu, 14 Mar 2013 17:52:27 GMT
Hi Amit,

Just take a look at the processBatchCallback method in HConnectionManager.

There you will see how the result is populated, and when an exception
is returned.

In your example below, if you look at the content of the returned
array, you should see one cell with the result of the increment, and
one cell with a Throwable into it.

JM

2013/3/14 Amit Sela <amits@infolinks.com>:
> Hi all,
>
> I did some testing with HTableInterface#batch() for batching Increments and
> I was wondering about the returned value Object[].
>
> As I understand (or would expect), the returned value would be:
>
> null - all batch of increments failed.
> An object in the array is null / is Exception - that increment has failed.
>
> So I ran some tests and executed a batch of two Increment Objects on two
> different row keys, where one of them is valid and the other one has a
> family that does not exist.
> When calling HTableInterface#batch() I
> get RetriesExhaustedWithDetailsException but looking at the counter in
> HBase it looks like the valid increment was executed.
>
> Shouldn't I get an Object[2] where one of the objects is null
> / RetriesExhaustedWithDetailsException ?
>
> How can I know # of success/failures in the batch ? What is the "contract"
> here ?
>
> Thanks,
>
> Amit.

Mime
View raw message