Examples of unwrapRemoteException()


Examples of org.apache.hadoop.ipc.RemoteException.unwrapRemoteException()

    if (!(ioe instanceof RemoteException)) {
      return ioe;
    }

    final RemoteException re = (RemoteException)ioe;
    return re.unwrapRemoteException(AccessControlException.class,
        InvalidToken.class,
        AuthenticationException.class,
        AuthorizationException.class,
        FileAlreadyExistsException.class,
        FileNotFoundException.class,
View Full Code Here

Examples of org.apache.hadoop.ipc.RemoteException.unwrapRemoteException()

      if (cur instanceof EntityGroupMovedException) {
        res = (EntityGroupMovedException) cur;
      } else {
        if (cur instanceof RemoteException) {
          RemoteException re = (RemoteException) cur;
          Exception e = re
              .unwrapRemoteException(EntityGroupMovedException.class);
          if (e == null) {
            e = re.unwrapRemoteException();
          }
          // unwrapRemoteException can return the exception given as a parameter
View Full Code Here

Examples of org.apache.hadoop.ipc.RemoteException.unwrapRemoteException()

        if (cur instanceof RemoteException) {
          RemoteException re = (RemoteException) cur;
          Exception e = re
              .unwrapRemoteException(EntityGroupMovedException.class);
          if (e == null) {
            e = re.unwrapRemoteException();
          }
          // unwrapRemoteException can return the exception given as a parameter
          // when it cannot
          // unwrap it. In this case, there is no need to look further
          // noinspection ObjectEquality
View Full Code Here

Examples of org.apache.hadoop.ipc.RemoteException.unwrapRemoteException()

      } else if (status == Status.ERROR) {
        RpcException exceptionResponse = RpcException.parseDelimitedFrom(in);
        RemoteException remoteException = new RemoteException(
            exceptionResponse.getExceptionName(),
            exceptionResponse.getStackTrace());
        throw remoteException.unwrapRemoteException();
      } else if (status == Status.FATAL) {
        RpcException exceptionResponse = RpcException.parseDelimitedFrom(in);
        // Close the connection
        LOG.error("Fatal Exception.", exceptionResponse);
        RemoteException remoteException = new RemoteException(
View Full Code Here

Examples of org.apache.hadoop.ipc.RemoteException.unwrapRemoteException()

        // Close the connection
        LOG.error("Fatal Exception.", exceptionResponse);
        RemoteException remoteException = new RemoteException(
            exceptionResponse.getExceptionName(),
            exceptionResponse.getStackTrace());
        throw remoteException.unwrapRemoteException();
      } else {
        throw new IOException("What happened?");
      }
    } catch (Exception e) {
      if (e instanceof RemoteException) {
View Full Code Here

Examples of org.apache.hadoop.ipc.RemoteException.unwrapRemoteException()

          || cur instanceof RegionTooBusyException) {
        return cur;
      }
      if (cur instanceof RemoteException) {
        RemoteException re = (RemoteException) cur;
        cur = re.unwrapRemoteException(
            RegionOpeningException.class, RegionMovedException.class,
            RegionTooBusyException.class);
        if (cur == null) {
          cur = re.unwrapRemoteException();
        }
View Full Code Here

Examples of org.apache.hadoop.ipc.RemoteException.unwrapRemoteException()

        RemoteException re = (RemoteException) cur;
        cur = re.unwrapRemoteException(
            RegionOpeningException.class, RegionMovedException.class,
            RegionTooBusyException.class);
        if (cur == null) {
          cur = re.unwrapRemoteException();
        }
        // unwrapRemoteException can return the exception given as a parameter when it cannot
        //  unwrap it. In this case, there is no need to look further
        // noinspection ObjectEquality
        if (cur == re) {
View Full Code Here

Examples of org.apache.hadoop.ipc.RemoteException.unwrapRemoteException()

    RemoteException re;
    IOException ie;
   
    pe = new PathIOException(path);
    re = new RemoteException(PathIOException.class.getName(), "test constructor1");
    ie = re.unwrapRemoteException();
    assertTrue(ie instanceof PathIOException);
    ie = re.unwrapRemoteException(PathIOException.class);
    assertTrue(ie instanceof PathIOException);

    pe = new PathIOException(path, "constructor2");
View Full Code Here

Examples of org.apache.hadoop.ipc.RemoteException.unwrapRemoteException()

   
    pe = new PathIOException(path);
    re = new RemoteException(PathIOException.class.getName(), "test constructor1");
    ie = re.unwrapRemoteException();
    assertTrue(ie instanceof PathIOException);
    ie = re.unwrapRemoteException(PathIOException.class);
    assertTrue(ie instanceof PathIOException);

    pe = new PathIOException(path, "constructor2");
    re = new RemoteException(PathIOException.class.getName(), "test constructor2");
    ie = re.unwrapRemoteException();
View Full Code Here

Examples of org.apache.hadoop.ipc.RemoteException.unwrapRemoteException()

    ie = re.unwrapRemoteException(PathIOException.class);
    assertTrue(ie instanceof PathIOException);

    pe = new PathIOException(path, "constructor2");
    re = new RemoteException(PathIOException.class.getName(), "test constructor2");
    ie = re.unwrapRemoteException();
    assertTrue(ie instanceof PathIOException);
    ie = re.unwrapRemoteException(PathIOException.class);
    assertTrue(ie instanceof PathIOException);   
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.