code: @Override
    protected NumberedSplit<InputSplit> tryAllocate(final NodeDescriptor nodeDescriptor, final String evaluatorId) {
      final String rackName = nodeDescriptor.getRackDescriptor().getName();
      LOG.log(Level.FINE, "Trying an exact match on rack name {0}", rackName);
      if (locationToSplits.containsKey(rackName)) {
        LOG.log(Level.FINE, "Found splits possibly hosted for {0} at {1}", new Object[] {evaluatorId, rackName});
        final NumberedSplit<InputSplit> split = allocateSplit(evaluatorId, locationToSplits.get(rackName));
        if (split != null) {
          return split;
        }
      }
      LOG.fine("No success, trying based on a partial match on locations");
      final Iterator<String> it = normalizedLocations.iterator();
      while (it.hasNext()) {
        final String possibleLocation = it.next();
        LOG.log(Level.FINE, "Trying on possible location {0}", possibleLocation);
        if (rackName.startsWith(possibleLocation)) {
          LOG.log(Level.FINE, "Found splits possibly hosted for {0} at {1} for rack {2}", new Object[] {evaluatorId,
              possibleLocation, rackName});
          final NumberedSplit<InputSplit> split = allocateSplit(evaluatorId,
              partialLocationsToSplits.get(possibleLocation));
          if (split != null) {
            return split;
          }
        }
      }
      LOG.fine("Nothing found");
      return null;
    }
docs: {@inheritDoc}. Tries to allocate on exact rack match, if it cannot, then it
  tries to get a partial match using the partialLocations map.