private boolean updateSlot ( SlotID slotId , AllocationID allocationId , JobID jobId ) { final TaskManagerSlot slot = slots . get ( slotId ) ; if ( slot != null ) { final TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations . get ( slot . getInstanceId ( ) ) ; if ( taskManagerRegistration != null ) { updateSlotState ( slot , taskManagerRegistration , allocationId , jobId ) ; return true ; } else { throw new IllegalStateException ( "Trying to update a slot from a TaskManager " + slot . getInstanceId ( ) + " which has not been registered." ) ; } } else { LOG . debug ( "Trying to update unknown slot with slot id {}." , slotId ) ; return false ; } }
Updates a slot with the given allocation id .