@Override public PendingAskUpdateResult updatePendingAsk( SchedulerRequestKey schedulerRequestKey, SchedulingRequest schedulingRequest, boolean recoverPreemptedRequestForAContainer) throws SchedulerInvalidResoureRequestException { throw new SchedulerInvalidResoureRequestException(this.getClass().getName() + " not be able to handle SchedulingRequest, there exists a " + "ResourceRequest with the same scheduler key=" + schedulerRequestKey + ", please send SchedulingRequest with a different allocationId and " + "priority"); }
assertTrue( "The thrown exception is not the expected one. Exception message: " + e.getMessage(), e.getMessage() .matches("Resource request is invalid for application " + "application[\\d_]+ because queue root\\.queueA has 0 "
private String throwExceptionWithMetaInfo(String message) { StringBuilder sb = new StringBuilder(); sb.append("AppId=").append(appSchedulingInfo.getApplicationId()).append( " Key=").append(this.schedulerRequestKey).append(". Exception message:") .append(message); throw new SchedulerInvalidResoureRequestException(sb.toString()); }
@Override public PendingAskUpdateResult updatePendingAsk( Collection<ResourceRequest> requests, boolean recoverPreemptedRequestForAContainer) { if (requests != null && !requests.isEmpty()) { throw new SchedulerInvalidResoureRequestException( this.getClass().getName() + " not be able to handle ResourceRequest, there exists a " + "SchedulingRequest with the same scheduler key=" + SchedulerRequestKey.create(requests.iterator().next()) + ", please send ResourceRequest with a different allocationId and " + "priority"); } // Do nothing return null; }
throw new SchedulerInvalidResoureRequestException("Trying to recover a " + "container request=" + newSchedulingRequest.toString() + ", however" + "there's no existing scheduling request, this should not happen."); throw new SchedulerInvalidResoureRequestException( "Invalid updated SchedulingRequest added to scheduler, " + " we only allows changing numAllocations for the updated " throw new SchedulerInvalidResoureRequestException( "numAllocation in ResourceSizing field must be >= 0, " + "updating schedulingRequest failed.");
throw new SchedulerInvalidResoureRequestException(String.format( "Resource request is invalid for application %s because queue %s " + "has 0 amount of resource for a resource type! "