return;
}
// create new source
Set<ScheduledSplit> newSplits;
TaskSource currentSource = sources.get(sourceId);
if (currentSource == null) {
newSplits = source.getSplits();
}
else {
// merge the current source and the specified source
TaskSource newSource = currentSource.update(source);
// if this is not a new source, just return
if (newSource == currentSource) {
return;
}
// find the new splits to add
newSplits = Sets.difference(newSource.getSplits(), currentSource.getSplits());
sources.put(sourceId, newSource);
}
// add new splits
for (ScheduledSplit newSplit : newSplits) {