From fd13970d946ccfea529a8366227af72c418da7ec Mon Sep 17 00:00:00 2001 From: jianghuazhu <740087514@qq.com> Date: Wed, 28 Jul 2021 18:18:04 +0800 Subject: [PATCH] HDFS-16137.Improve the comments related to FairCallQueue#queues. (#3226) Co-authored-by: zhujianghua Reviewed-by: Viraj Jasani --- .../main/java/org/apache/hadoop/ipc/FairCallQueue.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/FairCallQueue.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/FairCallQueue.java index 6db9348980..84614a874d 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/FairCallQueue.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/FairCallQueue.java @@ -25,6 +25,7 @@ import java.util.Iterator; import java.util.AbstractQueue; import java.util.HashMap; +import java.util.List; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.Semaphore; @@ -58,8 +59,12 @@ public class FairCallQueue extends AbstractQueue public static final Logger LOG = LoggerFactory.getLogger(FairCallQueue.class); - /* The queues */ - private final ArrayList> queues; + /** + * Save the queue data of multiple priority strategies. + * Usually the number of queue data and priority strategies saved + * is the same. + */ + private final List> queues; /* Track available permits for scheduled objects. All methods that will * mutate a subqueue must acquire or release a permit on the semaphore.