private int hashCode(Object partitionKey) {
    return (partitionKey instanceof byte[]) ? Arrays.hashCode((byte[]) partitionKey) : partitionKey.hashCode();
  }
Return the hash code of the partitionKey. When partitionKey is a byte array, it returns a hash code based on
the contents of the byte array. This guarantees that byte arrays with same contents get the same hash code.
samza-core/src/main/java/org/apache/samza/system/inmemory/InMemorySystemProducer.java