Class VeniceAdaptiveIngestionThrottler
java.lang.Object
com.linkedin.venice.throttle.EventThrottler
com.linkedin.davinci.kafka.consumer.VeniceAdaptiveIngestionThrottler
- All Implemented Interfaces:
VeniceRateLimiter
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.linkedin.venice.throttle.VeniceRateLimiter
VeniceRateLimiter.RateLimiterType
-
Field Summary
Fields inherited from class com.linkedin.venice.throttle.EventThrottler
BLOCK_STRATEGY, REJECT_STRATEGY
-
Constructor Summary
ConstructorsConstructorDescriptionVeniceAdaptiveIngestionThrottler
(int signalIdleThreshold, long quotaPerSecond, List<Double> factors, long timeWindow, String throttlerName) -
Method Summary
Modifier and TypeMethodDescriptionvoid
long
void
maybeThrottle
(double eventsSeen) Sleeps if necessary to slow down the caller.void
registerBoosterSignal
(BooleanSupplier supplier) void
registerLimiterSignal
(BooleanSupplier supplier) Methods inherited from class com.linkedin.venice.throttle.EventThrottler
getConfiguredMaxRatePerSecond, getMaxRatePerSecond, getQuota, getRateConfig, getTime, isCheckQuotaBeforeRecording, setQuota, toString, tryAcquirePermit
-
Constructor Details
-
VeniceAdaptiveIngestionThrottler
-
-
Method Details
-
getThrottlerName
- Overrides:
getThrottlerName
in classEventThrottler
-
maybeThrottle
public void maybeThrottle(double eventsSeen) Description copied from class:EventThrottler
Sleeps if necessary to slow down the caller.- Overrides:
maybeThrottle
in classEventThrottler
- Parameters:
eventsSeen
- Number of events seen since last invocation. Basis for determining whether its necessary to sleep.
-
registerLimiterSignal
-
registerBoosterSignal
-
checkSignalAndAdjustThrottler
public void checkSignalAndAdjustThrottler() -
getCurrentThrottlerRate
public long getCurrentThrottlerRate()
-