Package org.apache.hadoop.ipc

Examples of org.apache.hadoop.ipc.StandbyException


      }
      if (OperationCategory.JOURNAL != op &&
          !(OperationCategory.READ == op && allowStaleStandbyReads)) {
        String msg = "Operation category " + op
            + " is not supported at the BackupNode";
        throw new StandbyException(msg);
      }
    }
View Full Code Here


      }
      if (OperationCategory.JOURNAL != op &&
          !(OperationCategory.READ == op && !isRole(NamenodeRole.CHECKPOINT))) {
        String msg = "Operation category " + op
            + " is not supported at " + getRole();
        throw new StandbyException(msg);
      }
    }
View Full Code Here

  private static void throwAppropriateException(TypeOfExceptionToFailWith eType,
      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:
View Full Code Here

      }
      if (OperationCategory.JOURNAL != op &&
          !(OperationCategory.READ == op && !isRole(NamenodeRole.CHECKPOINT))) {
        String msg = "Operation category " + op
            + " is not supported at " + getRole();
        throw new StandbyException(msg);
      }
    }
View Full Code Here

      }
      if (OperationCategory.JOURNAL != op &&
          !(OperationCategory.READ == op && !isRole(NamenodeRole.CHECKPOINT))) {
        String msg = "Operation category " + op
            + " is not supported at " + getRole();
        throw new StandbyException(msg);
      }
    }
View Full Code Here

  private synchronized boolean isRMActive() {
    return HAServiceState.ACTIVE == rmContext.getHAServiceState();
  }

  private void throwStandbyException() throws StandbyException {
    throw new StandbyException("ResourceManager " + rmId + " is not Active!");
  }
View Full Code Here

  private static void throwAppropriateException(TypeOfExceptionToFailWith eType,
      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:
View Full Code Here

  private synchronized boolean isRMActive() {
    return HAServiceState.ACTIVE == rmContext.getHAServiceState();
  }

  private void throwStandbyException() throws StandbyException {
    throw new StandbyException("ResourceManager " + rmId + " is not Active!");
  }
View Full Code Here

    if (succeedsOnceThenFailsCount++ < 1) {
      return identifier;
    } else {
      switch (exceptionToFailWith) {
      case STANDBY_EXCEPTION:
        throw new StandbyException(identifier);
      case UNRELIABLE_EXCEPTION:
        throw new UnreliableException(identifier);
      case IO_EXCEPTION:
        throw new IOException(identifier);
      }
View Full Code Here

    if (succeedsTenTimesThenFailsCount++ < 10) {
      return identifier;
    } else {
      switch (exceptionToFailWith) {
      case STANDBY_EXCEPTION:
        throw new StandbyException(identifier);
      case UNRELIABLE_EXCEPTION:
        throw new UnreliableException(identifier);
      case IO_EXCEPTION:
        throw new IOException(identifier);
      default:
View Full Code Here

TOP

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

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.