nicoloboschi commented on a change in pull request #14384:
URL: https://github.com/apache/pulsar/pull/14384#discussion_r814597715
##########
File path:
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java
##########
@@ -355,14 +360,18 @@ public void initInBroker(ServiceConfiguration
brokerConfig,
try {
// initializing dlog namespace for function worker
if (workerConfig.isInitializedDlogMetadata()) {
- dlogURI =
WorkerUtils.newDlogNamespaceURI(internalConf.getZookeeperServers());
+ String metadataStoreUrl = internalConf.getMetadataStoreUrl();
Review comment:
```suggestion
String metadataStoreUrl =
MetadataStoreFactoryImpl.removeIdentifierFromMetadataURL(internalConf.getMetadataStoreUrl());
```
##########
File path:
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/WorkerUtils.java
##########
@@ -173,7 +174,11 @@ public static URI
initializeDlogNamespace(InternalConfigurationData internalConf
// for BC purposes
if (internalConf.getBookkeeperMetadataServiceUri() == null) {
ledgersRootPath = internalConf.getLedgersRootPath();
- ledgersStoreServers = internalConf.getZookeeperServers();
+ String metadataStoreUrl = internalConf.getMetadataStoreUrl();
+ if (metadataStoreUrl.startsWith(ZK_SCHEME_IDENTIFIER)) {
+ metadataStoreUrl =
metadataStoreUrl.substring(ZK_SCHEME_IDENTIFIER.length());
Review comment:
```suggestion
String metadataStoreUrl =
MetadataStoreFactoryImpl.removeIdentifierFromMetadataURL(internalConf.getMetadataStoreUrl());
```
##########
File path:
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java
##########
@@ -272,13 +273,17 @@ private static URI
initializeStandaloneWorkerService(PulsarClientCreator clientC
URI dlogURI;
try {
if (workerConfig.isInitializedDlogMetadata()) {
- dlogURI =
WorkerUtils.newDlogNamespaceURI(internalConf.getZookeeperServers());
+ String metadataStoreUrl = internalConf.getMetadataStoreUrl();
+ if (metadataStoreUrl.startsWith(ZK_SCHEME_IDENTIFIER)) {
Review comment:
```suggestion
String metadataStoreUrl =
MetadataStoreFactoryImpl.removeIdentifierFromMetadataURL(internalConf.getMetadataStoreUrl());
```
##########
File path:
pulsar-package-management/bookkeeper-storage/src/main/java/org/apache/pulsar/packages/management/storage/bookkeeper/BookKeeperPackagesStorage.java
##########
@@ -92,12 +93,14 @@ private URI initializeDlogNamespace() throws IOException {
ledgersRootPath = metadataServiceUri.getPath();
} else {
ledgersRootPath =
configuration.getPackagesManagementLedgerRootPath();
- ledgersStoreServers = configuration.getZookeeperServers();
+ ledgersStoreServers = configuration.getMetadataStoreUrl();
+ if (ledgersStoreServers.startsWith(ZK_SCHEME_IDENTIFIER)) {
Review comment:
can we parse it as URI and remove the authority ? I think it's not a
good idea to add this exact replacement since there's no support for other
protocols
##########
File path:
pulsar-package-management/bookkeeper-storage/src/main/java/org/apache/pulsar/packages/management/storage/bookkeeper/BookKeeperPackagesStorageConfiguration.java
##########
@@ -38,8 +38,8 @@ int getPackagesReplicas() {
return Integer.parseInt(getProperty("packagesReplicas"));
}
- String getZookeeperServers() {
- return getProperty("zookeeperServers");
Review comment:
what happens if you comment out `metadataStoreUrl` from the config and
still use `zookeeperServers ` ?
we have to add a test for backward compatibility
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]