if (vertex == null) {
LOG.error("Cannot find execution vertex for vertex ID " + vertexId);
return null;
}
InputSplitAssigner splitAssigner = vertex.getSplitAssigner();
if (splitAssigner == null) {
LOG.error("No InputSplitAssigner for vertex ID " + vertexId);
return null;
}
// get hostname for input split assignment
String host = null;
Execution execution = graph.getRegisteredExecutions().get(executionAttempt);
if(execution == null) {
LOG.error("Can not find Execution for attempt " + executionAttempt);
} else {
AllocatedSlot slot = execution.getAssignedResource();
if(slot != null) {
host = slot.getInstance().getInstanceConnectionInfo().getHostname();
}
}
return splitAssigner.getNextInputSplit(host);
}