-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
WebService refactoring #40
Conversation
…ry argument in the constructor.
Little WebService refactor, removing magic values, removing unnecessa…
CLA is valid! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any issue with changes. Pulsar's config is pulled out by AuthenticationFilter, which sets a precedent that that's acceptable. I defer to @merlimat & friends thought.
tlsConnector.setHost(pulsar.getBindAddress()); | ||
connectors.add(tlsConnector); | ||
} | ||
|
||
// Limit number of concurrent HTTP connections to avoid getting out of file descriptors | ||
connectors.stream().forEach(c -> c.setAcceptQueueSize(1024 / connectors.size())); | ||
connectors.stream().forEach(c -> c.setAcceptQueueSize(WebService.MAX_CONCURRENT_REQUESTES / connectors.size())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While in here... is there a good reason for connectors.stream().forEach
vs. just using connectors.forEach
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. Also the line below, as we're iterating over the connectors, while not to call server.addConnector(c)
?
Removing more code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Apologies, fix coming, seems one can't simply |
Turns out one can't simply addConnector...
Upgrade pulsar to 2.4.0
- Add some test cases for KafkaRequestHandler. fix error in the tests. - change handleListOffsetRequest to get topic offset from PersistentTopic directly instead of calling admin command to get topic stats. - In topicManager add a Map to cache PersistentTopic.
(cherry picked from commit c823c08) (cherry picked from commit c17cd00) Co-authored-by: Rui Fu <[email protected]>
Motivation
Clarifying the code in the
WebService
.Modifications
Removes the unnecessary argument in the constructor.
Removes magic values.
Result
No functional changes.