public DeduplicatedSnapshot deduplicate(Snapshot snapshot) {
int numInputTasks = snapshot.getTasksSize();
LOG.info(String.format("Starting deduplication of a snapshot with %d tasks.", numInputTasks));
Snapshot partialSnapshot = snapshot.deepCopy();
partialSnapshot.unsetTasks();
DeduplicatedSnapshot deduplicatedSnapshot = new DeduplicatedSnapshot()
.setPartialSnapshot(partialSnapshot);
// Nothing to do if we don't have any input tasks.