(final Exception ex)
| 2781 | */ |
| 2782 | class ErrorCB implements Callback<Deferred<Object>, Exception> { |
| 2783 | @Override |
| 2784 | public Deferred<Object> call(final Exception ex) throws Exception { |
| 2785 | Throwable cause = ex; |
| 2786 | if (ex instanceof DeferredGroupException) { |
| 2787 | cause = ((DeferredGroupException) ex).getCause(); |
| 2788 | } |
| 2789 | if (cause instanceof UnknownProtocolException) { |
| 2790 | // we may be using 2.0 so we need to try scanning meta |
| 2791 | // instead of calling getClosestRowBefore |
| 2792 | LOG.info("HBase may be running version 2.0 or newer. " |
| 2793 | + "Trying to search meta via scan instead of gets."); |
| 2794 | scan_meta = true; // volatile flag |
| 2795 | return locateRegion(request, |
| 2796 | table, |
| 2797 | key, |
| 2798 | closest_before, |
| 2799 | return_location); |
| 2800 | } |
| 2801 | throw ex; |
| 2802 | } |
| 2803 | } |
| 2804 | |
| 2805 | if (return_location) { |
nothing calls this directly
no test coverage detected