Class IngestionThrottler
java.lang.Object
com.linkedin.davinci.kafka.consumer.IngestionThrottler
- All Implemented Interfaces:
Closeable
,AutoCloseable
This throttler has the following functionality:
1. When running in DaVinci mode, if there are active current version bootstrapping with speedup mode is on, this
ingestion throttler will switch to speedup throttler.
2. Otherwise, this class will switch to regular throttler.
This throttler is supposed to be adaptive throttler to speed up the DaVinci bootstrapping and fall back to the regular
mode when the bootstrapping is done.
-
Constructor Summary
ConstructorsConstructorDescriptionIngestionThrottler
(boolean isDaVinciClient, VeniceServerConfig serverConfig, Supplier<Map<String, StoreIngestionTask>> ongoingIngestionTaskMapSupplier, int checkInterval, TimeUnit checkTimeUnit, AdaptiveThrottlerSignalService adaptiveThrottlerSignalService) IngestionThrottler
(boolean isDaVinciClient, VeniceServerConfig serverConfig, Supplier<Map<String, StoreIngestionTask>> ongoingIngestionTaskMapSupplier, AdaptiveThrottlerSignalService adaptiveThrottlerSignalService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
void
maybeThrottleBandwidth
(int totalBytes) void
maybeThrottleRecordRate
(ConsumerPoolType poolType, int count)
-
Constructor Details
-
IngestionThrottler
public IngestionThrottler(boolean isDaVinciClient, VeniceServerConfig serverConfig, Supplier<Map<String, StoreIngestionTask>> ongoingIngestionTaskMapSupplier, AdaptiveThrottlerSignalService adaptiveThrottlerSignalService) -
IngestionThrottler
public IngestionThrottler(boolean isDaVinciClient, VeniceServerConfig serverConfig, Supplier<Map<String, StoreIngestionTask>> ongoingIngestionTaskMapSupplier, int checkInterval, TimeUnit checkTimeUnit, AdaptiveThrottlerSignalService adaptiveThrottlerSignalService)
-
-
Method Details
-
maybeThrottleRecordRate
-
maybeThrottleBandwidth
public void maybeThrottleBandwidth(int totalBytes) -
isUsingSpeedupThrottler
public boolean isUsingSpeedupThrottler() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-