-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDFS-16296. RouterRpcFairnessPolicyController add rejected permits for each nameservice #3613
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
Conversation
|
@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. |
| private int getTotalRejectedPermits(RouterContext routerContext) { | ||
| int totalRejectedPermits = 0; | ||
| for (String ns : cluster.getNameservices()) { | ||
| totalRejectedPermits += routerContext.getRouter().getRpcServer() |
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.
We may want to extract:
routerContext.getRouter().getRpcServer().getRPCClient()
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.
Updated.
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
|
||
| /** Fairness manager to control handlers assigned per NS. */ | ||
| private RouterRpcFairnessPolicyController routerRpcFairnessPolicyController; | ||
| private Map<String, AtomicLong> rejectedPermitsPerNs = new ConcurrentHashMap<>(); |
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.
For better performance, can we replace AtomicLong with LongAdder. Just a suggestion.
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.
Updated.
|
💔 -1 overall
This message was automatically generated. |
…r each nameservice (apache#3613)
…r each nameservice (apache#3613)
…r each nameservice (apache#3613)
…r each nameservice (apache#3613)
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?