Description
This was brought up by Amit's inquiry on mailing list, entitled 'Batch returned value and exception handling'
Here is his sample code:
Object[] res = null; try { res = table.batch(batch); } catch (RetriesExhaustedWithDetailsException retriesExhaustedWithDetailsException) { retriesExhaustedWithDetailsException.printStackTrace(); } if (res == null) { System.out.println("No results - returned null."); }
When RetriesExhaustedWithDetailsException was thrown from batch() call, variable res carried value of null.
Meaning user wouldn't get partial result along with the exception.
We should deprecate
HTable#batch(final List<? extends Row>)
and refer to the following method:
void batch(final List<?extends Row> actions, final Object[] results) throws IOException, InterruptedException;