DecayRpcSchedulerMXBean, RpcScheduler, MetricsSourcepublic class DecayRpcScheduler extends java.lang.Object implements RpcScheduler, DecayRpcSchedulerMXBean, MetricsSource
| Modifier and Type | Class | Description |
|---|---|---|
static class |
DecayRpcScheduler.DecayTask |
This TimerTask will call decayCurrentCosts until
the scheduler has been garbage collected.
|
static class |
DecayRpcScheduler.MetricsProxy |
MetricsProxy is a singleton because we may init multiple schedulers and we
want to clean up resources when a new scheduler replaces the old one.
|
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
DECAYSCHEDULER_METRICS_TOP_USER_COUNT |
|
static int |
DECAYSCHEDULER_METRICS_TOP_USER_COUNT_DEFAULT |
|
static java.lang.String |
DECAYSCHEDULER_UNKNOWN_IDENTITY |
|
static java.lang.Boolean |
IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_ENABLE_DEFAULT |
|
static java.lang.String |
IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_ENABLE_KEY |
|
static java.lang.String |
IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_THRESHOLDS_KEY |
|
static java.lang.String |
IPC_DECAYSCHEDULER_SERVICE_USERS_KEY |
Service users will always be scheduled into the highest-priority queue.
|
static java.lang.String |
IPC_DECAYSCHEDULER_THRESHOLDS_KEY |
Thresholds are specified as integer percentages, and specify which usage
range each queue will be allocated to.
|
static java.lang.String |
IPC_FCQ_DECAYSCHEDULER_FACTOR_KEY |
Deprecated.
|
static java.lang.String |
IPC_FCQ_DECAYSCHEDULER_PERIOD_KEY |
Deprecated.
|
static java.lang.String |
IPC_FCQ_DECAYSCHEDULER_THRESHOLDS_KEY |
Deprecated.
|
static double |
IPC_SCHEDULER_DECAYSCHEDULER_FACTOR_DEFAULT |
|
static java.lang.String |
IPC_SCHEDULER_DECAYSCHEDULER_FACTOR_KEY |
Decay factor controls how much each cost is suppressed by on each sweep.
|
static long |
IPC_SCHEDULER_DECAYSCHEDULER_PERIOD_DEFAULT |
|
static java.lang.String |
IPC_SCHEDULER_DECAYSCHEDULER_PERIOD_KEY |
Period controls how many milliseconds between each decay sweep.
|
static org.slf4j.Logger |
LOG |
| Constructor | Description |
|---|---|
DecayRpcScheduler(int numLevels,
java.lang.String ns,
Configuration conf) |
Create a decay scheduler.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addResponseTime(java.lang.String callName,
Schedulable schedulable,
ProcessingDetails details) |
Store a processing time value for an RPC call into this scheduler.
|
double[] |
getAverageResponseTime() |
|
java.lang.String |
getCallVolumeSummary() |
|
DecayRpcSchedulerDetailedMetrics |
getDecayRpcSchedulerDetailedMetrics() |
|
void |
getMetrics(MetricsCollector collector,
boolean all) |
Get metrics from the metrics source
|
int |
getPriorityLevel(Schedulable obj) |
Compute the appropriate priority for a schedulable based on past requests.
|
long[] |
getResponseTimeCountInLastWindow() |
|
java.lang.String |
getSchedulingDecisionSummary() |
|
long |
getTotalCallVolume() |
|
long |
getTotalRawCallVolume() |
|
long |
getTotalServiceUserCallVolume() |
|
long |
getTotalServiceUserRawCallVolume() |
|
int |
getUniqueIdentityCount() |
|
boolean |
shouldBackOff(Schedulable obj) |
|
void |
stop() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddResponseTimepublic static final java.lang.String IPC_SCHEDULER_DECAYSCHEDULER_PERIOD_KEY
public static final long IPC_SCHEDULER_DECAYSCHEDULER_PERIOD_DEFAULT
@Deprecated public static final java.lang.String IPC_FCQ_DECAYSCHEDULER_PERIOD_KEY
public static final java.lang.String IPC_SCHEDULER_DECAYSCHEDULER_FACTOR_KEY
public static final double IPC_SCHEDULER_DECAYSCHEDULER_FACTOR_DEFAULT
@Deprecated public static final java.lang.String IPC_FCQ_DECAYSCHEDULER_FACTOR_KEY
public static final java.lang.String IPC_DECAYSCHEDULER_THRESHOLDS_KEY
@Deprecated public static final java.lang.String IPC_FCQ_DECAYSCHEDULER_THRESHOLDS_KEY
public static final java.lang.String IPC_DECAYSCHEDULER_SERVICE_USERS_KEY
public static final java.lang.String DECAYSCHEDULER_UNKNOWN_IDENTITY
public static final java.lang.String IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_ENABLE_KEY
public static final java.lang.Boolean IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_ENABLE_DEFAULT
public static final java.lang.String IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_THRESHOLDS_KEY
public static final java.lang.String DECAYSCHEDULER_METRICS_TOP_USER_COUNT
public static final int DECAYSCHEDULER_METRICS_TOP_USER_COUNT_DEFAULT
public static final org.slf4j.Logger LOG
public DecayRpcScheduler(int numLevels,
java.lang.String ns,
Configuration conf)
numLevels - number of priority levelsns - config prefix, so that we can configure multiple schedulers
in a single instance.conf - configuration to use.public int getPriorityLevel(Schedulable obj)
getPriorityLevel in interface RpcSchedulerobj - the schedulable obj to query and rememberpublic boolean shouldBackOff(Schedulable obj)
shouldBackOff in interface RpcSchedulerpublic void addResponseTime(java.lang.String callName,
Schedulable schedulable,
ProcessingDetails details)
RpcScheduleraddResponseTime in interface RpcSchedulercallName - The name of the call.schedulable - The schedulable representing the incoming call.details - The details of processing time.public int getUniqueIdentityCount()
getUniqueIdentityCount in interface DecayRpcSchedulerMXBeanpublic long getTotalCallVolume()
getTotalCallVolume in interface DecayRpcSchedulerMXBeanpublic long getTotalRawCallVolume()
public long getTotalServiceUserCallVolume()
public long getTotalServiceUserRawCallVolume()
public long[] getResponseTimeCountInLastWindow()
getResponseTimeCountInLastWindow in interface DecayRpcSchedulerMXBeanpublic double[] getAverageResponseTime()
getAverageResponseTime in interface DecayRpcSchedulerMXBeanpublic void getMetrics(MetricsCollector collector, boolean all)
MetricsSourcegetMetrics in interface MetricsSourcecollector - to contain the resulting metrics snapshotall - if true, return all metrics even if unchanged.public java.lang.String getSchedulingDecisionSummary()
getSchedulingDecisionSummary in interface DecayRpcSchedulerMXBeanpublic java.lang.String getCallVolumeSummary()
getCallVolumeSummary in interface DecayRpcSchedulerMXBean@VisibleForTesting public DecayRpcSchedulerDetailedMetrics getDecayRpcSchedulerDetailedMetrics()
public void stop()
stop in interface RpcSchedulerCopyright © 2008–2025 Apache Software Foundation. All rights reserved.