Skip to content
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

Config clash with KIP-158 #22

Open
rmoff opened this issue Dec 9, 2020 · 0 comments
Open

Config clash with KIP-158 #22

rmoff opened this issue Dec 9, 2020 · 0 comments

Comments

@rmoff
Copy link
Contributor

rmoff commented Dec 9, 2020

KIP-158 adds connector-specific topic creation configuration, using the top-level topic prefix for specifying this config, e.g.:

topic.creation.default.replication.factor=3
topic.creation.default.partitions=5

This clashes with Voluble's topic-specific configuration options which use the same top-level config prefix, and causes this error:

ERROR [source-voluble-datagen-00|task-0] WorkerSourceTask{id=source-voluble-datagen-00-0} Task threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask:187)
java.lang.IllegalArgumentException: Unrecognized topic configuration: topic.creation.default.replication.factor                                                                                       at io.mdrogalis.voluble.parse$parse_topic_value.invokeStatic(parse.clj:149)
        at io.mdrogalis.voluble.parse$parse_topic_value.invoke(parse.clj:132)                                                                                                                         at io.mdrogalis.voluble.extract$extract_topic_configs$fn__253.invoke(extract.clj:46)
        at clojure.lang.PersistentArrayMap.kvreduce(PersistentArrayMap.java:377)                                                                                                                      at clojure.core$fn__8437.invokeStatic(core.clj:6845)
        at clojure.core$fn__8437.invoke(core.clj:6830)                                                                                                                                                at clojure.core.protocols$fn__8167$G__8162__8176.invoke(protocols.clj:175)
        at clojure.core$reduce_kv.invokeStatic(core.clj:6856)                                                                                                                                         at clojure.core$reduce_kv.invoke(core.clj:6847)
        at io.mdrogalis.voluble.extract$extract_topic_configs.invokeStatic(extract.clj:43)                                                                                                            at io.mdrogalis.voluble.extract$extract_topic_configs.invoke(extract.clj:42)
        at io.mdrogalis.voluble.core$add_topic_configs.invokeStatic(core.clj:22)                                                                                                                      at io.mdrogalis.voluble.core$add_topic_configs.invoke(core.clj:21)
        at io.mdrogalis.voluble.core$make_context.invokeStatic(core.clj:63)
        at io.mdrogalis.voluble.core$make_context.invoke(core.clj:56)
        at io.mdrogalis.voluble.interop$make_context.invokeStatic(interop.clj:21)
        at io.mdrogalis.voluble.interop$make_context.invoke(interop.clj:20)
        at clojure.lang.Var.invoke(Var.java:384)
        at io.mdrogalis.voluble.VolubleConnectorTask.start(VolubleConnectorTask.java:27)
        at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:232)
        at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:185)
        at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:235)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

Here's a sample connector config that throws this error on Confluent Platform 6.0 / Apache Kafka 2.6

curl -i -X PUT -H  "Content-Type:application/json" \
    http://localhost:8083/connectors/source-voluble-datagen-00/config \
    -d '{
        "connector.class"                             : "io.mdrogalis.voluble.VolubleSourceConnector",
        "genkp.day4-transactions.with"                : "#{Internet.uuid}",
        "genv.day4-transactions.cost.with"            : "#{Commerce.price}",
        "genv.day4-transactions.card_type.with"       : "#{Business.creditCardType}",
        "genv.day4-transactions.item.with"            : "#{Beer.name}",
        "topic.day4-transactions.throttle.ms"         : 500,
        "topic.creation.default.partitions"           : 12,
        "topic.creation.default.replication.factor"   : 1
    }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant