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

InsertField transformation fails when encountering tombstone event

    XMLWordPrintableJSON

Details

    Description

      When applying the InsertField transformation to a tombstone event, an exception is raised:

      org.apache.kafka.connect.errors.DataException: Only Map objects supported in absence of schema for [field insertion], found: null
      	at org.apache.kafka.connect.transforms.util.Requirements.requireMap(Requirements.java:38)
      	at org.apache.kafka.connect.transforms.InsertField.applySchemaless(InsertField.java:138)
      	at org.apache.kafka.connect.transforms.InsertField.apply(InsertField.java:131)
      	at org.apache.kafka.connect.transforms.InsertFieldTest.tombstone(InsertFieldTest.java:128)
      

      AFAICS, the transform can still be made working in in this case by simply building up a new value map from scratch.

      Update as per the discussion in the comments: tombstones should be left as-is by this SMT, as any insertion would defeat their purpose of enabling log compaction.

      Attachments

        1. image-2019-09-17-15-53-44-038.png
          209 kB
          Frederic Tardif

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gunnar.morling Gunnar Morling
              Randall Hauch Randall Hauch
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: