public void freeAllSlots ( Cluster cluster ) { if ( ! _isAlive ) { LOG . warn ( "Freeing all slots on a dead node {} " , _nodeId ) ; } for ( Entry < String , Set < WorkerSlot > > entry : _topIdToUsedSlots . entrySet ( ) ) { cluster . freeSlots ( entry . getValue ( ) ) ; if ( _isAlive ) { _freeSlots . addAll ( entry . getValue ( ) ) ; } } _topIdToUsedSlots = new HashMap <> ( ) ; }
Free all slots on this node . This will update the Cluster too .