Class ForwardIndexHandler
- java.lang.Object
-
- org.apache.pinot.segment.local.segment.index.loader.BaseIndexHandler
-
- org.apache.pinot.segment.local.segment.index.loader.ForwardIndexHandler
-
- All Implemented Interfaces:
IndexHandler
public class ForwardIndexHandler extends BaseIndexHandler
Helper class used bySegmentPreProcessorto make changes to forward index and dictionary configs. Note that this handler only works for segment versions >= 3.0. Support for segment version < 3.0 is not added because majority of the usecases are in versions >= 3.0 and this avoids adding tech debt. The currently supported operations are: 1. Change compression type for a raw column 2. Enable dictionary 3. Disable dictionary 4. Disable forward index 5. Rebuild the forward index for a forwardIndexDisabled column TODO: Add support for the following: 1. Segment versions < V3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classForwardIndexHandler.Operation-
Nested classes/interfaces inherited from interface org.apache.pinot.segment.spi.index.IndexHandler
IndexHandler.NoOp
-
-
Field Summary
-
Fields inherited from class org.apache.pinot.segment.local.segment.index.loader.BaseIndexHandler
_fieldIndexConfigs, _segmentDirectory, _tableConfig, _tmpForwardIndexColumns
-
-
Constructor Summary
Constructors Constructor Description ForwardIndexHandler(SegmentDirectory segmentDirectory, Map<String,FieldIndexConfigs> fieldIndexConfigs, Schema schema, TableConfig tableConfig)ForwardIndexHandler(SegmentDirectory segmentDirectory, IndexLoadingConfig indexLoadingConfig, Schema schema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanneedUpdateIndices(SegmentDirectory.Reader segmentReader)voidupdateIndices(SegmentDirectory.Writer segmentWriter)-
Methods inherited from class org.apache.pinot.segment.local.segment.index.loader.BaseIndexHandler
createForwardIndexIfNeeded, postUpdateIndicesCleanup
-
-
-
-
Constructor Detail
-
ForwardIndexHandler
public ForwardIndexHandler(SegmentDirectory segmentDirectory, IndexLoadingConfig indexLoadingConfig, Schema schema)
-
ForwardIndexHandler
public ForwardIndexHandler(SegmentDirectory segmentDirectory, Map<String,FieldIndexConfigs> fieldIndexConfigs, Schema schema, @Nullable TableConfig tableConfig)
-
-
Method Detail
-
needUpdateIndices
public boolean needUpdateIndices(SegmentDirectory.Reader segmentReader) throws Exception
- Throws:
Exception
-
updateIndices
public void updateIndices(SegmentDirectory.Writer segmentWriter) throws Exception
- Throws:
Exception
-
-