-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Remove hard limitation that druid(after 0.15.0) only can consume Kafka version 0.11.x or better #10551
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
Merged
himanshug
merged 29 commits into
apache:master
from
zhangyue19921010:modify-kafka-Version
Dec 4, 2020
Merged
Remove hard limitation that druid(after 0.15.0) only can consume Kafka version 0.11.x or better #10551
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
5e1e696
remove build in kafka consumer config :
ac6dd03
modify druid docs of kafka indexing service
1a2fddb
Merge branch 'master' into modify-kafka-Version
2b7b6f8
Merge branch 'master' into modify-kafka-Version
885985a
yuezhang
1b4d4d8
modify doc
7b37c2b
Merge branch 'master' into modify-kafka-Version
99e9b02
modify docs
808056c
fix kafkaindexTaskTest.java
8ed2ef7
Merge branch 'master' into modify-kafka-Version
108d7b6
revert uncessary change
40ddf14
Merge branch 'master' into modify-kafka-Version
827a43a
add more logs and modify docs
a057e6b
Merge branch 'master' into modify-kafka-Version
44a68ca
revert jdk version
711f692
modify docs
f4e31af
modify-kafka-version v2
48ec54c
v2
5f41171
modify docs
5776119
modify docs
061cac5
modify docs
8201b0b
modify docs
69b4d40
modify docs
cc59d8b
done
765ebbb
Merge branch 'master' into modify-kafka-Version
8197b13
remove useless import
2a457d5
change code and add UT
da8df86
Merge branch 'master' into modify-kafka-Version
3055978
Merge branch 'modify-kafka-Version' of https://github.com/zhangyue199…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
I think to remove
isolation.levelhere and leaves the configuration to users changes the current behavior.Currently users care nothing about this kafka configuration when using a higher version of kafka such as 0.11. By removing it, they need to set this property in supervisor spec, or the default value, which is
read_uncommitted, will be applied, which may be not what they expect.If this is the root cause that limits the Druid to use Kafka lower than 0.11, I think maybe we can introduce another property, as the same way as
pollTimeoutproperty does, then we can unsetisolation.levelproperty according to the value of this new property. Only those who want to use Druid with older kafka need to set this new property.Uh oh!
There was an error while loading. Please reload this page.
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.
Yes, It will change the current behavior.
You are right, most people really don't care this Kafka configuration(Let it be default behavior). As I know the default logic of the Kafka Producer is not to enable transactions feature and the same as Kafka Consumer. So that maybe Druid Kafka indexing service keep the same default logic is more reasonable.
Furthermore, if a Druid user want Druid to consume transactional Kafka topics, I think it is more reasonable to let users set this parameter in consumerProperties like 'bootstrap.servers' because he knows what he is going to do and why.
By the way, Druid from 0.15 to better can't consume old version Kafka is really confused me(I believe it's not just me). Generally speaking, higher Kafka consumer client is able to consume old version Kafka cluster unless it involves high-version-specific api. And this hard limitation block us to upgrade Druid cluster from 0.14.2 for a long time. If we don't remove this config, we have to upgrade PRD Kafka cluster, which is a much more heavy work to do because there are too many consumers of Kafka such as Spark and Flink. Orz...
Thanks for reviewing!
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.
We don't know whether or not the users have enabled transactional message in their clusters, so changing the current behavior may cause backward compatibility problem.
Uh oh!
There was an error while loading. Please reload this page.
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.
Make sense! I add a new property named
consumeTransactionallyin consumerProperties, which is a Kafka consumer level property to controlisolation.level.If users don't set
consumeTransactionallyor setconsumeTransactionallytrue, druid will consume Kafka Transactionally by default.Set
consumeTransactionallyfalse here can disable druid to consume Kafka Transactionally through unsetisolation.levelproperty, which means druid can consume lower version of Kafka now like 0.10.xIn this way, we don't change current Druid default behavior and provide a way to let druid consume lower version Kafka.
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.
@FrankChen021 Hi Frank, sorry to bother you. I have tested this change in our Druid cluster recently. What should I do next ?