public boolean registerSlotRequest ( SlotRequest slotRequest ) throws SlotManagerException { checkInit ( ) ; if ( checkDuplicateRequest ( slotRequest . getAllocationId ( ) ) ) { LOG . debug ( "Ignoring a duplicate slot request with allocation id {}." , slotRequest . getAllocationId ( ) ) ; return false ; } else { PendingSlotRequest pendingSlotRequest = new PendingSlotRequest ( slotRequest ) ; pendingSlotRequests . put ( slotRequest . getAllocationId ( ) , pendingSlotRequest ) ; try { internalRequestSlot ( pendingSlotRequest ) ; } catch ( ResourceManagerException e ) { // requesting the slot failed --> remove pending slot request pendingSlotRequests . remove ( slotRequest . getAllocationId ( ) ) ; throw new SlotManagerException ( "Could not fulfill slot request " + slotRequest . getAllocationId ( ) + ' ' , e ) ; } return true ; } }
Requests a slot with the respective resource profile .