You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "cbornet (via GitHub)" <gi...@apache.org> on 2023/06/27 10:16:38 UTC
[GitHub] [pulsar] cbornet opened a new pull request, #20658: [cleanup][broker] Various cleanups, leveraging JDK 17
cbornet opened a new pull request, #20658:
URL: https://github.com/apache/pulsar/pull/20658
### Motivation
Remove warnings in IDEA
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change is a trivial rework / code cleanup without any test coverage.
### Does this pull request potentially affect one of the following parts:
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
*If the box was checked, please highlight the changes*
- [ ] Dependencies (add or upgrade a dependency)
- [ ] The public API
- [ ] The schema
- [ ] The default values of configurations
- [ ] The threading model
- [ ] The binary protocol
- [ ] The REST endpoints
- [ ] The admin CLI options
- [ ] The metrics
- [ ] Anything that affects deployment
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [ ] `doc` <!-- Your PR contains doc changes. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
### Matching PR in forked repository
PR in forked repository: <!-- ENTER URL HERE -->
<!--
After opening this PR, the build in apache/pulsar will fail and instructions will
be provided for opening a PR in the PR author's forked repository.
apache/pulsar pull requests should be first tested in your own fork since the
apache/pulsar CI based on GitHub Actions has constrained resources and quota.
GitHub Actions provides separate quota for pull requests that are executed in
a forked repository.
The tests will be run in the forked repository until all PR review comments have
been handled, the tests pass and the PR is approved by a reviewer.
-->
--
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
[GitHub] [pulsar] cbornet commented on a diff in pull request #20658: [cleanup][broker] Various cleanups, leveraging JDK 17
Posted by "cbornet (via GitHub)" <gi...@apache.org>.
cbornet commented on code in PR #20658:
URL: https://github.com/apache/pulsar/pull/20658#discussion_r1245513039
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java:
##########
@@ -248,44 +248,43 @@ private CompletableFuture<NamespaceBundle> getFullBundleAsync(NamespaceName fqnn
/**
* Return the URL of the broker who's owning a particular service unit in asynchronous way.
- *
+ * <p>
* If the service unit is not owned, return a CompletableFuture with empty optional.
*/
public CompletableFuture<Optional<URL>> getWebServiceUrlAsync(ServiceUnitId suName, LookupOptions options) {
- if (suName instanceof TopicName) {
- TopicName name = (TopicName) suName;
+ if (suName instanceof TopicName name) {
if (LOG.isDebugEnabled()) {
LOG.debug("Getting web service URL of topic: {} - options: {}", name, options);
}
return getBundleAsync(name)
.thenCompose(namespaceBundle ->
- internalGetWebServiceUrl(Optional.of(name), namespaceBundle, options));
+ internalGetWebServiceUrl(name, namespaceBundle, options));
}
- if (suName instanceof NamespaceName) {
- return getFullBundleAsync((NamespaceName) suName)
+ if (suName instanceof NamespaceName namespaceName) {
+ return getFullBundleAsync(namespaceName)
.thenCompose(namespaceBundle ->
- internalGetWebServiceUrl(Optional.empty(), namespaceBundle, options));
+ internalGetWebServiceUrl(null, namespaceBundle, options));
}
- if (suName instanceof NamespaceBundle) {
- return internalGetWebServiceUrl(Optional.empty(), (NamespaceBundle) suName, options);
+ if (suName instanceof NamespaceBundle namespaceBundle) {
+ return internalGetWebServiceUrl(null, namespaceBundle, options);
}
throw new IllegalArgumentException("Unrecognized class of NamespaceBundle: " + suName.getClass().getName());
}
/**
* Return the URL of the broker who's owning a particular service unit.
- *
+ * <p>
* If the service unit is not owned, return an empty optional
*/
public Optional<URL> getWebServiceUrl(ServiceUnitId suName, LookupOptions options) throws Exception {
return getWebServiceUrlAsync(suName, options)
.get(pulsar.getConfiguration().getMetadataStoreOperationTimeoutSeconds(), SECONDS);
}
- private CompletableFuture<Optional<URL>> internalGetWebServiceUrl(Optional<ServiceUnitId> topic,
+ private CompletableFuture<Optional<URL>> internalGetWebServiceUrl(ServiceUnitId topic,
Review Comment:
done
--
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
[GitHub] [pulsar] JooHyukKim commented on a diff in pull request #20658: [cleanup][broker] Various cleanups, leveraging JDK 17
Posted by "JooHyukKim (via GitHub)" <gi...@apache.org>.
JooHyukKim commented on code in PR #20658:
URL: https://github.com/apache/pulsar/pull/20658#discussion_r1247675670
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java:
##########
@@ -306,7 +306,7 @@ private CompletableFuture<Optional<URL>> internalGetWebServiceUrl(Optional<Servi
}
CompletableFuture<Optional<LookupResult>> future =
ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config)
- ? loadManager.get().findBrokerServiceUrl(topic, bundle) :
+ ? loadManager.get().findBrokerServiceUrl(Optional.ofNullable(topic), bundle) :
Review Comment:
Are `@Nullable` and `Optional.ofNullable()`both needed?
--
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
[GitHub] [pulsar] codecov-commenter commented on pull request #20658: [cleanup][broker] Various cleanups
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #20658:
URL: https://github.com/apache/pulsar/pull/20658#issuecomment-1614551457
## [Codecov](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#20658](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (23228ea) into [master](https://app.codecov.io/gh/apache/pulsar/commit/0e603405c2a6faaa50a47881916a2c1268de9830?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (0e60340) will **increase** coverage by `0.53%`.
> The diff coverage is `70.45%`.
[](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #20658 +/- ##
============================================
+ Coverage 72.60% 73.13% +0.53%
- Complexity 32018 32102 +84
============================================
Files 1855 1871 +16
Lines 138569 138952 +383
Branches 15250 15281 +31
============================================
+ Hits 100605 101620 +1015
+ Misses 29945 29290 -655
- Partials 8019 8042 +23
```
| Flag | Coverage Δ | |
|---|---|---|
| inttests | `24.09% <32.95%> (-0.02%)` | :arrow_down: |
| systests | `24.90% <29.54%> (?)` | |
| unittests | `72.42% <70.45%> (+0.06%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...a/org/apache/pulsar/broker/web/RequestWrapper.java](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci93ZWIvUmVxdWVzdFdyYXBwZXIuamF2YQ==) | `54.54% <ø> (ø)` | |
| [...pache/pulsar/broker/web/ResponseHandlerFilter.java](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci93ZWIvUmVzcG9uc2VIYW5kbGVyRmlsdGVyLmphdmE=) | `57.14% <ø> (ø)` | |
| [...pulsar/broker/TransactionMetadataStoreService.java](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9UcmFuc2FjdGlvbk1ldGFkYXRhU3RvcmVTZXJ2aWNlLmphdmE=) | `68.51% <50.00%> (+0.44%)` | :arrow_up: |
| [...ache/pulsar/broker/ManagedLedgerClientFactory.java](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9NYW5hZ2VkTGVkZ2VyQ2xpZW50RmFjdG9yeS5qYXZh) | `83.11% <57.14%> (+1.06%)` | :arrow_up: |
| [...rg/apache/pulsar/broker/web/PulsarWebResource.java](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci93ZWIvUHVsc2FyV2ViUmVzb3VyY2UuamF2YQ==) | `64.60% <66.66%> (-0.01%)` | :arrow_down: |
| [...ache/pulsar/broker/namespace/NamespaceService.java](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9uYW1lc3BhY2UvTmFtZXNwYWNlU2VydmljZS5qYXZh) | `71.69% <68.29%> (+0.56%)` | :arrow_up: |
| [...n/java/org/apache/pulsar/broker/PulsarService.java](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9QdWxzYXJTZXJ2aWNlLmphdmE=) | `82.33% <80.00%> (+1.73%)` | :arrow_up: |
| [...che/pulsar/broker/BookKeeperClientFactoryImpl.java](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9Cb29rS2VlcGVyQ2xpZW50RmFjdG9yeUltcGwuamF2YQ==) | `79.43% <100.00%> (ø)` | |
| [.../apache/pulsar/broker/loadbalance/LoadManager.java](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9sb2FkYmFsYW5jZS9Mb2FkTWFuYWdlci5qYXZh) | `73.91% <100.00%> (-1.09%)` | :arrow_down: |
| [...va/org/apache/pulsar/broker/web/RestException.java](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci93ZWIvUmVzdEV4Y2VwdGlvbi5qYXZh) | `96.77% <100.00%> (-0.11%)` | :arrow_down: |
| ... and [1 more](https://app.codecov.io/gh/apache/pulsar/pull/20658?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
... and [173 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/20658/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
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
[GitHub] [pulsar] cbornet merged pull request #20658: [cleanup][broker] Various cleanups
Posted by "cbornet (via GitHub)" <gi...@apache.org>.
cbornet merged PR #20658:
URL: https://github.com/apache/pulsar/pull/20658
--
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
[GitHub] [pulsar] cbornet commented on pull request #20658: [cleanup][broker] Various cleanups, leveraging JDK 17
Posted by "cbornet (via GitHub)" <gi...@apache.org>.
cbornet commented on PR #20658:
URL: https://github.com/apache/pulsar/pull/20658#issuecomment-1613184434
> Although, I remember once I change switch case to JDK 17 match style one argues that it can introduce burden on back port code if fixes made around those code snippets. This can be a reason that @lhotari suggests we make changes firstly from the earliest maintained branch.
That's a very valid point. I'll rollback the changes on switch expressions.
--
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
[GitHub] [pulsar] lifepuzzlefun commented on a diff in pull request #20658: [cleanup][broker] Various cleanups, leveraging JDK 17
Posted by "lifepuzzlefun (via GitHub)" <gi...@apache.org>.
lifepuzzlefun commented on code in PR #20658:
URL: https://github.com/apache/pulsar/pull/20658#discussion_r1245357386
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java:
##########
@@ -248,44 +248,43 @@ private CompletableFuture<NamespaceBundle> getFullBundleAsync(NamespaceName fqnn
/**
* Return the URL of the broker who's owning a particular service unit in asynchronous way.
- *
+ * <p>
* If the service unit is not owned, return a CompletableFuture with empty optional.
*/
public CompletableFuture<Optional<URL>> getWebServiceUrlAsync(ServiceUnitId suName, LookupOptions options) {
- if (suName instanceof TopicName) {
- TopicName name = (TopicName) suName;
+ if (suName instanceof TopicName name) {
if (LOG.isDebugEnabled()) {
LOG.debug("Getting web service URL of topic: {} - options: {}", name, options);
}
return getBundleAsync(name)
.thenCompose(namespaceBundle ->
- internalGetWebServiceUrl(Optional.of(name), namespaceBundle, options));
+ internalGetWebServiceUrl(name, namespaceBundle, options));
}
- if (suName instanceof NamespaceName) {
- return getFullBundleAsync((NamespaceName) suName)
+ if (suName instanceof NamespaceName namespaceName) {
+ return getFullBundleAsync(namespaceName)
.thenCompose(namespaceBundle ->
- internalGetWebServiceUrl(Optional.empty(), namespaceBundle, options));
+ internalGetWebServiceUrl(null, namespaceBundle, options));
}
- if (suName instanceof NamespaceBundle) {
- return internalGetWebServiceUrl(Optional.empty(), (NamespaceBundle) suName, options);
+ if (suName instanceof NamespaceBundle namespaceBundle) {
+ return internalGetWebServiceUrl(null, namespaceBundle, options);
}
throw new IllegalArgumentException("Unrecognized class of NamespaceBundle: " + suName.getClass().getName());
}
/**
* Return the URL of the broker who's owning a particular service unit.
- *
+ * <p>
* If the service unit is not owned, return an empty optional
*/
public Optional<URL> getWebServiceUrl(ServiceUnitId suName, LookupOptions options) throws Exception {
return getWebServiceUrlAsync(suName, options)
.get(pulsar.getConfiguration().getMetadataStoreOperationTimeoutSeconds(), SECONDS);
}
- private CompletableFuture<Optional<URL>> internalGetWebServiceUrl(Optional<ServiceUnitId> topic,
+ private CompletableFuture<Optional<URL>> internalGetWebServiceUrl(ServiceUnitId topic,
Review Comment:
may be we need a `@Nullable` annotation on ServiceUnitId here
--
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
[GitHub] [pulsar] cbornet commented on a diff in pull request #20658: [cleanup][broker] Various cleanups, leveraging JDK 17
Posted by "cbornet (via GitHub)" <gi...@apache.org>.
cbornet commented on code in PR #20658:
URL: https://github.com/apache/pulsar/pull/20658#discussion_r1247697835
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java:
##########
@@ -306,7 +306,7 @@ private CompletableFuture<Optional<URL>> internalGetWebServiceUrl(Optional<Servi
}
CompletableFuture<Optional<LookupResult>> future =
ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config)
- ? loadManager.get().findBrokerServiceUrl(topic, bundle) :
+ ? loadManager.get().findBrokerServiceUrl(Optional.ofNullable(topic), bundle) :
Review Comment:
I think so.
`@Nullable` indicates to the caller the topic can be null.
Since it can be null we need to use `Optional.ofNullable()` when wrapping it into an Optional.
--
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
[GitHub] [pulsar] cbornet commented on pull request #20658: [cleanup][broker] Various cleanups, leveraging JDK 17
Posted by "cbornet (via GitHub)" <gi...@apache.org>.
cbornet commented on PR #20658:
URL: https://github.com/apache/pulsar/pull/20658#issuecomment-1614405272
We also have Pulsar 2.10 which runs on JDK 8.
Does it mean that we shouldn't use JDK 11 features (Map.of, List.of, Optional.isEmpty) either ?
@lhotari WDYT ?
--
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
[GitHub] [pulsar] lifepuzzlefun commented on a diff in pull request #20658: [cleanup][broker] Various cleanups, leveraging JDK 17
Posted by "lifepuzzlefun (via GitHub)" <gi...@apache.org>.
lifepuzzlefun commented on code in PR #20658:
URL: https://github.com/apache/pulsar/pull/20658#discussion_r1245357386
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java:
##########
@@ -248,44 +248,43 @@ private CompletableFuture<NamespaceBundle> getFullBundleAsync(NamespaceName fqnn
/**
* Return the URL of the broker who's owning a particular service unit in asynchronous way.
- *
+ * <p>
* If the service unit is not owned, return a CompletableFuture with empty optional.
*/
public CompletableFuture<Optional<URL>> getWebServiceUrlAsync(ServiceUnitId suName, LookupOptions options) {
- if (suName instanceof TopicName) {
- TopicName name = (TopicName) suName;
+ if (suName instanceof TopicName name) {
if (LOG.isDebugEnabled()) {
LOG.debug("Getting web service URL of topic: {} - options: {}", name, options);
}
return getBundleAsync(name)
.thenCompose(namespaceBundle ->
- internalGetWebServiceUrl(Optional.of(name), namespaceBundle, options));
+ internalGetWebServiceUrl(name, namespaceBundle, options));
}
- if (suName instanceof NamespaceName) {
- return getFullBundleAsync((NamespaceName) suName)
+ if (suName instanceof NamespaceName namespaceName) {
+ return getFullBundleAsync(namespaceName)
.thenCompose(namespaceBundle ->
- internalGetWebServiceUrl(Optional.empty(), namespaceBundle, options));
+ internalGetWebServiceUrl(null, namespaceBundle, options));
}
- if (suName instanceof NamespaceBundle) {
- return internalGetWebServiceUrl(Optional.empty(), (NamespaceBundle) suName, options);
+ if (suName instanceof NamespaceBundle namespaceBundle) {
+ return internalGetWebServiceUrl(null, namespaceBundle, options);
}
throw new IllegalArgumentException("Unrecognized class of NamespaceBundle: " + suName.getClass().getName());
}
/**
* Return the URL of the broker who's owning a particular service unit.
- *
+ * <p>
* If the service unit is not owned, return an empty optional
*/
public Optional<URL> getWebServiceUrl(ServiceUnitId suName, LookupOptions options) throws Exception {
return getWebServiceUrlAsync(suName, options)
.get(pulsar.getConfiguration().getMetadataStoreOperationTimeoutSeconds(), SECONDS);
}
- private CompletableFuture<Optional<URL>> internalGetWebServiceUrl(Optional<ServiceUnitId> topic,
+ private CompletableFuture<Optional<URL>> internalGetWebServiceUrl(ServiceUnitId topic,
Review Comment:
may be we need a @Nullable on ServiceUnitId here
--
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