public static InterruptedIOException asInterrupt(Throwable t) {
    if (t instanceof SocketTimeoutException) {
      return null;
    }

    if (t instanceof InterruptedIOException) {
      return (InterruptedIOException) t;
    }

    if (t instanceof InterruptedException || t instanceof ClosedByInterruptException) {
      InterruptedIOException iie =
        new InterruptedIOException("Origin: " + t.getClass().getSimpleName());
      iie.initCause(t);
      return iie;
    }

    return null;
  }
Returns an InterruptedIOException if t was an interruption, null otherwise
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ExceptionUtil.java