Class IndexLoadingConfig
- java.lang.Object
-
- org.apache.pinot.segment.local.segment.index.loader.IndexLoadingConfig
-
public class IndexLoadingConfig extends Object
Table level index loading config.
-
-
Field Summary
Fields Modifier and Type Field Description static StringREAD_MODE_KEY
-
Constructor Summary
Constructors Constructor Description IndexLoadingConfig()IndexLoadingConfig(InstanceDataManagerConfig instanceDataManagerConfig, TableConfig tableConfig)IndexLoadingConfig(InstanceDataManagerConfig instanceDataManagerConfig, TableConfig tableConfig, Schema schema)NOTE: This step might modify the passed in table config and schema.
-
Method Summary
-
-
-
Field Detail
-
READ_MODE_KEY
public static final String READ_MODE_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
IndexLoadingConfig
public IndexLoadingConfig(InstanceDataManagerConfig instanceDataManagerConfig, TableConfig tableConfig, @Nullable Schema schema)
NOTE: This step might modify the passed in table config and schema.
-
IndexLoadingConfig
public IndexLoadingConfig(InstanceDataManagerConfig instanceDataManagerConfig, TableConfig tableConfig)
-
IndexLoadingConfig
public IndexLoadingConfig()
-
-
Method Detail
-
getInstanceDataManagerConfig
public InstanceDataManagerConfig getInstanceDataManagerConfig()
-
refreshIndexConfigs
public void refreshIndexConfigs()
-
calculateIndexConfigsByColName
public Map<String,FieldIndexConfigs> calculateIndexConfigsByColName()
Calculates the map from column toFieldIndexConfigs, merging the information related to older configs ( which is also heavily used by tests) and the one included in the TableConfig (in case the latter is not null). This method does not modify the result ofgetFieldIndexConfigByColName()orgetFieldIndexConfigByColName(). To do so, callrefreshIndexConfigs(). The main difference between this method andFieldIndexConfigsUtil.createIndexConfigsByColName(TableConfig, Schema)is that the former relays on the TableConfig, while this method can be used even when theIndexLoadingConfigwas configured by calling the setter methods.
-
getReadMode
public ReadMode getReadMode()
-
setReadMode
public void setReadMode(ReadMode readMode)
For tests only.
-
setSortedColumn
public void setSortedColumn(String sortedColumn)
For tests only.
-
addRangeIndexColumn
public void addRangeIndexColumn(String... columns)
-
getRangeIndexVersion
public int getRangeIndexVersion()
-
getFSTIndexType
public FSTType getFSTIndexType()
-
getTextIndexColumns
public Set<String> getTextIndexColumns()
Used in two places: (1) InPhysicalColumnIndexContainerto create the index loading info for immutable segments (2) In LLRealtimeSegmentDataManager to create the RealtimeSegmentConfig. RealtimeSegmentConfig is used to specify the text index column info for newly to-be-created Mutable Segments- Returns:
- a set containing names of text index columns
-
getJsonIndexConfigs
public Map<String,JsonIndexConfig> getJsonIndexConfigs()
-
getH3IndexConfigs
public Map<String,H3IndexConfig> getH3IndexConfigs()
-
setColumnProperties
public void setColumnProperties(Map<String,Map<String,String>> columnProperties)
-
setInvertedIndexColumns
public void setInvertedIndexColumns(Set<String> invertedIndexColumns)
For tests only.
-
addInvertedIndexColumns
public void addInvertedIndexColumns(String... invertedIndexColumns)
-
addInvertedIndexColumns
public void addInvertedIndexColumns(Collection<String> invertedIndexColumns)
-
removeInvertedIndexColumns
public void removeInvertedIndexColumns(String... invertedIndexColumns)
-
removeInvertedIndexColumns
public void removeInvertedIndexColumns(Collection<String> invertedIndexColumns)
-
setNoDictionaryColumns
public void setNoDictionaryColumns(Set<String> noDictionaryColumns)
For tests only. Used by segmentPreProcessorTest to set raw columns.
-
removeNoDictionaryColumns
public void removeNoDictionaryColumns(String... noDictionaryColumns)
-
removeNoDictionaryColumns
public void removeNoDictionaryColumns(Collection<String> noDictionaryColumns)
-
addNoDictionaryColumns
public void addNoDictionaryColumns(String... noDictionaryColumns)
-
addNoDictionaryColumns
public void addNoDictionaryColumns(Collection<String> noDictionaryColumns)
-
setCompressionConfigs
public void setCompressionConfigs(Map<String,ChunkCompressionType> compressionConfigs)
For tests only. Used by segmentPreProcessorTest to set compression configs.
-
setRangeIndexColumns
public void setRangeIndexColumns(Set<String> rangeIndexColumns)
For tests only.
-
addRangeIndexColumns
public void addRangeIndexColumns(String... rangeIndexColumns)
-
removeRangeIndexColumns
public void removeRangeIndexColumns(String... rangeIndexColumns)
-
setTextIndexColumns
public void setTextIndexColumns(Set<String> textIndexColumns)
Used directly from text search unit test code since the test code doesn't really have a table config and is directly testing the query execution code of text search using data from generated segments and then loading those segments.
-
addTextIndexColumns
public void addTextIndexColumns(String... textIndexColumns)
-
removeTextIndexColumns
public void removeTextIndexColumns(String... textIndexColumns)
-
addFSTIndexColumns
public void addFSTIndexColumns(String... fstIndexColumns)
-
removeFSTIndexColumns
public void removeFSTIndexColumns(String... fstIndexColumns)
-
setFSTIndexType
public void setFSTIndexType(FSTType fstType)
-
setH3IndexConfigs
public void setH3IndexConfigs(Map<String,H3IndexConfig> h3IndexConfigs)
-
setBloomFilterConfigs
public void setBloomFilterConfigs(Map<String,BloomFilterConfig> bloomFilterConfigs)
-
setOnHeapDictionaryColumns
public void setOnHeapDictionaryColumns(Set<String> onHeapDictionaryColumns)
-
setForwardIndexDisabledColumns
public void setForwardIndexDisabledColumns(Set<String> forwardIndexDisabledColumns)
For tests only.
-
addForwardIndexDisabledColumns
public void addForwardIndexDisabledColumns(String... forwardIndexDisabledColumns)
-
removeForwardIndexDisabledColumns
public void removeForwardIndexDisabledColumns(String... forwardIndexDisabledColumns)
-
getCompressionConfigs
public Map<String,ChunkCompressionType> getCompressionConfigs()
Populates a map containing column name as key and compression type as value. This map will only contain the compressionType overrides, and it does not correspond to the default value of compressionType (derived using SegmentColumnarIndexCreator.getColumnCompressionType()) used for a column. Note that only RAW forward index columns will be populated in this map.- Returns:
- a map containing column name as key and compressionType as value.
-
getBloomFilterConfigs
public Map<String,BloomFilterConfig> getBloomFilterConfigs()
-
isEnableDynamicStarTreeCreation
public boolean isEnableDynamicStarTreeCreation()
-
getStarTreeIndexConfigs
@Nullable public List<StarTreeIndexConfig> getStarTreeIndexConfigs()
-
isEnableDefaultStarTree
public boolean isEnableDefaultStarTree()
-
getSegmentVersion
@Nullable public SegmentVersion getSegmentVersion()
-
setSegmentVersion
public void setSegmentVersion(SegmentVersion segmentVersion)
For tests only.
-
isEnableSplitCommit
public boolean isEnableSplitCommit()
-
isEnableSplitCommitEndWithMetadata
public boolean isEnableSplitCommitEndWithMetadata()
-
isRealtimeOffHeapAllocation
public boolean isRealtimeOffHeapAllocation()
-
isDirectRealtimeOffHeapAllocation
public boolean isDirectRealtimeOffHeapAllocation()
-
getColumnMinMaxValueGeneratorMode
public ColumnMinMaxValueGeneratorMode getColumnMinMaxValueGeneratorMode()
-
getSegmentStoreURI
public String getSegmentStoreURI()
-
setColumnMinMaxValueGeneratorMode
public void setColumnMinMaxValueGeneratorMode(ColumnMinMaxValueGeneratorMode columnMinMaxValueGeneratorMode)
For tests only.
-
getRealtimeAvgMultiValueCount
public int getRealtimeAvgMultiValueCount()
-
getTableConfig
public TableConfig getTableConfig()
-
getSchema
@Nullable public Schema getSchema()
-
setTableConfig
public void setTableConfig(TableConfig tableConfig)
-
getSegmentDirectoryLoader
public String getSegmentDirectoryLoader()
-
getSegmentDirectoryConfigs
public PinotConfiguration getSegmentDirectoryConfigs()
-
getInstanceId
public String getInstanceId()
-
setTableDataDir
public void setTableDataDir(String tableDataDir)
-
getTableDataDir
public String getTableDataDir()
-
setSegmentTier
public void setSegmentTier(String segmentTier)
-
getSegmentTier
public String getSegmentTier()
-
getFieldIndexConfig
@Nullable public FieldIndexConfigs getFieldIndexConfig(String columnName)
-
getFieldIndexConfigByColName
public Map<String,FieldIndexConfigs> getFieldIndexConfigByColName()
-
getAllKnownColumns
public Set<String> getAllKnownColumns()
Returns a subset of the columns on the table. WhengetSchema()is defined, the subset is equal the columns on the schema. In other cases, this method tries its bests to get the columns from other attributes likegetTableConfig(), which may also not be defined or may not be complete.
-
setInstanceTierConfigs
public void setInstanceTierConfigs(Map<String,Map<String,String>> tierConfigs)
-
-