You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by we...@apache.org on 2021/07/28 10:18:32 UTC

[hadoop] branch trunk updated: HDFS-16137.Improve the comments related to FairCallQueue#queues. (#3226)

This is an automated email from the ASF dual-hosted git repository.

weichiu pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new fd13970  HDFS-16137.Improve the comments related to FairCallQueue#queues. (#3226)
fd13970 is described below

commit fd13970d946ccfea529a8366227af72c418da7ec
Author: jianghuazhu <74...@qq.com>
AuthorDate: Wed Jul 28 18:18:04 2021 +0800

    HDFS-16137.Improve the comments related to FairCallQueue#queues. (#3226)
    
    Co-authored-by: zhujianghua <zh...@zhujianghuadeMacBook-Pro.local>
    Reviewed-by: Viraj Jasani <vj...@apache.org>
---
 .../src/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 6db9348..84614a8 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.Collection;
 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<E extends Schedulable> extends AbstractQueue<E>
 
   public static final Logger LOG = LoggerFactory.getLogger(FairCallQueue.class);
 
-  /* The queues */
-  private final ArrayList<BlockingQueue<E>> 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<BlockingQueue<E>> queues;
 
   /* Track available permits for scheduled objects.  All methods that will
    * mutate a subqueue must acquire or release a permit on the semaphore.

---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org