/** * Unwraps an exception from a protobuf service into the underlying (expected) IOException. * This method will <strong>always</strong> throw an exception. * @param se the {@code ServiceException} instance to convert into an {@code IOException} */ public static void toIOException(ServiceException se) throws IOException { if (se == null) { throw new NullPointerException("Null service exception passed!"); } Throwable cause = se.getCause(); if (cause != null && cause instanceof IOException) { throw (IOException)cause; } throw new IOException(se); }
/** * Return the Exception thrown by the remote server wrapped in * ServiceException as cause. RemoteException are left untouched. * * @param e ServiceException that wraps IO exception thrown by the server * @return Exception wrapped in ServiceException. */ public static IOException getServiceException(org.apache.hbase.thirdparty.com.google.protobuf.ServiceException e) { Throwable t = e.getCause(); if (ExceptionUtil.isInterrupt(t)) { return ExceptionUtil.asInterrupt(t); } return t instanceof IOException ? (IOException) t : new HBaseIOException(t); }
Throwable cause = se.getCause(); if (cause != null && cause instanceof DoNotRetryIOException) { throw (DoNotRetryIOException)cause;
Assert.fail("The closeRegion should have been rejected"); } catch (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException se) { Assert.assertTrue(se.getCause() instanceof IOException); Assert.assertTrue(se.getCause().getMessage().contains("This RPC was intended for a different server")); Assert.fail("The openRegion should have been rejected"); } catch (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException se) { Assert.assertTrue(se.getCause() instanceof IOException); Assert.assertTrue(se.getCause().getMessage().contains("This RPC was intended for a different server")); } finally { openRegion(HTU, getRS(), hri);
/** * Unwraps an exception from a protobuf service into the underlying (expected) IOException. * This method will <strong>always</strong> throw an exception. * @param se the {@code ServiceException} instance to convert into an {@code IOException} */ public static void toIOException(ServiceException se) throws IOException { if (se == null) { throw new NullPointerException("Null service exception passed!"); } Throwable cause = se.getCause(); if (cause != null && cause instanceof IOException) { throw (IOException)cause; } throw new IOException(se); }
.mergeTableRegions(null, request); } catch (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException m) { Throwable t = m.getCause(); do { if (t instanceof MergeRegionException) {
/** * Return the Exception thrown by the remote server wrapped in * ServiceException as cause. RemoteException are left untouched. * * @param e ServiceException that wraps IO exception thrown by the server * @return Exception wrapped in ServiceException. */ public static IOException getServiceException( org.apache.hbase.thirdparty.com.google.protobuf.ServiceException e) { Throwable t = e.getCause(); if (ExceptionUtil.isInterrupt(t)) { return ExceptionUtil.asInterrupt(t); } return t instanceof IOException ? (IOException) t : new HBaseIOException(t); }
Throwable cause = se.getCause(); if (cause != null && cause instanceof DoNotRetryIOException) { throw (DoNotRetryIOException)cause;
/** * Unwraps an exception from a protobuf service into the underlying (expected) IOException. * This method will <strong>always</strong> throw an exception. * @param se the {@code ServiceException} instance to convert into an {@code IOException} */ public static void toIOException(ServiceException se) throws IOException { if (se == null) { throw new NullPointerException("Null service exception passed!"); } Throwable cause = se.getCause(); if (cause != null && cause instanceof IOException) { throw (IOException)cause; } throw new IOException(se); }
/** * Return the Exception thrown by the remote server wrapped in * ServiceException as cause. RemoteException are left untouched. * * @param e ServiceException that wraps IO exception thrown by the server * @return Exception wrapped in ServiceException. */ public static IOException getServiceException( org.apache.hbase.thirdparty.com.google.protobuf.ServiceException e) { Throwable t = e.getCause(); if (ExceptionUtil.isInterrupt(t)) { return ExceptionUtil.asInterrupt(t); } return t instanceof IOException ? (IOException) t : new HBaseIOException(t); }
Throwable cause = se.getCause(); if (cause != null && cause instanceof DoNotRetryIOException) { throw (DoNotRetryIOException)cause;
Assert.fail("The closeRegion should have been rejected"); } catch (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException se) { Assert.assertTrue(se.getCause() instanceof IOException); Assert.assertTrue(se.getCause().getMessage().contains("This RPC was intended for a different server")); Assert.fail("The openRegion should have been rejected"); } catch (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException se) { Assert.assertTrue(se.getCause() instanceof IOException); Assert.assertTrue(se.getCause().getMessage().contains("This RPC was intended for a different server")); } finally { openRegion(HTU, getRS(), hri);
.mergeTableRegions(null, request); } catch (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException m) { Throwable t = m.getCause(); do { if (t instanceof MergeRegionException) {