kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jouni (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-7125) Calling StreamsBuilderbuilder.build().describe() causes java.util.NoSuchElementException: null
Date Sun, 01 Jul 2018 21:08:00 GMT
Jouni created KAFKA-7125:

             Summary: Calling StreamsBuilderbuilder.build().describe() causes java.util.NoSuchElementException:
                 Key: KAFKA-7125
                 URL: https://issues.apache.org/jira/browse/KAFKA-7125
             Project: Kafka
          Issue Type: Bug
          Components: streams
    Affects Versions: 1.1.0
            Reporter: Jouni

After adding a a processor and a sink to topology after a globalstore and then calling StreamBuilder.build().describe()
again (for debugging purposes and to check I got the topology), had the following exception
and stacktrace:

{{Caused by: java.util.NoSuchElementException: null}}
{{    at java.util.HashMap$HashIterator.nextNode(HashMap.java:1444) ~[na:1.8.0_171]}}
{{    at java.util.HashMap$KeyIterator.next(HashMap.java:1466) ~[na:1.8.0_171]}}
{{    at org.apache.kafka.streams.processor.internals.InternalTopologyBuilder.describeGlobalStore(InternalTopologyBuilder.java:1323)
{{    at org.apache.kafka.streams.processor.internals.InternalTopologyBuilder.describe(InternalTopologyBuilder.java:1306)
{{    at org.apache.kafka.streams.Topology.describe(Topology.java:647) ~[kafka-streams-1.1.0.jar:na]}}

Snipped of code that caused this:

{{        TopologyDescription td = builder.build().describe();}}
{{        String parent = null;}}
{{        // We get an iterator to a TreeSet sorted by processing order, and just want
the last one.}}
{{        for (TopologyDescription.GlobalStore store : td.globalStores()) {}}
{{            parent = store.processor().name();}}
{{        }}}
{{        TopologyDescription tdtd = builder.build().describe();}}
{{        builder.build().addProcessor("ROUTES-TO-SERVICES-FORWARDER", new UnneededCruftSupplier(),
{{        builder.build().addSink("FST-ROUTES-TO-SERVICES", "fst-routes-to-services",
Serdes.String().serializer(), fstServiceListSerde.serializer(), "ROUTES-TO-SERVICES-FORWARDER");}}
{{        TopologyDescription tdtdtd = builder.build().describe();}}

Note that the exception is thrown on the last line of the code snippet, calling describe again
before adding anything works fine.


This message was sent by Atlassian JIRA

View raw message