-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Simplify ServiceUrlProvider related APIs #2671
Merged
merlimat
merged 1 commit into
apache:master
from
merlimat:improve-service-url-provider-api
Sep 28, 2018
Merged
Simplify ServiceUrlProvider related APIs #2671
merlimat
merged 1 commit into
apache:master
from
merlimat:improve-service-url-provider-api
Sep 28, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
👍
Matteo Merli <notifications@github.com> 于2018年9月28日周五 下午1:09写道:
… Motivation
I have seen few issues with ee5afa5
<ee5afa5>
:
1.
There are 3 new methods in the PulsarClient interface which are meant
to be used together. We should reduce
the public API to the minimum possible. So I propose to just have a
Pulsar.updateServiceUrl() which internally
will perform all the needed operations in order to reconnect the
client to new endpoint.
2.
We shouldn't be exposing ClientConfigurationData in the API since it
belongs to impl package
3.
There is a leak of resources when the LookupService gets replaced with
the new one since the existing
is not closed.
Modifications
Refactored to simplify API for adding ServiceUrlProvider
cc/ @codelipenghui <https://github.com/codelipenghui>
It would be good to get this into 2.2 since it's changing the API for this
new feature.
------------------------------
You can view, comment on, or merge this pull request online at:
#2671
Commit Summary
- Simplify ServiceUrlProvider related APIs
File Changes
- *M*
pulsar-broker/src/test/java/org/apache/pulsar/client/api/ServiceUrlProviderTest.java
<https://github.com/apache/pulsar/pull/2671/files#diff-0> (8)
- *M*
pulsar-client/src/main/java/org/apache/pulsar/client/api/PulsarClient.java
<https://github.com/apache/pulsar/pull/2671/files#diff-1> (35)
- *M*
pulsar-client/src/main/java/org/apache/pulsar/client/api/ServiceUrlProvider.java
<https://github.com/apache/pulsar/pull/2671/files#diff-2> (25)
- *M*
pulsar-client/src/main/java/org/apache/pulsar/client/impl/BinaryProtoLookupService.java
<https://github.com/apache/pulsar/pull/2671/files#diff-3> (8)
- *M*
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientBuilderImpl.java
<https://github.com/apache/pulsar/pull/2671/files#diff-4> (2)
- *M*
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionPool.java
<https://github.com/apache/pulsar/pull/2671/files#diff-5> (20)
- *M*
pulsar-client/src/main/java/org/apache/pulsar/client/impl/HttpClient.java
<https://github.com/apache/pulsar/pull/2671/files#diff-6> (18)
- *M*
pulsar-client/src/main/java/org/apache/pulsar/client/impl/HttpLookupService.java
<https://github.com/apache/pulsar/pull/2671/files#diff-7> (5)
- *M*
pulsar-client/src/main/java/org/apache/pulsar/client/impl/LookupService.java
<https://github.com/apache/pulsar/pull/2671/files#diff-8> (6)
- *M*
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java
<https://github.com/apache/pulsar/pull/2671/files#diff-9> (22)
Patch Links:
- https://github.com/apache/pulsar/pull/2671.patch
- https://github.com/apache/pulsar/pull/2671.diff
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2671>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMAkBRQbcliYeaS0MVCFlFW2b88gEQYXks5ufa8QgaJpZM4W93A0>
.
|
rerun java8 tests |
jiazhai
approved these changes
Sep 28, 2018
run java8 tests |
sijie
approved these changes
Sep 28, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
I have seen few issues with ee5afa5:
There are 3 new methods in the
PulsarClient
interface which are meant to be used together. We should reducethe public API to the minimum possible. So I propose to just have a
Pulsar.updateServiceUrl()
which internallywill perform all the needed operations in order to reconnect the client to new endpoint.
We shouldn't be exposing
ClientConfigurationData
in the API since it belongs toimpl
packageThere is a leak of resources when the
LookupService
gets replaced with the new one since the existingis not closed.
Modifications
Refactored to simplify API for adding
ServiceUrlProvider
cc/ @codelipenghui
It would be good to get this into 2.2 since it's changing the API for this new feature.