static TopicPartition toTopicPartition(SystemStreamPartition systemStreamPartition) {
      Preconditions.checkNotNull(systemStreamPartition);
      Preconditions.checkNotNull(systemStreamPartition.getPartition());
      Preconditions.checkNotNull(systemStreamPartition.getStream());

      return new TopicPartition(systemStreamPartition.getStream(), systemStreamPartition.getPartition().getPartitionId());
    }
Converts the {@link SystemStreamPartition} to {@link TopicPartition}.
@param systemStreamPartition the input system stream partition.
@return the converted topic partition.
samza-kafka/src/main/java/org/apache/samza/system/kafka/KafkaSystemAdmin.java