lct45 commented on a change in pull request #10813:
URL: https://github.com/apache/kafka/pull/10813#discussion_r646979245



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/SinkNode.java
##########
@@ -60,8 +60,8 @@ public void init(final InternalProcessorContext context) {
         this.context = context;
         final Serializer<?> contextKeySerializer = 
ProcessorContextUtils.getKeySerializer(context);
         final Serializer<?> contextValueSerializer = 
ProcessorContextUtils.getValueSerializer(context);
-        keySerializer = prepareKeySerializer(keySerializer, 
contextKeySerializer, contextValueSerializer);
-        valSerializer = prepareValueSerializer(valSerializer, 
contextKeySerializer, contextValueSerializer);
+        keySerializer = prepareKeySerializer(keySerializer, 
contextKeySerializer, contextValueSerializer, this.name());
+        valSerializer = prepareValueSerializer(valSerializer, 
contextKeySerializer, contextValueSerializer, this.name());

Review comment:
       Hmm yeah that works too, either way we're doing null checks after 
pulling the serializer/deserializer through `ProcessorContextUtils` so I don't 
feel like it changes it drastically. I wonder, is it easier for debugging to 
have the context serializer/deserializer pulled out here, at the same place we 
set it eventually? Or is it easier to debug if we pull it out where we're 
potentially throwing an error, down in `WrappingNullableUtils#prepareSerializer`




-- 
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.

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


Reply via email to