@Override
  public int compareTo(SamzaResourceRequest o) {
    if (!StandbyTaskUtil.isStandbyContainer(processorId) && StandbyTaskUtil.isStandbyContainer(o.processorId)) {
      return -1;
    }

    if (StandbyTaskUtil.isStandbyContainer(processorId) && !StandbyTaskUtil.isStandbyContainer(o.processorId)) {
      return 1;
    }

    if (requestTimestamp.isBefore(o.requestTimestamp)) {
      return -1;
    }

    if (requestTimestamp.isAfter(o.requestTimestamp)) {
      return 1;
    }

    return 0;
  }
Requests are ordered by the processor type and the time at which they were created.
Requests with timestamps in the future for retries take less precedence than timestamps in the past or current.
Otherwise, active processors take precedence over standby processors, regardless of timestamp.
@param o the other
samza-core/src/main/java/org/apache/samza/clustermanager/SamzaResourceRequest.java