/** * @throws InterruptedIOException if t was an interruption. Does nothing otherwise. */ public static void rethrowIfInterrupt(Throwable t) throws InterruptedIOException { InterruptedIOException iie = asInterrupt(t); if (iie != null) throw iie; }
private static IOException makeIOExceptionOfException(Exception e) { Throwable t = e; if (e instanceof ServiceException) { t = e.getCause(); } if (ExceptionUtil.isInterrupt(t)) { return ExceptionUtil.asInterrupt(t); } if (t instanceof RemoteException) { t = ((RemoteException)t).unwrapRemoteException(); } return t instanceof IOException? (IOException)t: new HBaseIOException(t); }
private static IOException makeIOExceptionOfException(Exception e) { Throwable t = e; if (e instanceof ServiceException || e instanceof org.apache.hbase.thirdparty.com.google.protobuf.ServiceException) { t = e.getCause(); } if (ExceptionUtil.isInterrupt(t)) { return ExceptionUtil.asInterrupt(t); } if (t instanceof RemoteException) { t = ((RemoteException)t).unwrapRemoteException(); } return t instanceof IOException? (IOException)t: new HBaseIOException(t); }
/** * 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); }
IOException e = ExceptionUtil.asInterrupt(t); if (e == null) { this.rpcClient.failedServers.addToFailedServers(remoteId.address, t);
} catch (InterruptedException e) { close(); throw ExceptionUtil.asInterrupt(e);
} catch (InterruptedException e) { close(); throw ExceptionUtil.asInterrupt(e);
private static IOException makeIOExceptionOfException(Exception e) { Throwable t = e; if (e instanceof ServiceException) { t = e.getCause(); } if (ExceptionUtil.isInterrupt(t)) { return ExceptionUtil.asInterrupt(t); } if (t instanceof RemoteException) { t = ((RemoteException)t).unwrapRemoteException(); } return t instanceof IOException? (IOException)t: new HBaseIOException(t); }
private static IOException makeIOExceptionOfException(Exception e) { Throwable t = e; if (e instanceof ServiceException || e instanceof org.apache.hbase.thirdparty.com.google.protobuf.ServiceException) { t = e.getCause(); } if (ExceptionUtil.isInterrupt(t)) { return ExceptionUtil.asInterrupt(t); } if (t instanceof RemoteException) { t = ((RemoteException)t).unwrapRemoteException(); } return t instanceof IOException? (IOException)t: new HBaseIOException(t); }
/** * 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); }
IOException e = ExceptionUtil.asInterrupt(t); if (e == null) { this.rpcClient.failedServers.addToFailedServers(remoteId.address, t);
} catch (InterruptedException e) { close(); throw ExceptionUtil.asInterrupt(e);
/** * @throws InterruptedIOException if t was an interruption. Does nothing otherwise. */ public static void rethrowIfInterrupt(Throwable t) throws InterruptedIOException { InterruptedIOException iie = asInterrupt(t); if (iie != null) throw iie; }
/** * @throws InterruptedIOException if t was an interruption. Does nothing otherwise. */ public static void rethrowIfInterrupt(Throwable t) throws InterruptedIOException { InterruptedIOException iie = asInterrupt(t); if (iie != null) throw iie; }
/** * @throws InterruptedIOException if t was an interruption. Does nothing otherwise. */ public static void rethrowIfInterrupt(Throwable t) throws InterruptedIOException { InterruptedIOException iie = asInterrupt(t); if (iie != null) throw iie; }
private static IOException makeIOExceptionOfException(Exception e) { Throwable t = e; if (e instanceof ServiceException) { t = e.getCause(); } if (ExceptionUtil.isInterrupt(t)) { return ExceptionUtil.asInterrupt(t); } if (t instanceof RemoteException) { t = ((RemoteException)t).unwrapRemoteException(); } return t instanceof IOException? (IOException)t: new HBaseIOException(t); }
private static IOException makeIOExceptionOfException(Exception e) { Throwable t = e; if (e instanceof ServiceException || e instanceof org.apache.hbase.thirdparty.com.google.protobuf.ServiceException) { t = e.getCause(); } if (ExceptionUtil.isInterrupt(t)) { return ExceptionUtil.asInterrupt(t); } if (t instanceof RemoteException) { t = ((RemoteException)t).unwrapRemoteException(); } return t instanceof IOException? (IOException)t: new HBaseIOException(t); }
/** * Return the IOException thrown by the remote server wrapped in * ServiceException as cause. * * @param se ServiceException that wraps IO exception thrown by the server * @return Exception wrapped in ServiceException or * a new IOException that wraps the unexpected ServiceException. */ public static IOException getRemoteException(ServiceException se) { Throwable e = se.getCause(); if (e == null) { return new IOException(se); } if (ExceptionUtil.isInterrupt(e)) { return ExceptionUtil.asInterrupt(e); } if (e instanceof RemoteException) { e = ((RemoteException) e).unwrapRemoteException(); } return e instanceof IOException ? (IOException) e : new IOException(se); }
/** * Set failed * * @param exception to set */ public void setFailed(IOException exception) { if (ExceptionUtil.isInterrupt(exception)) { exception = ExceptionUtil.asInterrupt(exception); } if (exception instanceof RemoteException) { exception = ((RemoteException) exception).unwrapRemoteException(); } this.setFailure(exception); }
/** * 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); }