Class StarTreeV2BuilderConfig
- java.lang.Object
-
- org.apache.pinot.segment.local.startree.v2.builder.StarTreeV2BuilderConfig
-
public class StarTreeV2BuilderConfig extends Object
TheStarTreeV2BuilderConfigclass contains the configuration for star-tree builder.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MAX_LEAF_RECORDS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Map<String,com.fasterxml.jackson.databind.JsonNode>convertJsonNodeToMap(com.fasterxml.jackson.databind.JsonNode columnsMetadata)booleanequals(Object o)static StarTreeV2BuilderConfigfromIndexConfig(StarTreeIndexConfig indexConfig)static StarTreeV2BuilderConfigfromMetadata(StarTreeV2Metadata starTreeV2Metadata)static StarTreeV2BuilderConfiggenerateDefaultConfig(SegmentMetadata segmentMetadata)Generates default config based on the segment metadata.static StarTreeV2BuilderConfiggenerateDefaultConfig(Schema schema, com.fasterxml.jackson.databind.JsonNode columnsMetadata)TreeMap<AggregationFunctionColumnPair,AggregationSpec>getAggregationSpecs()List<String>getDimensionsSplitOrder()Set<AggregationFunctionColumnPair>getFunctionColumnPairs()intgetMaxLeafRecords()Set<String>getSkipStarNodeCreationForDimensions()inthashCode()StringtoString()voidwriteMetadata(org.apache.commons.configuration2.Configuration metadataProperties, int totalDocs)Writes the metadata which is used to initialize theStarTreeV2Metadatawhen loading the segment.
-
-
-
Field Detail
-
DEFAULT_MAX_LEAF_RECORDS
public static final int DEFAULT_MAX_LEAF_RECORDS
- See Also:
- Constant Field Values
-
-
Method Detail
-
fromIndexConfig
public static StarTreeV2BuilderConfig fromIndexConfig(StarTreeIndexConfig indexConfig)
-
fromMetadata
public static StarTreeV2BuilderConfig fromMetadata(StarTreeV2Metadata starTreeV2Metadata)
-
generateDefaultConfig
public static StarTreeV2BuilderConfig generateDefaultConfig(SegmentMetadata segmentMetadata)
Generates default config based on the segment metadata.- All dictionary-encoded single-value dimensions with cardinality smaller or equal to the threshold will be included in the split order, sorted by their cardinality in descending order.
- All dictionary-encoded Time/DateTime columns will be appended to the split order following the dimensions, sorted by their cardinality in descending order. Here we assume that time columns will be included in most queries as the range filter column and/or the group by column, so for better performance, we always include them as the last elements in the split order.
- Use COUNT(*) and SUM for all numeric metrics as function column pairs
- Use default value for max leaf records
-
generateDefaultConfig
public static StarTreeV2BuilderConfig generateDefaultConfig(Schema schema, com.fasterxml.jackson.databind.JsonNode columnsMetadata)
-
convertJsonNodeToMap
public static Map<String,com.fasterxml.jackson.databind.JsonNode> convertJsonNodeToMap(com.fasterxml.jackson.databind.JsonNode columnsMetadata)
-
getAggregationSpecs
public TreeMap<AggregationFunctionColumnPair,AggregationSpec> getAggregationSpecs()
-
getFunctionColumnPairs
public Set<AggregationFunctionColumnPair> getFunctionColumnPairs()
-
getMaxLeafRecords
public int getMaxLeafRecords()
-
writeMetadata
public void writeMetadata(org.apache.commons.configuration2.Configuration metadataProperties, int totalDocs)Writes the metadata which is used to initialize theStarTreeV2Metadatawhen loading the segment.
-
-