public static SystemStreamPartition toSystemStreamPartition(String systemName, TopicPartition topicPartition) {
    Partition partition = new Partition(topicPartition.partition());
    return new SystemStreamPartition(systemName, topicPartition.topic(), partition);
  }
Partition key in the envelope must not be null.
samza-kafka/src/main/java/org/apache/samza/util/KafkaUtil.java