Class ForwardIndexType
- java.lang.Object
-
- org.apache.pinot.segment.spi.index.AbstractIndexType<ForwardIndexConfig,ForwardIndexReader,ForwardIndexCreator>
-
- org.apache.pinot.segment.local.segment.index.forward.ForwardIndexType
-
- All Implemented Interfaces:
ConfigurableFromIndexLoadingConfig<ForwardIndexConfig>,IndexType<ForwardIndexConfig,ForwardIndexReader,ForwardIndexCreator>
public class ForwardIndexType extends AbstractIndexType<ForwardIndexConfig,ForwardIndexReader,ForwardIndexCreator> implements ConfigurableFromIndexLoadingConfig<ForwardIndexConfig>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.pinot.segment.spi.index.IndexType
IndexType.BuildLifecycle
-
-
Field Summary
Fields Modifier and Type Field Description static StringINDEX_DISPLAY_NAME
-
Constructor Summary
Constructors Modifier Constructor Description protectedForwardIndexType()
-
Method Summary
-
Methods inherited from class org.apache.pinot.segment.spi.index.AbstractIndexType
convertToNewFormat, equals, getConfig, getId, getReaderFactory, handleIndexSpecificCleanup, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.pinot.segment.spi.index.IndexType
getIndexBuildLifecycle, getIndexReader
-
-
-
-
Field Detail
-
INDEX_DISPLAY_NAME
public static final String INDEX_DISPLAY_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getIndexConfigClass
public Class<ForwardIndexConfig> getIndexConfigClass()
- Specified by:
getIndexConfigClassin interfaceIndexType<ForwardIndexConfig,ForwardIndexReader,ForwardIndexCreator>
-
fromIndexLoadingConfig
public Map<String,ForwardIndexConfig> fromIndexLoadingConfig(IndexLoadingConfig indexLoadingConfig)
Description copied from interface:ConfigurableFromIndexLoadingConfigReturns a map that can be used to get the index config. This map is used with higher priority whenever the index configuration needs to be read from anIndexLoadingConfig. SometimesIndexLoadingConfigis not completely configured andIndexLoadingConfig.getAllKnownColumns()does not return all columns in the table. Therefore the returned map may not have an entry for each column in the actual schema.- Specified by:
fromIndexLoadingConfigin interfaceConfigurableFromIndexLoadingConfig<ForwardIndexConfig>- Returns:
- a map whose keys are the column names and the values are the index configuration for that column.
-
getDefaultConfig
public ForwardIndexConfig getDefaultConfig()
- Specified by:
getDefaultConfigin interfaceIndexType<ForwardIndexConfig,ForwardIndexReader,ForwardIndexCreator>
-
getPrettyName
public String getPrettyName()
- Specified by:
getPrettyNamein interfaceIndexType<ForwardIndexConfig,ForwardIndexReader,ForwardIndexCreator>
-
createDeserializer
public ColumnConfigDeserializer<ForwardIndexConfig> createDeserializer()
- Specified by:
createDeserializerin classAbstractIndexType<ForwardIndexConfig,ForwardIndexReader,ForwardIndexCreator>
-
getDefaultCompressionType
public static ChunkCompressionType getDefaultCompressionType(FieldSpec.FieldType fieldType)
-
createIndexCreator
public ForwardIndexCreator createIndexCreator(IndexCreationContext context, ForwardIndexConfig indexConfig) throws Exception
- Specified by:
createIndexCreatorin interfaceIndexType<ForwardIndexConfig,ForwardIndexReader,ForwardIndexCreator>- Throws:
Exception
-
createIndexHandler
public IndexHandler createIndexHandler(SegmentDirectory segmentDirectory, Map<String,FieldIndexConfigs> configsByCol, @Nullable Schema schema, @Nullable TableConfig tableConfig)
- Specified by:
createIndexHandlerin interfaceIndexType<ForwardIndexConfig,ForwardIndexReader,ForwardIndexCreator>
-
createReaderFactory
protected IndexReaderFactory<ForwardIndexReader> createReaderFactory()
- Specified by:
createReaderFactoryin classAbstractIndexType<ForwardIndexConfig,ForwardIndexReader,ForwardIndexCreator>
-
getFileExtension
public String getFileExtension(ColumnMetadata columnMetadata)
-
getFileExtensions
public List<String> getFileExtensions(@Nullable ColumnMetadata columnMetadata)
- Specified by:
getFileExtensionsin interfaceIndexType<ForwardIndexConfig,ForwardIndexReader,ForwardIndexCreator>
-
read
public static ForwardIndexReader<?> read(SegmentDirectory.Reader segmentReader, ColumnMetadata columnMetadata) throws IOException
Returns the forward index reader for the given column. This method will return the default reader, skipping any index overload.- Throws:
IOException
-
read
public static ForwardIndexReader read(PinotDataBuffer dataBuffer, ColumnMetadata metadata)
Returns the forward index reader for the given column. This method will return the default reader, skipping any index overload.
-
read
public static ForwardIndexReader<?> read(SegmentDirectory.Reader segmentReader, FieldIndexConfigs fieldIndexConfigs, ColumnMetadata metadata) throws IndexReaderConstraintException, IOException
Returns the forward index reader for the given column. This method will delegate onStandardIndexes, so the correct reader will be returned even when using index overload.
-
createMutableIndex
@Nullable public MutableIndex createMutableIndex(MutableIndexContext context, ForwardIndexConfig config)
- Specified by:
createMutableIndexin interfaceIndexType<ForwardIndexConfig,ForwardIndexReader,ForwardIndexCreator>
-
-