HDFS-16296. RouterRpcFairnessPolicyController add rejected permits for each nameservice#3613
Merged
ferhui merged 5 commits intoapache:trunkfrom Nov 5, 2021
Merged
HDFS-16296. RouterRpcFairnessPolicyController add rejected permits for each nameservice#3613ferhui merged 5 commits intoapache:trunkfrom
ferhui merged 5 commits intoapache:trunkfrom
Conversation
Contributor
Author
Contributor
|
@symious Thanks for contribution, it looks good. Let's wait for the CI reports. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
goiri
approved these changes
Nov 3, 2021
| private int getTotalRejectedPermits(RouterContext routerContext) { | ||
| int totalRejectedPermits = 0; | ||
| for (String ns : cluster.getNameservices()) { | ||
| totalRejectedPermits += routerContext.getRouter().getRpcServer() |
Member
There was a problem hiding this comment.
We may want to extract:
routerContext.getRouter().getRpcServer().getRPCClient()
|
💔 -1 overall
This message was automatically generated. |
ferhui
approved these changes
Nov 4, 2021
Contributor
|
💔 -1 overall
This message was automatically generated. |
tomscut
reviewed
Nov 4, 2021
|
|
||
| /** Fairness manager to control handlers assigned per NS. */ | ||
| private RouterRpcFairnessPolicyController routerRpcFairnessPolicyController; | ||
| private Map<String, AtomicLong> rejectedPermitsPerNs = new ConcurrentHashMap<>(); |
Contributor
There was a problem hiding this comment.
For better performance, can we replace AtomicLong with LongAdder. Just a suggestion.
|
💔 -1 overall
This message was automatically generated. |
tomscut
approved these changes
Nov 4, 2021
Contributor
simbadzina
pushed a commit
to simbadzina/hadoop
that referenced
this pull request
Sep 13, 2022
…r each nameservice (apache#3613)
HarshitGupta11
pushed a commit
to HarshitGupta11/hadoop
that referenced
this pull request
Nov 28, 2022
…r each nameservice (apache#3613)
LiuGuH
pushed a commit
to LiuGuH/hadoop
that referenced
this pull request
Mar 26, 2024
…r each nameservice (apache#3613)
NyteKnight
pushed a commit
to NyteKnight/hadoop
that referenced
this pull request
Jun 25, 2024
…r each nameservice (apache#3613)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of PR
Currently RouterRpcFairnessPolicyController has a metric of "getProxyOpPermitRejected" to show the total rejected invokes due to lack of permits.
This ticket is to add the metrics for each nameservice to have a better view of the load of each nameservice.
Jira ticket: https://issues.apache.org/jira/browse/HDFS-16296
How was this patch tested?
unit test
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?