Class BaseIndexHandler
- java.lang.Object
-
- org.apache.pinot.segment.local.segment.index.loader.BaseIndexHandler
-
- All Implemented Interfaces:
IndexHandler
- Direct Known Subclasses:
BloomFilterHandler,ForwardIndexHandler,FSTIndexHandler,H3IndexHandler,InvertedIndexHandler,JsonIndexHandler,RangeIndexHandler,TextIndexHandler
public abstract class BaseIndexHandler extends Object implements IndexHandler
Base class for all of theIndexHandlerclasses. This class provides a mechanism to rebuild the forward index if the forward index does not exist and is required to rebuild the index of interest. It also handles cleaning up the forward index if temporarily built once all handlers have completed via overriding the postUpdateIndicesCleanup() method. ForIndexHandlerclasses which do not utilize the forward index or do not need this behavior, the postUpdateIndicesCleanup() method can be overridden to be a no-op.
-
-
Field Summary
Fields Modifier and Type Field Description protected IndexLoadingConfig_indexLoadingConfigprotected SegmentMetadata_segmentMetadataprotected Set<String>_tmpForwardIndexColumns
-
Constructor Summary
Constructors Constructor Description BaseIndexHandler(SegmentMetadata segmentMetadata, IndexLoadingConfig indexLoadingConfig)
-
Method Summary
Modifier and Type Method Description protected voidcreateForwardIndexIfNeeded(SegmentDirectory.Writer segmentWriter, ColumnMetadata columnMetadata, IndexCreatorProvider indexCreatorProvider, boolean isTemporaryForwardIndex)voidpostUpdateIndicesCleanup(SegmentDirectory.Writer segmentWriter)Performs any cleanup actions required after the indexes have been updated.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pinot.segment.local.segment.index.loader.IndexHandler
needUpdateIndices, updateIndices
-
-
-
-
Field Detail
-
_segmentMetadata
protected final SegmentMetadata _segmentMetadata
-
_indexLoadingConfig
protected final IndexLoadingConfig _indexLoadingConfig
-
-
Constructor Detail
-
BaseIndexHandler
public BaseIndexHandler(SegmentMetadata segmentMetadata, IndexLoadingConfig indexLoadingConfig)
-
-
Method Detail
-
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- Throws:
Exception
-
createForwardIndexIfNeeded
protected void createForwardIndexIfNeeded(SegmentDirectory.Writer segmentWriter, ColumnMetadata columnMetadata, IndexCreatorProvider indexCreatorProvider, boolean isTemporaryForwardIndex) throws IOException
- Throws:
IOException
-
-