public void registerTaskManager ( final TaskExecutorConnection taskExecutorConnection , SlotReport initialSlotReport ) { checkInit ( ) ; LOG . debug ( "Registering TaskManager {} under {} at the SlotManager." , taskExecutorConnection . getResourceID ( ) , taskExecutorConnection . getInstanceID ( ) ) ; // we identify task managers by their instance id if ( taskManagerRegistrations . containsKey ( taskExecutorConnection . getInstanceID ( ) ) ) { reportSlotStatus ( taskExecutorConnection . getInstanceID ( ) , initialSlotReport ) ; } else { // first register the TaskManager ArrayList < SlotID > reportedSlots = new ArrayList <> ( ) ; for ( SlotStatus slotStatus : initialSlotReport ) { reportedSlots . add ( slotStatus . getSlotID ( ) ) ; } TaskManagerRegistration taskManagerRegistration = new TaskManagerRegistration ( taskExecutorConnection , reportedSlots ) ; taskManagerRegistrations . put ( taskExecutorConnection . getInstanceID ( ) , taskManagerRegistration ) ; // next register the new slots for ( SlotStatus slotStatus : initialSlotReport ) { registerSlot ( slotStatus . getSlotID ( ) , slotStatus . getAllocationID ( ) , slotStatus . getJobID ( ) , slotStatus . getResourceProfile ( ) , taskExecutorConnection ) ; } } }
Registers a new task manager at the slot manager . This will make the task managers slots known and thus available for allocation .