@Override public Void apply(Acknowledge acknowledge, Throwable throwable) { if (acknowledge != null) { updateSlot(slotId, allocationId); } else { if (throwable instanceof SlotOccupiedException) { SlotOccupiedException exception = (SlotOccupiedException) throwable; updateSlot(slotId, exception.getAllocationId()); } else { removeSlotRequestFromSlot(slotId, allocationId); } if (!(throwable instanceof CancellationException)) { handleFailedSlotRequest(slotId, allocationId, throwable); } else { LOG.debug("Slot allocation request {} has been cancelled.", allocationId, throwable); } } return null; } }, mainThreadExecutor);
if (throwable instanceof SlotOccupiedException) { SlotOccupiedException exception = (SlotOccupiedException) throwable; updateSlot(slotId, exception.getAllocationId(), exception.getJobId()); } else { removeSlotRequestFromSlot(slotId, allocationId);
if (throwable instanceof SlotOccupiedException) { SlotOccupiedException exception = (SlotOccupiedException) throwable; updateSlot(slotId, exception.getAllocationId(), exception.getJobId()); } else { removeSlotRequestFromSlot(slotId, allocationId);
if (throwable instanceof SlotOccupiedException) { SlotOccupiedException exception = (SlotOccupiedException) throwable; updateSlot(slotId, exception.getAllocationId(), exception.getJobId()); } else if (throwable instanceof AskTimeoutException || throwable instanceof CancellationException) { syncSlotForSlotRequest(slotId, allocationId);