Package org.apache.hadoop.ipc

Examples of org.apache.hadoop.ipc.RemoteException


    while (res == null && cur != null) {
      if (cur instanceof RegionOpeningException) {
        res = (RegionOpeningException) cur;
      } else {
        if (cur instanceof RemoteException) {
          RemoteException re = (RemoteException) cur;
          Exception e = re.unwrapRemoteException(RegionOpeningException.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
          if (e != re) {
View Full Code Here


    while (res == null && cur != null) {
      if (cur instanceof RegionMovedException) {
        res = (RegionMovedException) cur;
      } else {
        if (cur instanceof RemoteException) {
          RemoteException re = (RemoteException) cur;
          Exception e = re.unwrapRemoteException(RegionMovedException.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
          if (e != re){
View Full Code Here

        }
        int state = in.readInt(); // Read the state.  Currently unused.
        if (isError) {
          if (call != null) {
            //noinspection ThrowableInstanceNeverThrown
            call.setException(new RemoteException(WritableUtils.readString(in),
                WritableUtils.readString(in)));
          }
        } else {
          Writable value = ReflectionUtils.newInstance(valueClass, conf);
          value.readFields(in);                 // read value
View Full Code Here

  }

  private static void readStatus(DataInputStream inStream) throws IOException {
    int status = inStream.readInt(); // read status
    if (status != SaslStatus.SUCCESS.state) {
      throw new RemoteException(WritableUtils.readString(inStream),
          WritableUtils.readString(inStream));
    }
  }
View Full Code Here

        Call call = calls.get(id);

        boolean isError = in.readBoolean();     // read if error
        if (isError) {
          //noinspection ThrowableInstanceNeverThrown
          call.setException(new RemoteException( WritableUtils.readString(in),
              WritableUtils.readString(in)));
          calls.remove(id);
        } else {
          Writable value = ReflectionUtils.newInstance(valueClass, conf);
          value.readFields(in);                 // read value
View Full Code Here

  public void alwaysFailsWithFatalException() throws FatalException {
    throw new FatalException();
  }
 
  public void alwaysFailsWithRemoteFatalException() throws RemoteException {
    throw new RemoteException(FatalException.class.getName(), "Oops");
  }
View Full Code Here

    case UNRELIABLE_EXCEPTION:
      throw new UnreliableException(message);
    case IO_EXCEPTION:
      throw new IOException(message);
    case REMOTE_EXCEPTION:
      throw new RemoteException(IOException.class.getName(), message);
    default:
      throw new RuntimeException(message);
    }
  }
View Full Code Here

    while (res == null && cur != null) {
      if (cur instanceof RegionMovedException) {
        res = (RegionMovedException) cur;
      } else {
        if (cur instanceof RemoteException) {
          RemoteException re = (RemoteException) cur;
          Exception e = re.unwrapRemoteException(RegionMovedException.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
          if (e != re){
View Full Code Here

            whatIsLeftToRead + " bytes");
          IOUtils.skipFully(in, whatIsLeftToRead);
        }
        if (responseHeader.hasException()) {
          ExceptionResponse exceptionResponse = responseHeader.getException();
          RemoteException re = createRemoteException(exceptionResponse);
          if (isFatalConnectionException(exceptionResponse)) {
            markClosed(re);
          } else {
            if (call != null) call.setException(re);
          }
View Full Code Here

      if (cur instanceof RegionMovedException || cur instanceof RegionOpeningException
          || 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();
        }
        // 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

TOP

Related Classes of org.apache.hadoop.ipc.RemoteException

Copyright © 2018 www.massapicom. 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.