MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / handleException

Method handleException

src/HBaseClient.java:1380–1408  ·  view source on GitHub ↗
(final Exception e)

Source from the content-addressed store, hash-verified

1378 }
1379
1380 private Object handleException(final Exception e) {
1381 if (!(e instanceof RecoverableException)) {
1382 for (final BatchableRpc rpc : request.batch()) {
1383 rpc.callback(e);
1384 }
1385 return e; // Can't recover from this error, let it propagate.
1386 }
1387 if (LOG.isDebugEnabled()) {
1388 LOG.debug(this + " Multi-action request failed, retrying each of the "
1389 + request.size() + " RPCs individually.", e);
1390 }
1391 for (final BatchableRpc rpc : request.batch()) {
1392 if (e instanceof NotServingRegionException ||
1393 e instanceof RegionMovedException ||
1394 e instanceof RegionServerStoppedException) {
1395 try {
1396 handleNSRE(rpc, rpc.getRegion().name(),
1397 (NotServingRegionException) e);
1398 } catch (RuntimeException ex) {
1399 LOG.error("Unexpected exception trying to NSRE the RPC " + rpc, ex);
1400 rpc.callback(ex);
1401 }
1402 } else {
1403 // TODO - potentially retry?
1404 //retryEdit(rpc, (RecoverableException) e);
1405 }
1406 }
1407 return null; // We're retrying, so let's call it a success for now.
1408 }
1409
1410 public String toString() {
1411 return "multi-action response";

Callers 1

callMethod · 0.95

Calls 6

batchMethod · 0.80
handleNSREMethod · 0.80
callbackMethod · 0.45
sizeMethod · 0.45
nameMethod · 0.45
getRegionMethod · 0.45

Tested by

no test coverage detected