code: public SimpleSlot getSlotForTask(JobVertexID vertexID, Iterable<TaskManagerLocation> locationPreferences) {
  		synchronized (lock) {
  			Tuple2<SharedSlot, Locality> p = getSharedSlotForTask(vertexID, locationPreferences, false);
  
  			if (p != null) {
  				SharedSlot ss = p.f0;
  				SimpleSlot slot = ss.allocateSubSlot(vertexID);
  				slot.setLocality(p.f1);
  				return slot;
  			}
  			else {
  				return null;
  			}
  		}
  	}
docs: Gets a slot suitable for the given task vertex. This method will prefer slots that are local
  (with respect to {@link ExecutionVertex#getPreferredLocationsBasedOnInputs()}), but will return non local
  slots if no local slot is available. The method returns null, when this sharing group has
  no slot available for the given JobVertexID.
  
  @param vertexID the vertex id
  @param locationPreferences location preferences
  
  @return A slot to execute the given ExecutionVertex in, or null, if none is available.