public static <M, K, V> PartitionByOperatorSpec<M, K, V> createPartitionByOperatorSpec(
      OutputStreamImpl<KV<K, V>> outputStream, MapFunction<? super M, ? extends K> keyFunction,
      MapFunction<? super M, ? extends V> valueFunction, String opId) {
    return new PartitionByOperatorSpec<>(outputStream, keyFunction, valueFunction, opId);
  }
Creates a {@link PartitionByOperatorSpec} for the partitionBy operator.

@param <M> the type of messages being repartitioned
@param <K> the type of key in the repartitioned {@link OutputStreamImpl}
@param <V> the type of value in the repartitioned {@link OutputStreamImpl}
@param outputStream  the {@link OutputStreamImpl} to send messages to
@param keyFunction  the {@link MapFunction} for extracting the key from the message
@param valueFunction  the {@link MapFunction} for extracting the value from the message
@param opId  the unique ID of the operator
@return  the {@link OutputOperatorSpec} for the partitionBy operator
samza-core/src/main/java/org/apache/samza/operators/spec/OperatorSpecs.java