Class RealtimeLuceneIndexReaderRefreshThread

  • All Implemented Interfaces:
    Runnable

    public class RealtimeLuceneIndexReaderRefreshThread
    extends Object
    implements Runnable
    Background thread to refresh the realtime lucene index readers for supporting near-realtime text search. The task maintains a queue of realtime segments. This queue is global (across all realtime segments of all realtime/hybrid tables). Each element in the queue is of type RealtimeLuceneIndexRefreshState.RealtimeLuceneReaders. It encapsulates a lock and all the realtime lucene readers for the particular realtime segment. Since text index is also create on a per column basis, there will be as many realtime lucene readers as the number of columns with text search enabled. Between each successive execution of the task, there is a fixed delay (regardless of how long each execution took). When the task wakes up, it pick the RealtimeLuceneReadersForRealtimeSegment from the head of queue, refresh it's readers and adds this at the tail of queue.
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface Runnable