Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-5698

Sort processor node based on name suffix in TopologyDescription.toString()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0
    • streams

    Description

      Today when we print the topology via the Topology#describe()#toString, the processor nodes are not sorted inside the TopologyDescription.toString() function. For example, for the word count demo topology we get:

      Sub-topologies: 
        Sub-topology: 0
          Processor: KSTREAM-FILTER-0000000005(stores: []) --> KSTREAM-SINK-0000000004 <-- KSTREAM-MAP-0000000002
          Source: KSTREAM-SOURCE-0000000000(topics: streams-wordcount-input) --> KSTREAM-FLATMAPVALUES-0000000001
          Processor: KSTREAM-FLATMAPVALUES-0000000001(stores: []) --> KSTREAM-MAP-0000000002 <-- KSTREAM-SOURCE-0000000000
          Processor: KSTREAM-MAP-0000000002(stores: []) --> KSTREAM-FILTER-0000000005 <-- KSTREAM-FLATMAPVALUES-0000000001
          Sink: KSTREAM-SINK-0000000004(topic: Counts-repartition) <-- KSTREAM-FILTER-0000000005
      
      
        Sub-topology: 1
          Source: KSTREAM-SOURCE-0000000006(topics: Counts-repartition) --> KSTREAM-AGGREGATE-0000000003
          Sink: KSTREAM-SINK-0000000008(topic: streams-wordcount-output) <-- KTABLE-TOSTREAM-0000000007
          Processor: KTABLE-TOSTREAM-0000000007(stores: []) --> KSTREAM-SINK-0000000008 <-- KSTREAM-AGGREGATE-0000000003
          Processor: KSTREAM-AGGREGATE-0000000003(stores: [Counts]) --> KTABLE-TOSTREAM-0000000007 <-- KSTREAM-SOURCE-0000000006
      

      While ideally we want:

      Sub-topologies: 
        Sub-topology: 0
          Source: KSTREAM-SOURCE-0000000000(topics: streams-wordcount-input) --> KSTREAM-FLATMAPVALUES-0000000001
          Processor: KSTREAM-FLATMAPVALUES-0000000001(stores: []) --> KSTREAM-MAP-0000000002 <-- KSTREAM-SOURCE-0000000000
          Processor: KSTREAM-MAP-0000000002(stores: []) --> KSTREAM-FILTER-0000000005 <-- KSTREAM-FLATMAPVALUES-0000000001
          Processor: KSTREAM-FILTER-0000000005(stores: []) --> KSTREAM-SINK-0000000004 <-- KSTREAM-MAP-0000000002
          Sink: KSTREAM-SINK-0000000004(topic: Counts-repartition) <-- KSTREAM-FILTER-0000000005
      
        Sub-topology: 1
          Source: KSTREAM-SOURCE-0000000006(topics: Counts-repartition) --> KSTREAM-AGGREGATE-0000000003
          Processor: KSTREAM-AGGREGATE-0000000003(stores: [Counts]) --> KTABLE-TOSTREAM-0000000007 <-- KSTREAM-SOURCE-0000000006
          Processor: KTABLE-TOSTREAM-0000000007(stores: []) --> KSTREAM-SINK-0000000008 <-- KSTREAM-AGGREGATE-0000000003
          Sink: KSTREAM-SINK-0000000008(topic: streams-wordcount-output) <-- KTABLE-TOSTREAM-0000000007
      

      Attachments

        Issue Links

          Activity

            People

              guozhang Guozhang Wang
              guozhang Guozhang Wang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: