You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by "S. Zhou" <my...@yahoo.com> on 2013/12/31 20:17:27 UTC

how to get the failed rows when executing a batch PUT request?

I checked the Java doc on "put(List<Put> puts)" of HTableInterface and it does not say how to get the failed rows in case exception happened (see below): can I assume the failed rows are contained in "puts" list?

Throws:
InterruptedIOException
RetriesExhaustedWithDetailsException

Compared to the Java doc of "delete(List<Delete> deletes)", it clearly says how to get failed rows:

Throws:
IOException - if a remote or network exception occurs. In that case the deletes argument will contain the Delete instances that have not be successfully applied.

Re: how to get the failed rows when executing a batch PUT request?

Posted by lars hofhansl <la...@apache.org>.
The RetriesExhaustedWithDetailsException will have the details.
This API needs to be cleaned up.

In general the HBase API is designed so that all operations are idempotent, so that they can be redone. If a batch put returns without any error you know all puts are safely at a RegionServer. If there's an error you might have partial results. You best option is to retry again.

-- Lars



________________________________
 From: S. Zhou <my...@yahoo.com>
To: "user@hbase.apache.org" <us...@hbase.apache.org> 
Sent: Tuesday, December 31, 2013 11:17 AM
Subject: how to get the failed rows when executing a batch PUT request?
 

I checked the Java doc on "put(List<Put> puts)" of HTableInterface and it does not say how to get the failed rows in case exception happened (see below): can I assume the failed rows are contained in "puts" list?

Throws:
InterruptedIOException
RetriesExhaustedWithDetailsException

Compared to the Java doc of "delete(List<Delete> deletes)", it clearly says how to get failed rows:

Throws:
IOException - if a remote or network exception occurs. In that case the deletes argument will contain the Delete instances that have not be successfully applied.