private boolean needLocalityCheck ( LocalityLevel level , long nodeWait , long rackWait ) { if ( level == LocalityLevel . NODE ) { return nodeWait != 0 ; } if ( level == LocalityLevel . RACK ) { return rackWait != 0 ; } return false ; }
If the locality wait time is zero we don t need to check locality at all .