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,VectorIndexHandler
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.pinot.segment.spi.index.IndexHandler
IndexHandler.NoOp
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,FieldIndexConfigs>_fieldIndexConfigsprotected SegmentDirectory_segmentDirectoryprotected TableConfig_tableConfigprotected Set<String>_tmpForwardIndexColumns
-
Constructor Summary
Constructors Constructor Description BaseIndexHandler(SegmentDirectory segmentDirectory, Map<String,FieldIndexConfigs> fieldIndexConfigs, TableConfig tableConfig)BaseIndexHandler(SegmentDirectory segmentDirectory, IndexLoadingConfig indexLoadingConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ColumnMetadatacreateForwardIndexIfNeeded(SegmentDirectory.Writer segmentWriter, String columnName, boolean isTemporaryForwardIndex)voidpostUpdateIndicesCleanup(SegmentDirectory.Writer segmentWriter)-
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.spi.index.IndexHandler
needUpdateIndices, updateIndices
-
-
-
-
Field Detail
-
_segmentDirectory
protected final SegmentDirectory _segmentDirectory
-
_fieldIndexConfigs
protected final Map<String,FieldIndexConfigs> _fieldIndexConfigs
-
_tableConfig
@Nullable protected final TableConfig _tableConfig
-
-
Constructor Detail
-
BaseIndexHandler
public BaseIndexHandler(SegmentDirectory segmentDirectory, IndexLoadingConfig indexLoadingConfig)
-
BaseIndexHandler
public BaseIndexHandler(SegmentDirectory segmentDirectory, Map<String,FieldIndexConfigs> fieldIndexConfigs, @Nullable TableConfig tableConfig)
-
-
Method Detail
-
postUpdateIndicesCleanup
public void postUpdateIndicesCleanup(SegmentDirectory.Writer segmentWriter) throws Exception
- Specified by:
postUpdateIndicesCleanupin interfaceIndexHandler- Throws:
Exception
-
createForwardIndexIfNeeded
protected ColumnMetadata createForwardIndexIfNeeded(SegmentDirectory.Writer segmentWriter, String columnName, boolean isTemporaryForwardIndex) throws IOException
- Throws:
IOException
-
-