Class DictionaryRetrievalService

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class DictionaryRetrievalService
    extends AbstractVeniceService
    DictionaryRetrievalService runs in a producer-consumer pattern. A thread is created which waits for items to be put in a shared BlockingQueue. There are 2 producers for the store versions to download dictionaries for. 1) Store metadata changed ZK listener. 2) Each failed dictionary fetch request is retried infinitely (till the version is retired). At Router startup, the dictionaries are pre-fetched for currently active versions that require a dictionary. This process is fail-fast and will prevent router start up if any dictionary fetch request fails. When a dictionary is downloaded for a version, it's corresponding version specific compressor is initialized and is maintained by CompressorFactory.