@Override
  public int compareTo(Partition that) {
    if (partition < that.partition) {
      return -1;
    } else if (partition > that.partition) {
      return 1;
    }
    return 0;
  }
Constructs a new Samza stream partition from a specified partition number.
@param partition An integer identifying the partition in a Samza stream.
samza-api/src/main/java/org/apache/samza/Partition.java