abbccdda commented on a change in pull request #8803: URL: https://github.com/apache/kafka/pull/8803#discussion_r436117858
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorTopology.java ########## @@ -167,11 +185,21 @@ public String toString() { * @return A string representation of this instance. */ public String toString(final String indent) { + final Map<SourceNode<?, ?>, List<String>> sourceToTopics = new HashMap<>(); + for (final Map.Entry<String, SourceNode<?, ?>> sourceNodeEntry : sourcesByTopic.entrySet()) { + final String topic = sourceNodeEntry.getKey(); + final SourceNode<?, ?> source = sourceNodeEntry.getValue(); + sourceToTopics.computeIfAbsent(source, s -> new ArrayList<>()); + sourceToTopics.get(source).add(topic); + } + final StringBuilder sb = new StringBuilder(indent + "ProcessorTopology:\n"); // start from sources - for (final SourceNode<?, ?> source : sourcesByTopic.values()) { - sb.append(source.toString(indent + "\t")).append(childrenToString(indent + "\t", source.children())); + for (final Map.Entry<SourceNode<?, ?>, List<String>> sourceNodeEntry : sourceToTopics.entrySet()) { Review comment: Oh I see ---------------------------------------------------------------- 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: us...@infra.apache.org