vvcephei commented on code in PR #11993:
URL: https://github.com/apache/kafka/pull/11993#discussion_r852154793


##########
streams/streams-scala/src/main/scala/org/apache/kafka/streams/scala/kstream/KStream.scala:
##########
@@ -18,30 +18,10 @@ package org.apache.kafka.streams.scala
 package kstream
 
 import org.apache.kafka.streams.KeyValue
-import org.apache.kafka.streams.kstream.{
-  GlobalKTable,
-  JoinWindows,
-  Printed,
-  TransformerSupplier,
-  ValueTransformerSupplier,
-  ValueTransformerWithKeySupplier,
-  KStream => KStreamJ
-}
+import org.apache.kafka.streams.kstream.{GlobalKTable, JoinWindows, Printed, 
TransformerSupplier, ValueTransformerSupplier, ValueTransformerWithKeySupplier, 
KStream => KStreamJ}
 import org.apache.kafka.streams.processor.TopicNameExtractor
-import org.apache.kafka.streams.processor.api.ProcessorSupplier
-import org.apache.kafka.streams.scala.FunctionsCompatConversions.{
-  FlatValueMapperFromFunction,
-  FlatValueMapperWithKeyFromFunction,
-  ForeachActionFromFunction,
-  KeyValueMapperFromFunction,
-  MapperFromFunction,
-  PredicateFromFunction,
-  TransformerSupplierAsJava,
-  ValueMapperFromFunction,
-  ValueMapperWithKeyFromFunction,
-  ValueTransformerSupplierAsJava,
-  ValueTransformerSupplierWithKeyAsJava
-}
+import org.apache.kafka.streams.processor.api.{FixedKeyProcessorSupplier, 
ProcessorSupplier}
+import 
org.apache.kafka.streams.scala.FunctionsCompatConversions.{FlatValueMapperFromFunction,
 FlatValueMapperWithKeyFromFunction, ForeachActionFromFunction, 
KeyValueMapperFromFunction, MapperFromFunction, PredicateFromFunction, 
TransformerSupplierAsJava, ValueMapperFromFunction, 
ValueMapperWithKeyFromFunction, ValueTransformerSupplierAsJava, 
ValueTransformerSupplierWithKeyAsJava}

Review Comment:
   Oof, can you adjust your IDE style so that these go back to one-per-line?



##########
streams/streams-scala/src/main/scala/org/apache/kafka/streams/scala/kstream/KStream.scala:
##########
@@ -839,8 +854,8 @@ class KStream[K, V](val inner: KStreamJ[K, V]) {
    * @param stateStoreNames   the names of the state store used by the 
processor
    * @see `org.apache.kafka.streams.kstream.KStream#process`
    */
-  def process(processorSupplier: ProcessorSupplier[K, V, Void, Void], 
stateStoreNames: String*): Unit =
-    inner.process(processorSupplier, stateStoreNames: _*)
+  def process[KR, VR](processorSupplier: ProcessorSupplier[K, V, KR, VR], 
stateStoreNames: String*): KStream[KR, VR] =

Review Comment:
   Just a note: Unlike in the Java API, where you could not have assigned the 
`void` result of the method to a variable, in the Scala API, someone could 
actually have assigned the result of this method to a `Unit`-typed variable. 
They still wouldn't have been able to do anything with it, so I think the 
chances are small they actually would have captured the result, and I think 
that in this case, it's better to make this small change, rather than add two 
new methods (which would be different from the Java counterparts) for 100% 
compatibility.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to