Class FSTIndexHandler
- java.lang.Object
-
- org.apache.pinot.segment.local.segment.index.loader.BaseIndexHandler
-
- org.apache.pinot.segment.local.segment.index.loader.invertedindex.FSTIndexHandler
-
- All Implemented Interfaces:
IndexHandler
public class FSTIndexHandler extends BaseIndexHandler
Helper class for fst indexes used bySegmentPreProcessor. to create FST index for column during segment load time. Currently FST index is always created (if enabled on a column) during segment generation (1) A new segment with FST index is created/refreshed. Server loads the segment. The handler detects the existence of FST index and returns. (2) A reload is issued on an existing segment with existing FST index. The handler detects the existence of FST index and returns. (3) A reload is issued on an existing segment after FST index is enabled on an existing column. Reads the dictionary to create FST index. (4) A reload is issued on an existing segment after FST index is enabled on a newly added column. In this case, the default column handler would have taken care of adding dictionary for the new column. Read the dictionary to create FST index.
-
-
Field Summary
-
Fields inherited from class org.apache.pinot.segment.local.segment.index.loader.BaseIndexHandler
_indexLoadingConfig, _segmentMetadata, _tmpForwardIndexColumns
-
-
Constructor Summary
Constructors Constructor Description FSTIndexHandler(SegmentMetadata segmentMetadata, IndexLoadingConfig indexLoadingConfig)
-
Method Summary
Modifier and Type Method Description booleanneedUpdateIndices(SegmentDirectory.Reader segmentReader)Check if there is a need to add new indices or removes obsolete indices.voidpostUpdateIndicesCleanup(SegmentDirectory.Writer segmentWriter)Performs any cleanup actions required after the indexes have been updated.voidupdateIndices(SegmentDirectory.Writer segmentWriter, IndexCreatorProvider indexCreatorProvider)Adds new indices and removes obsolete indices.-
Methods inherited from class org.apache.pinot.segment.local.segment.index.loader.BaseIndexHandler
createForwardIndexIfNeeded
-
-
-
-
Constructor Detail
-
FSTIndexHandler
public FSTIndexHandler(SegmentMetadata segmentMetadata, IndexLoadingConfig indexLoadingConfig)
-
-
Method Detail
-
needUpdateIndices
public boolean needUpdateIndices(SegmentDirectory.Reader segmentReader)
Description copied from interface:IndexHandlerCheck if there is a need to add new indices or removes obsolete indices.- Returns:
- true if there is a need to update.
-
updateIndices
public void updateIndices(SegmentDirectory.Writer segmentWriter, IndexCreatorProvider indexCreatorProvider) throws Exception
Description copied from interface:IndexHandlerAdds new indices and removes obsolete indices.- Throws:
Exception
-
postUpdateIndicesCleanup
public void postUpdateIndicesCleanup(SegmentDirectory.Writer segmentWriter) throws Exception
Description copied from interface:IndexHandlerPerforms any cleanup actions required after the indexes have been updated. Should be called only after all IndexHandlers have run.- Specified by:
postUpdateIndicesCleanupin interfaceIndexHandler- Overrides:
postUpdateIndicesCleanupin classBaseIndexHandler- Throws:
Exception
-
-