Package org.apache.hadoop.io.retry.UnreliableInterface

Examples of org.apache.hadoop.io.retry.UnreliableInterface.UnreliableException


    throw new RemoteException(FatalException.class.getName(), "Oops");
  }

  public void failsOnceThenSucceeds() throws UnreliableException {
    if (failsOnceInvocationCount++ == 0) {
      throw new UnreliableException();
    }
  }
View Full Code Here


    }
  }

  public boolean failsOnceThenSucceedsWithReturnValue() throws UnreliableException {
    if (failsOnceWithValueInvocationCount++ == 0) {
      throw new UnreliableException();
    }
    return true;
  }
View Full Code Here

    return true;
  }

  public void failsTenTimesThenSucceeds() throws UnreliableException {
    if (failsTenTimesInvocationCount++ < 10) {
      throw new UnreliableException();
    }
  }
View Full Code Here

      String message) throws UnreliableException, StandbyException, IOException {
    switch (eType) {
    case STANDBY_EXCEPTION:
      throw new StandbyException(message);
    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:
View Full Code Here

TOP

Related Classes of org.apache.hadoop.io.retry.UnreliableInterface.UnreliableException

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.