| 899 | } |
| 900 | |
| 901 | private Object handleException(final Exception e) { |
| 902 | if (!(e instanceof RecoverableException)) { |
| 903 | |
| 904 | if (e instanceof HBaseException){ |
| 905 | HBaseException ex = (HBaseException)e; |
| 906 | for (final BatchableRpc rpc : request.batch()) { |
| 907 | rpc.callback(ex.make(ex, rpc)); |
| 908 | } |
| 909 | } else{ |
| 910 | for (final BatchableRpc rpc : request.batch()) { |
| 911 | rpc.callback(e); |
| 912 | } |
| 913 | } |
| 914 | |
| 915 | return e; // Can't recover from this error, let it propagate. |
| 916 | } |
| 917 | if (LOG.isDebugEnabled()) { |
| 918 | LOG.debug("Multi-action request failed, retrying each of the " |
| 919 | + request.size() + " RPCs individually.", e); |
| 920 | } |
| 921 | for (final BatchableRpc rpc : request.batch()) { |
| 922 | retryEdit(rpc, (RecoverableException) e); |
| 923 | } |
| 924 | return null; // We're retrying, so let's call it a success for now. |
| 925 | } |
| 926 | |
| 927 | public String toString() { |
| 928 | return "multi-action response"; |