@Override public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (!(o instanceof KafkaInputSplit)) {
      return false;
    }
    KafkaInputSplit that = (KafkaInputSplit) o;
    return Objects.equal(getTopic(), that.getTopic())
        && Objects.equal(getStartOffset(), that.getStartOffset())
        && Objects.equal(getPartition(), that.getPartition())
        && Objects.equal(getEndOffset(), that.getEndOffset());
  }
Compute union of ranges between splits. Splits must share the same topic and partition

@param split1 left split
@param split2 right split

@return new split with a range including both splits.
kafka-handler/src/java/org/apache/hadoop/hive/kafka/KafkaInputSplit.java