private static boolean isActiveTask(TaskName taskName, Map<TaskName, TaskMode> taskModes) {
    return !taskModes.containsKey(taskName) || TaskMode.Active.equals(taskModes.get(taskName));
  }
This method does the following:
1. Deletes the existing task assignments if the partition-task grouping has changed from the previous run of the job.
2. Saves the newly generated task assignments to the storage layer through the {@param TaskAssignementManager}.

@param jobModel              represents the {@see JobModel} of the samza job.
@param taskAssignmentManager required to persist the processor to task assignments to the metadata store.
@param taskPartitionAssignmentManager required to persist the task to partition assignments to the metadata store.
@param grouperMetadata       provides the historical metadata of the samza application.
samza-core/src/main/java/org/apache/samza/coordinator/JobModelHelper.java