Examples of RejectRequestException


Examples of com.google.appengine.tools.mapreduce.impl.shardedjob.RejectRequestException

        log.info("Skipping indirect memory allocation.");
      }
    } catch (OutOfMemoryError e) {
      log.info("Failed to allocate non-direct memory for sort: " + targetCapacity + " giving up");
    }
    throw new RejectRequestException("Failed to allocate memory for sort after "
        + MEMORY_ALLOCATION_ATTEMPTS + " attempts. Giving up.");
  }
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.impl.shardedjob.RejectRequestException

    boolean acquired = false;
    try {
      acquired = amountRemaining.tryAcquire(neededForRequest, TIME_TO_WAIT, TimeUnit.MILLISECONDS);
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      throw new RejectRequestException("Was interupted", e);
    }
    int remaining = amountRemaining.availablePermits();
    if (acquired) {
      log.info("Target available memory was " + (neededForRequest + remaining) + "mb is now "
          + remaining + "mb");
      return neededForRequest;
    } else {
      throw new RejectRequestException("Not enough estimated memory for request: "
          + (neededForRequest) + "mb only have " + remaining + "mb remaining out of "
          + TOTAL_CLAIMABLE_MEMORY_SIZE_MB + "mb");
    }
  }
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.