Returns a Deferred containing an exception when an RPC couldn't succeed after too many attempts. @param request The RPC that was retried too many times. @param cause What was cause of the last failed attempt, if known. You can pass null if the cause is unknown.
(final HBaseRpc request,
final HBaseException cause)
| 2547 | * You can pass {@code null} if the cause is unknown. |
| 2548 | */ |
| 2549 | static Deferred<Object> tooManyAttempts(final HBaseRpc request, |
| 2550 | final HBaseException cause) { |
| 2551 | // TODO(tsuna): At this point, it's possible that we have to deal with |
| 2552 | // a broken META table where there's a hole. For the sake of good error |
| 2553 | // reporting, at this point we should try to getClosestRowBefore + scan |
| 2554 | // META in order to verify whether there's indeed a hole, and if there's |
| 2555 | // one, throw a BrokenMetaException explaining where the hole is. |
| 2556 | final Exception e = new NonRecoverableException("Too many attempts: " |
| 2557 | + request, cause); |
| 2558 | request.callback(e); |
| 2559 | return Deferred.fromError(e); |
| 2560 | } |
| 2561 | |
| 2562 | /** |
| 2563 | * A method, similar to {@link #discoverRegion} that parses the meta row |