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

ClassCastException when trying to groupBy after suppress

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.3.0
    • Component/s: streams
    • Labels:
      None

      Description

      A topology with a groupBy after a suppress operation results in a ClassCastException

       The following sample topology

      Properties properties = new Properties(); 
      properties.put(StreamsConfig.APPLICATION_ID_CONFIG, "appid"); 
      properties.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG,"localhost");
      
      StreamsBuilder builder = new StreamsBuilder();
      
       builder.<String, String>stream("topic")
      .groupByKey().windowedBy(TimeWindows.of(Duration.ofSeconds(30))).count() 
      .suppress(Suppressed.untilTimeLimit(Duration.ofHours(1), BufferConfig.unbounded())) 
      .groupBy((k, v) -> KeyValue.pair(k,v)).count().toStream(); 
      
      builder.build(properties);
      

      results in this exception:

      java.lang.ClassCastException: org.apache.kafka.streams.kstream.internals.KTableImpl$$Lambda$4/2084435065 cannot be cast to org.apache.kafka.streams.kstream.internals.KTableProcessorSupplier

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                JoseLopez Jose Lopez
                Reporter:
                bbejeck Bill Bejeck
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: