Class FairCallQueue<E extends Schedulable>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue<E>
org.apache.hadoop.ipc.FairCallQueue<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, BlockingQueue<E>, Queue<E>

public class FairCallQueue<E extends Schedulable> extends AbstractQueue<E> implements BlockingQueue<E>
A queue with multiple levels for each priority.
  • Field Details

    • IPC_CALLQUEUE_PRIORITY_LEVELS_DEFAULT

      @Deprecated public static final int IPC_CALLQUEUE_PRIORITY_LEVELS_DEFAULT
      Deprecated.
      See Also:
    • IPC_CALLQUEUE_PRIORITY_LEVELS_KEY

      @Deprecated public static final String IPC_CALLQUEUE_PRIORITY_LEVELS_KEY
      Deprecated.
      See Also:
    • LOG

      public static final org.slf4j.Logger LOG
  • Constructor Details

    • FairCallQueue

      @VisibleForTesting public FairCallQueue(int priorityLevels, int capacity, String ns, Configuration conf)
    • FairCallQueue

      @VisibleForTesting public FairCallQueue(int priorityLevels, int capacity, String ns, boolean serverFailOverEnabled, Configuration conf)
    • FairCallQueue

      public FairCallQueue(int priorityLevels, int capacity, String ns, int[] capacityWeights, boolean serverFailOverEnabled, Configuration conf)
      Create a FairCallQueue.
      Parameters:
      priorityLevels - the total size of all multi-level queue priority policies
      capacity - the total size of all sub-queues
      ns - the prefix to use for configuration
      capacityWeights - the weights array for capacity allocation among subqueues
      serverFailOverEnabled - whether or not to enable callqueue overflow trigger failover for stateless servers when RPC call queue is filled
      conf - the configuration to read from Notes: Each sub-queue has a capacity of `capacity / numSubqueues`. The first or the highest priority sub-queue has an excess capacity of `capacity % numSubqueues`
  • Method Details