Skip to content
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

[Spotbugs] Enable spotbugs for pulsar functions #8851

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix ci error
Signed-off-by: xiaolong.ran <rxl@apache.org>
  • Loading branch information
wolfstudy committed Dec 11, 2020
commit b5a07fb92ec63dda61e2f1699af312edab2446d5
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,12 @@ private CompletableFuture<NamespaceBundle> getFullBundleAsync(NamespaceName fqnn
}

/**
* Return the URL of the broker who's owning a particular service unit in asynchronous way
* Return the URL of the broker who's owning a particular service unit in asynchronous way.
*
* If the service unit is not owned, return a CompletableFuture with empty optional
* If the service unit is not owned, return a CompletableFuture with empty optional.
*/
public CompletableFuture<Optional<URL>> getWebServiceUrlAsync(ServiceUnitId suName, LookupOptions options) throws Exception {
public CompletableFuture<Optional<URL>> getWebServiceUrlAsync(ServiceUnitId suName,
LookupOptions options) throws Exception {
if (suName instanceof TopicName) {
TopicName name = (TopicName) suName;
if (LOG.isDebugEnabled()) {
Expand Down Expand Up @@ -267,7 +268,8 @@ public CompletableFuture<Optional<URL>> getWebServiceUrlAsync(ServiceUnitId suNa
* 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().getZooKeeperOperationTimeoutSeconds(), SECONDS);
return getWebServiceUrlAsync(suName, options).
get(pulsar.getConfiguration().getZooKeeperOperationTimeoutSeconds(), SECONDS);
}

private CompletableFuture<Optional<URL>> internalGetWebServiceUrl(NamespaceBundle bundle, LookupOptions options) {
Expand Down