private void removeSlot ( SlotID slotId ) { TaskManagerSlot slot = slots . remove ( slotId ) ; if ( null != slot ) { freeSlots . remove ( slotId ) ; if ( slot . getState ( ) == TaskManagerSlot . State . PENDING ) { // reject the pending slot request --> triggering a new allocation attempt rejectPendingSlotRequest ( slot . getAssignedSlotRequest ( ) , new Exception ( "The assigned slot " + slot . getSlotId ( ) + " was removed." ) ) ; } AllocationID oldAllocationId = slot . getAllocationId ( ) ; if ( oldAllocationId != null ) { fulfilledSlotRequests . remove ( oldAllocationId ) ; resourceActions . notifyAllocationFailure ( slot . getJobId ( ) , oldAllocationId , new FlinkException ( "The assigned slot " + slot . getSlotId ( ) + " was removed." ) ) ; } } else { LOG . debug ( "There was no slot registered with slot id {}." , slotId ) ; } }
Removes the given slot from the slot manager .