throwable -> { LOG.info("Batch request {} slots, but only {} are fulfilled.", allAssignFutures.getNumFuturesTotal(), allAssignFutures.getNumFuturesCompleted());
int numTotal = allAllocationsFuture.getNumFuturesTotal(); int numComplete = allAllocationsFuture.getNumFuturesCompleted(); String message = "Could not allocate all requires slots within timeout of " +
int numTotal = allAllocationsFuture.getNumFuturesTotal(); int numComplete = allAllocationsFuture.getNumFuturesCompleted(); String message = "Could not allocate all requires slots within timeout of " +
@Override public void run() { // When the timeout triggers, we try to complete the conjunct future with an exception. // Note that this is a no-op if the future is already completed int numTotal = allAllocationsComplete.getNumFuturesTotal(); int numComplete = allAllocationsComplete.getNumFuturesCompleted(); String message = "Could not allocate all requires slots within timeout of " + timeout + ". Slots required: " + numTotal + ", slots allocated: " + numComplete; allAllocationsComplete.completeExceptionally(new NoResourceAvailableException(message)); } }, timeout.getSize(), timeout.getUnit());