Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


The same reasoning applies to the key, value and result types defined in methods that take AggregatorStreamPartitionerKeyValueMapperValueMapperProcessorSupplier, TransformerSupplierValueTransformerSupplierForeachActionStreamPartitioner, and ValueJoiner.

Public Interfaces

Affected methodsCurrent argument typeNew argument type

Aggregator<K, V, T>

Aggregator<? super K, ? super V, T>

(KTable|KStream).filter*, KStream.branchPredicate<K, V> Predicate<? super K, ? super V>

KeyValueMapper<K, V, T>

KeyValueMapper<? super K, ? super V, T>

KStream.(selectKey|map|flatMap), KTable.toStreamKeyValueMapper<K, V, X>KeyValueMapper<? super K, ? super V, ? extends X>
(KStream|KTable).mapValues, KStream.flatMapValuesValueMapper<V, X>ValueMapper<? super V, ? extends X>
KStream.transformTransformerSupplier<K, V, X>TransformerSupplier<? super K, ? super V, X>


ValueTransformerSupplier<V, X>ValueTransformerSupplier<? super V, X>
(KStream|Ktable).foreachForeachAction<K, V>ForeachAction<? super K, ? super V>


ProcessorSupplier<K, V>ProcessorSupplier<? super K, ? super V>
(KStream|KTable).*joinValueJoiner<K, V, R>ValueJoiner<? super K, ? super V, ? extends R>


StreamPartitioner<K, V>StreamPartitioner<? super K, ? super V>
StreamPartitioner<K, V>StreamPartitioner<? super K, ? super V>


Once we drop support for 1.7 we can always decide to switch to approach 2. without breaking source compatibility, by making a proposal similar to this KIP.




Update 2017-01-18: In light of 

serverASF JIRA
 it was decided to leave return types invariant for TransformerSupplier and ValueTransformerSupplier