-
Notifications
You must be signed in to change notification settings - Fork 3.7k
PIP-45: Converted BookieRackAffinityMapping to use MetadataStore #12841
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
Conversation
eolivelli
left a comment
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
I hope we have good coverage about this feature.
It is very important for users and a bug in this will lead to serious problems
| /** | ||
| * It provides the mapping of bookies to its rack from zookeeper. | ||
| */ | ||
| public class ZkBookieRackAffinityMapping extends AbstractDNSToSwitchMapping |
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 should keep the old class, otherwise, we will break the user's cluster after upgrading to the new Pulsar version.
This one is used in bookkeeper.conf, reppDnsResolverClass=org.apache.pulsar.zookeeper.ZkBookieRackAffinityMapping.
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 don't find it in the config files, but yes, it's a good idea to retain the name. I'll add it back as an empty class extending the new one.
…che#12841) * PIP-45: Converted BookieRackAffinityMapping to use MetadataStore * WIP * Only initialize bookieMappingCache if we have an isolation group * Added back compatibility class wrappers
Motivation
The BookieRackAffinityMapping is based on reading the (bookie->rack) mapping from a z-node. Therefore we're injecting the ZK client in the RackAffinity plugin.
Instead, we are going to inject the instance of
MetadataStorein the properties, so that we're not depending on the ZK implementation.