You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/11/16 12:28:18 UTC
[GitHub] [kafka] jeqo commented on a diff in pull request #12859: KAFKA-14325: Fix NPE on Processor Parameters toString
jeqo commented on code in PR #12859:
URL: https://github.com/apache/kafka/pull/12859#discussion_r1023922604
##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/graph/ProcessorParameters.java:
##########
@@ -130,7 +129,8 @@ public String processorName() {
@Override
public String toString() {
return "ProcessorParameters{" +
- "processor class=" + processorSupplier.get().getClass() +
+ "processor supplier class=" + (processorSupplier != null ? processorSupplier.getClass() : "null") +
+ ", fixed key processor supplier class=" + (fixedKeyProcessorSupplier != null ? fixedKeyProcessorSupplier.getClass() : "null") +
Review Comment:
Avoid calling get() as it could trigger side effects (it does on tests, see https://github.com/apache/kafka/blob/039cccca245a2314c63834e61989939738579bad/streams/src/test/java/org/apache/kafka/test/MockApiProcessorSupplier.java#L51-L54)
##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/graph/ProcessorParameters.java:
##########
@@ -114,13 +114,12 @@ KTableSource<KIn, VIn> kTableSourceSupplier() {
@SuppressWarnings("unchecked")
<KR, VR> KTableProcessorSupplier<KIn, VIn, KR, VR> kTableProcessorSupplier() {
- // This cast always works because KTableProcessorSupplier hasn't been converted yet.
Review Comment:
Now that TableProcessor suplier is using latest API, I think this is worth updating
##########
streams/src/test/resources/log4j.properties:
##########
@@ -27,7 +27,7 @@ log4j.logger.org.apache.kafka.clients=ERROR
# These are the only logs we will likely ever find anything useful in to debug Streams test failures
log4j.logger.org.apache.kafka.clients.consumer=INFO
log4j.logger.org.apache.kafka.clients.producer=INFO
-log4j.logger.org.apache.kafka.streams=INFO
+log4j.logger.org.apache.kafka.streams=DEBUG
Review Comment:
This would have triggered the error in the first place
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org