Class RealtimeLuceneIndexRefreshState
- java.lang.Object
-
- org.apache.pinot.segment.local.realtime.impl.invertedindex.RealtimeLuceneIndexRefreshState
-
public class RealtimeLuceneIndexRefreshState extends Object
This class manages the realtime lucene index readers. Creates a global queue with all the realtime segment lucene index readers across all tables and manages their refresh usingRealtimeLuceneIndexReaderRefreshThreadTODO: eventually we should explore partitioning this queue on per table basis
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRealtimeLuceneIndexRefreshState.RealtimeLuceneReadersSince the text index is maintained per TEXT column (similar to other Pinot indexes), there could be multiple lucene indexes for a given segment and therefore there can be multiple realtime lucene readers (one for each index/column) for the particular realtime segment.
-
Method Summary
Modifier and Type Method Description voidaddRealtimeReadersToQueue(RealtimeLuceneIndexRefreshState.RealtimeLuceneReaders readersForRealtimeSegment)static RealtimeLuceneIndexRefreshStategetInstance()voidstart()Used by HelixServerStarter during bootstrap to create the singleton instance of this class and start the realtime reader refresh thread.voidstop()Used by HelixServerStarter during shutdown.
-
-
-
Method Detail
-
start
public void start()
Used by HelixServerStarter during bootstrap to create the singleton instance of this class and start the realtime reader refresh thread.
-
stop
public void stop()
Used by HelixServerStarter during shutdown. This sets the volatile "stopped" variable to indicate the shutdown to refresh thread. Since refresh thread might be suspended waiting on the condition variable, we signal the condition variable for the refresh thread to wake up, check that shutdown has been initiated and exit.
-
getInstance
public static RealtimeLuceneIndexRefreshState getInstance()
-
addRealtimeReadersToQueue
public void addRealtimeReadersToQueue(RealtimeLuceneIndexRefreshState.RealtimeLuceneReaders readersForRealtimeSegment)
-
-