public static boolean compareContainerModelForProcessor(String processorId, JobModel first, JobModel second) {
    Preconditions.checkArgument(StringUtils.isNotBlank(processorId), "Processor id cannot be blank");
    if (first == second) {
      return true;
    }

    if (first == null || second == null) {
      return false;
    }

    return Objects.equals(first.getContainers().get(processorId), second.getContainers().get(processorId));
  }
Compares the {@link ContainerModel} for a given <i>processorId</i> across two {@link JobModel}.
@param processorId processor id for which work assignments are compared
@param first first job model
@param second second job model
@return true - if {@link ContainerModel} for the processor is same across the {@link JobModel}
        false - otherwise
samza-core/src/main/java/org/apache/samza/job/model/JobModelUtil.java