public ResourceRequestInfo getPendingRequestOnRack ( String host , Node rack , ResourceType type ) { Context c = getContext ( type ) ; List < ResourceRequestInfo > rackReqs = c . rackToPendingRequests . get ( rack ) ; if ( rackReqs != null ) { for ( ResourceRequestInfo req : rackReqs ) { Set < String > excluded = req . getExcludeHosts ( ) ; if ( ! excluded . contains ( host ) ) { return req ; } } } return null ; }
Find a pending request that wants to run on a given rack .