-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Issue 5935] Support multi pulsar clusters to use the same bk cluster #5985
Changes from all commits
e4e87bd
c5062f9
0673e7d
b348adf
e8e8748
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,9 @@ public class InternalConfigurationData { | |
|
||
private String zookeeperServers; | ||
private String configurationStoreServers; | ||
@Deprecated | ||
private String ledgersRootPath; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for backward compatibility, you shouldn't change the field directly. You can add a new field There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for pointing this out, done. |
||
private String bookkeeperMetadataServiceUri; | ||
private String stateStorageServiceUrl; | ||
|
||
public InternalConfigurationData() { | ||
|
@@ -37,10 +39,12 @@ public InternalConfigurationData() { | |
public InternalConfigurationData(String zookeeperServers, | ||
String configurationStoreServers, | ||
String ledgersRootPath, | ||
String bookkeeperMetadataServiceUri, | ||
String stateStorageServiceUrl) { | ||
this.zookeeperServers = zookeeperServers; | ||
this.configurationStoreServers = configurationStoreServers; | ||
this.ledgersRootPath = ledgersRootPath; | ||
this.bookkeeperMetadataServiceUri = bookkeeperMetadataServiceUri; | ||
this.stateStorageServiceUrl = stateStorageServiceUrl; | ||
} | ||
|
||
|
@@ -52,10 +56,16 @@ public String getConfigurationStoreServers() { | |
return configurationStoreServers; | ||
} | ||
|
||
/** @deprecated */ | ||
@Deprecated | ||
public String getLedgersRootPath() { | ||
return ledgersRootPath; | ||
} | ||
|
||
public String getBookkeeperMetadataServiceUri() { | ||
return bookkeeperMetadataServiceUri; | ||
} | ||
|
||
public String getStateStorageServiceUrl() { | ||
return stateStorageServiceUrl; | ||
} | ||
|
@@ -69,12 +79,17 @@ public boolean equals(Object obj) { | |
return Objects.equals(zookeeperServers, other.zookeeperServers) | ||
&& Objects.equals(configurationStoreServers, other.configurationStoreServers) | ||
&& Objects.equals(ledgersRootPath, other.ledgersRootPath) | ||
&& Objects.equals(bookkeeperMetadataServiceUri, other.bookkeeperMetadataServiceUri) | ||
&& Objects.equals(stateStorageServiceUrl, other.stateStorageServiceUrl); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(zookeeperServers, configurationStoreServers, ledgersRootPath, stateStorageServiceUrl); | ||
return Objects.hash(zookeeperServers, | ||
configurationStoreServers, | ||
ledgersRootPath, | ||
bookkeeperMetadataServiceUri, | ||
stateStorageServiceUrl); | ||
} | ||
|
||
@Override | ||
|
@@ -83,6 +98,7 @@ public String toString() { | |
.add("zookeeperServers", zookeeperServers) | ||
.add("configurationStoreServers", configurationStoreServers) | ||
.add("ledgersRootPath", ledgersRootPath) | ||
.add("bookkeeperMetadataServiceUri", bookkeeperMetadataServiceUri) | ||
.add("stateStorageServiceUrl", stateStorageServiceUrl) | ||
.toString(); | ||
} | ||
|
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 think we should add this logic here. We should reply on the logic that bookkeeper already provides. You can do this by using the following code snippet.
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.
Done.