Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
371 views
in Technique[技术] by (71.8m points)

Wrong package reference for TopicNameMatches class in both Apache and Confluent kafka documentation

I tried the kafka connect transform predicate examples with debezium connector for MS SQL, and faced the issue with documentation for kafka connect. Examples in both documentations mention wrong org.apache.kafka.connect.predicates.TopicNameMatches, instead of the correct org.apache.kafka.connect.transform.predicates.TopicNameMatches:

http://kafka.apache.org/documentation.html#connect_predicates https://docs.confluent.io/platform/current/connect/transforms/regexrouter.html#predicate-examples

    predicates=IsFoo
    
    predicates.IsFoo.type=org.apache.kafka.connect.predicates.TopicNameMatches
    predicates.IsFoo.pattern=foo

while in both distributions package is the same:

package org.apache.kafka.connect.transforms.predicates;

https://github.com/a0x8o/kafka/blob/master/connect/transforms/src/main/java/org/apache/kafka/connect/transforms/predicates/TopicNameMatches.java https://github.com/confluentinc/kafka/blob/master/connect/transforms/src/main/java/org/apache/kafka/connect/transforms/predicates/TopicNameMatches.java

KIP for documentation improvement should then be issued for both?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You are correct: it's really mistake.

For the Apache Kafka docs, I already made a fix, but don't know why it didn't apply (asked about it in the PR).

Update. Fix will be applied in release 2.8


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

62 comments

56.7k users

...