@Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (!super.equals(obj))
      return false;
    if (getClass() != obj.getClass())
      return false;
    SystemStreamPartition other = (SystemStreamPartition) obj;
    if (partition == null) {
      if (other.partition != null)
        return false;
    } else if (!partition.equals(other.partition))
      return false;
    if (keyBucket != other.keyBucket) {
      return false;
    }
    return true;
  }
Constructs a Samza stream partition object based upon another Samza stream and a specified partition.
@param other Reference to an already existing Samza stream.
@param partition Reference to an already existing Samza partition.
samza-api/src/main/java/org/apache/samza/system/SystemStreamPartition.java