You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/17 23:24:07 UTC
[GitHub] [pulsar] aloyszhang edited a comment on pull request #14686: Fix error setMetadataServiceUri
aloyszhang edited a comment on pull request #14686:
URL: https://github.com/apache/pulsar/pull/14686#issuecomment-1070806113
Mabye these is another problem if set `MetadataServiceUri` with a prefix `metadata-store:`
```java
bkConf.setMetadataServiceUri("metadata-store:" + metadataStoreUrlNoIdentifer);
```
then execute `BookKeeperAdmin.format`
```java
if (!localStore.exists(BookKeeperConstants.DEFAULT_ZK_LEDGERS_ROOT_PATH).get()
&& !BookKeeperAdmin.format(bkConf, false /* interactive */, false /* force */)) {
throw new IOException("Failed to initialize BookKeeper metadata");
}
```
which will get `MetadataBookieDriver` first
```java
try (MetadataBookieDriver driver = MetadataDrivers.getBookieDriver(
URI.create(conf.getMetadataServiceUri())
))
```
So the URI created here has a scheme `metadata-store`, then getting `MetadataBookieDriver` will throw an exception since bookie only has `zk` and `etcd` as scheme.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org