Make JavaCompatiblePartitioner new default #1339
Merged
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.
The JavaCompatiblePartitioner is renamed DefaultPartitioner. The old DefaultPartitioner becomes LegacyPartitioner.
This is a bit of a spicy one, but the alternatives weren't any better. Originally I removed the default partitioner. This would force people to make an active decision about what partitioner to use, which would be good for people upgrading from an earlier version. Once I started updating tests and docs, I realized how the developer experience becomes really bad for new users. You just want to try out producing some messages, and now you have to learn what the heck a partitioner is? I also see it as a bit futile, since as soon as we release 2.1.0 we'd make the new DefaultPartitioner actually be the default, so anyone going from <2.0.0 to >=2.1.0 would anyway be screwed.
I also considered keeping the
JavaCompatiblePartitioner
export as an alias of the newDefaultPartitioner
, so that people using the JavaCompatiblePartitioner today wouldn't need to do anything, but I figured we're doing a breaking change anyway so why start adding new deprecated stuff already in 2.0.0.Related to #1013 (comment)