Skip to content

Commit

Permalink
Added the real RPC to the HBaseException if one is thrown from a Mult…
Browse files Browse the repository at this point in the history
…iAction RPC.

Signed-off-by: Chris Larsen <clarsen@yahoo-inc.com>
  • Loading branch information
Mike authored and manolama committed Sep 17, 2016
1 parent d9587c9 commit 22120c1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/RegionClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -896,9 +896,18 @@ public Object call(final Object resp) {

private Object handleException(final Exception e) {
if (!(e instanceof RecoverableException)) {
for (final BatchableRpc rpc : request.batch()) {
rpc.callback(e);

if (e instanceof HBaseException){
HBaseException ex = (HBaseException)e;
for (final BatchableRpc rpc : request.batch()) {
rpc.callback(ex.make(ex, rpc));
}
} else{
for (final BatchableRpc rpc : request.batch()) {
rpc.callback(e);
}
}

return e; // Can't recover from this error, let it propagate.
}
if (LOG.isDebugEnabled()) {
Expand Down

0 comments on commit 22120c1

Please sign in to comment.