code: private Queue<QueueElem> getInstanceSplitList(final AbstractInstance instance) {
  
  		Queue<QueueElem> instanceSplitList = this.instanceMap.get(instance);
  		if (instanceSplitList == null) {
  
  			// Create and populate instance specific split list
  			instanceSplitList = new PriorityQueue<LocatableInputSplitList.QueueElem>();
  			final Iterator<LocatableInputSplit> it = this.masterSet.iterator();
  			while (it.hasNext()) {
  
  				final LocatableInputSplit split = it.next();
  				final String[] hostnames = split.getHostnames();
  				if (hostnames == null) {
  					instanceSplitList.add(new QueueElem(split, Integer.MAX_VALUE));
  
  				} else {
  
  					int minDistance = Integer.MAX_VALUE;
  					for (int i = 0; i < hostnames.length; ++i) {
  						final int distance = instance.getDistance(hostnames[i]);
  						if (LOG.isDebugEnabled()) {
  							LOG.debug("Distance between " + instance + " and " + hostnames[i] + " is " + distance);
  						}
  						if (distance < minDistance) {
  							minDistance = distance;
  						}
  					}
  
  					instanceSplitList.add(new QueueElem(split, minDistance));
  				}
  			}
  
  			this.instanceMap.put(instance, instanceSplitList);
  		}
  
  		return instanceSplitList;
  	}
docs: Returns a list of locatable input splits specifically ordered for the given {@link AbstractInstance}. When the
  list is initially created, it contains all the unconsumed located input splits at that point in time, ascendingly
  ordered
  by the minimum distance between the input splits' storage locations and the given {@link AbstractInstance}.
  
  @param instance
  the instance for which the locatable input split list has been computed
  @return the list of file input splits ordered specifically for the given instance