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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0
    • Component/s: streams
    • Labels:

      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

          Activity

            People

            • Assignee:
              guozhang Guozhang Wang
              Reporter:
              guozhang Guozhang Wang

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment