Class DecayRpcScheduler

java.lang.Object
org.apache.hadoop.ipc.DecayRpcScheduler
All Implemented Interfaces:
DecayRpcSchedulerMXBean, RpcScheduler, MetricsSource

public class DecayRpcScheduler extends Object implements RpcScheduler, DecayRpcSchedulerMXBean, MetricsSource
The decay RPC scheduler tracks the cost of incoming requests in a map, then decays the costs at a fixed time interval. The scheduler is optimized for large periods (on the order of seconds), as it offloads work to the decay sweep.
  • Field Details

    • IPC_SCHEDULER_DECAYSCHEDULER_PERIOD_KEY

      public static final String IPC_SCHEDULER_DECAYSCHEDULER_PERIOD_KEY
      Period controls how many milliseconds between each decay sweep.
      See Also:
    • IPC_SCHEDULER_DECAYSCHEDULER_PERIOD_DEFAULT

      public static final long IPC_SCHEDULER_DECAYSCHEDULER_PERIOD_DEFAULT
      See Also:
    • IPC_FCQ_DECAYSCHEDULER_PERIOD_KEY

      @Deprecated public static final String IPC_FCQ_DECAYSCHEDULER_PERIOD_KEY
      Deprecated.
      See Also:
    • IPC_SCHEDULER_DECAYSCHEDULER_FACTOR_KEY

      public static final String IPC_SCHEDULER_DECAYSCHEDULER_FACTOR_KEY
      Decay factor controls how much each cost is suppressed by on each sweep. Valid numbers are > 0 and < 1. Decay factor works in tandem with period to control how long the scheduler remembers an identity.
      See Also:
    • IPC_SCHEDULER_DECAYSCHEDULER_FACTOR_DEFAULT

      public static final double IPC_SCHEDULER_DECAYSCHEDULER_FACTOR_DEFAULT
      See Also:
    • IPC_FCQ_DECAYSCHEDULER_FACTOR_KEY

      @Deprecated public static final String IPC_FCQ_DECAYSCHEDULER_FACTOR_KEY
      Deprecated.
      See Also:
    • IPC_DECAYSCHEDULER_THRESHOLDS_KEY

      public static final String IPC_DECAYSCHEDULER_THRESHOLDS_KEY
      Thresholds are specified as integer percentages, and specify which usage range each queue will be allocated to. For instance, specifying the list 10, 40, 80 implies 4 queues, with - q3 from 80% up - q2 from 40 up to 80 - q1 from 10 up to 40 - q0 otherwise.
      See Also:
    • IPC_FCQ_DECAYSCHEDULER_THRESHOLDS_KEY

      @Deprecated public static final String IPC_FCQ_DECAYSCHEDULER_THRESHOLDS_KEY
      Deprecated.
      See Also:
    • IPC_DECAYSCHEDULER_SERVICE_USERS_KEY

      public static final String IPC_DECAYSCHEDULER_SERVICE_USERS_KEY
      Service users will always be scheduled into the highest-priority queue. They are specified as a comma-separated list.
      See Also:
    • DECAYSCHEDULER_UNKNOWN_IDENTITY

      public static final String DECAYSCHEDULER_UNKNOWN_IDENTITY
      See Also:
    • IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_ENABLE_KEY

      public static final String IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_ENABLE_KEY
      See Also:
    • IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_ENABLE_DEFAULT

      public static final Boolean IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_ENABLE_DEFAULT
    • IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_THRESHOLDS_KEY

      public static final String IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_THRESHOLDS_KEY
      See Also:
    • DECAYSCHEDULER_METRICS_TOP_USER_COUNT

      public static final String DECAYSCHEDULER_METRICS_TOP_USER_COUNT
      See Also:
    • DECAYSCHEDULER_METRICS_TOP_USER_COUNT_DEFAULT

      public static final int DECAYSCHEDULER_METRICS_TOP_USER_COUNT_DEFAULT
      See Also:
    • LOG

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

    • DecayRpcScheduler

      public DecayRpcScheduler(int numLevels, String ns, Configuration conf)
      Create a decay scheduler.
      Parameters:
      numLevels - number of priority levels
      ns - config prefix, so that we can configure multiple schedulers in a single instance.
      conf - configuration to use.
  • Method Details