-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(data-gen): support KAFKA format in DataGen #3120
feat(data-gen): support KAFKA format in DataGen #3120
Conversation
ksql-data-gen now supports a `key-format` and `value-format`, rather than the previous `format`. `format` is still accepted to maintain backwards compatibility, however, its use is deprecated. `key-format` supports the existing formats and the new `KAFKA` format that writes data using Kafka's inbuilt serializers. `value-format` won't work with the `KAFKA` format as the value schemas have multiple fields. `key-format` defaults to `KAFKA`. This is backwards compatible as keys were previously serialized using `StringSerializer`. `value-format` defaults to `JSON`, as was the case for the old `format` option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with a few tweaks.
Co-Authored-By: Jim Galasyn <jim.galasyn@confluent.io>
Co-Authored-By: Jim Galasyn <jim.galasyn@confluent.io>
Co-Authored-By: Jim Galasyn <jim.galasyn@confluent.io>
Co-Authored-By: Jim Galasyn <jim.galasyn@confluent.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! one thing about wrapped/unwrapped that I'm not sure I get
ksql-examples/src/main/java/io/confluent/ksql/datagen/DataGenProducer.java
Outdated
Show resolved
Hide resolved
ksql-examples/src/main/java/io/confluent/ksql/datagen/ProducerFactory.java
Outdated
Show resolved
Hide resolved
ksql-examples/src/main/java/io/confluent/ksql/datagen/SchemaRegistryClientFactory.java
Show resolved
Hide resolved
# Conflicts: # ksql-examples/src/main/java/io/confluent/ksql/datagen/AvroProducer.java # ksql-examples/src/main/java/io/confluent/ksql/datagen/DelimitedProducer.java # ksql-examples/src/main/java/io/confluent/ksql/datagen/JsonProducer.java
Thanks @big-andy-coates. We do use ksql-datagen in |
Description
ksql-data-gen now supports a
key-format
andvalue-format
, rather than the previousformat
.format
is still accepted to maintain backwards compatibility, however, its use is deprecated.key-format
supports the existing formats and the newKAFKA
format that writes data using Kafka's inbuilt serializers.value-format
won't work with theKAFKA
format as the value schemas have multiple fields.key-format
defaults toKAFKA
. This is backwards compatible as keys were previously serialized usingStringSerializer
.value-format
defaults toJSON
, as was the case for the oldformat
option.As part of this work I've moved some functionality from the
IntegrationTestHarness
which isn't available inksql-examples
into our test Kafka cluster class, which is available.cc @rmoff - is there any examples / training material that needs updating to reflect the change from
format
tovalue-format
?Testing done
Functional test added.
Reviewer checklist