helix
helix copied to clipboard
HelixManagerFactory doesn't support instantiating ZKHelixManager with HelixManagerProperty for Non-MSDS use cases
Describe the bug
public static HelixManager getZKHelixManager(String clusterName, String instanceName, InstanceType type, HelixManagerStateListener stateListener, HelixManagerProperty helixManagerProperty);
only works for ZooScalability cases.
Reason:
If user passes in HelixManagerProperty in the call to this method, right now the code treats it as a ZooScalability use case, so it will try to connect using the ZooScalability logic.
It was fine until now because non-ZooScalability users will use another method in the HelixManagerFactory public static HelixManager getZKHelixManager(String clusterName, String instanceName, InstanceType type, String zkAddr, HelixManagerStateListener stateListener)
to pass in zkAddr, so it will connect as the traditional way.
But the need for non-ZooScalability users to use the method with HelixManagerProperty emerges because HelixManagerProperty contains HelixCloudProperty. So backward compatibility support for public static HelixManager getZKHelixManager(String clusterName, String instanceName, InstanceType type, HelixManagerStateListener stateListener, HelixManagerProperty helixManagerProperty);
is needed, so it will support non-ZooScalability use cases as well.
To Reproduce
Steps to reproduce the behavior.
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.