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

FileSinkTask - use JsonConverter to serialize

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: KafkaConnect
    • Labels:
      None

      Description

      People new to Connect often try out hooking up e.g. a Kafka topic with Avro data to the file sink connector, only to find the file contain values like:

      org.apache.kafka.connect.data.Struct@ca1bf85a
      org.apache.kafka.connect.data.Struct@c298db6a
      org.apache.kafka.connect.data.Struct@44108fbd
      

      This is because currently the FileSinkConnector is meant as a toy example that expects the schema to be Schema.STRING_SCHEMA, though it just toString()'s the value without verifying that.

      A better experience would probably be if we used JsonConverter.fromConnectData() for serializing to the file.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shikhar Shikhar Bhushan
                Reporter:
                shikhar Shikhar Bhushan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: