You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/09/02 23:59:59 UTC
[GitHub] [hadoop] tasanuma commented on a change in pull request #2240: HADOOP-17165. Implement service-user feature in DecayRPCScheduler.
tasanuma commented on a change in pull request #2240:
URL: https://github.com/apache/hadoop/pull/2240#discussion_r482607435
##########
File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/DecayRpcScheduler.java
##########
@@ -483,6 +501,12 @@ private void recomputeScheduleCache() {
for (Map.Entry<Object, List<AtomicLong>> entry : callCosts.entrySet()) {
Object id = entry.getKey();
+ // The priority for service users is always 0
+ if (isServiceUser((String)id)) {
Review comment:
@sunchao Thanks for your review.
* When DecayRpcScheduler decays, it calls recomputeScheduleCache to recalculate the priority of all users, including service users, and put them in the cache. So we had to do this in recomputeScheduleCache as well. Lines 415-421 of the unit test cover this case.
* I moved it from getPriorityLevel to cachedOrComputedPriorityLevel because I thought it would be a little more efficient to determine if a user is a service user after looking at the cache information.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org