Class StarTreeBuilderUtils
- java.lang.Object
-
- org.apache.pinot.segment.local.startree.StarTreeBuilderUtils
-
public class StarTreeBuilderUtils extends Object
TheStarTreeBuilderUtilsclass contains utility methods for star-tree builders.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStarTreeBuilderUtils.TreeNode
-
Field Summary
Fields Modifier and Type Field Description static intINVALID_ID
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<StarTreeV2BuilderConfig>generateBuilderConfigs(List<StarTreeIndexConfig> indexConfigs, boolean enableDefaultStarTree, SegmentMetadata segmentMetadata)Generates the deduplicated star-tree builder configs.static voidremoveStarTrees(File indexDir)Removes all the star-trees from the given segment.static voidserializeTree(File starTreeFile, StarTreeBuilderUtils.TreeNode rootNode, String[] dimensions, int numNodes)Serialize the star-tree structure into a file.static booleanshouldModifyExistingStarTrees(List<StarTreeV2BuilderConfig> builderConfigs, List<StarTreeV2Metadata> metadataList)Returnstrueif the given star-tree builder configs do not match the star-tree metadata, in which case the relevant star-trees need to be added/removed,falseotherwise.
-
-
-
Field Detail
-
INVALID_ID
public static final int INVALID_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
generateBuilderConfigs
public static List<StarTreeV2BuilderConfig> generateBuilderConfigs(@Nullable List<StarTreeIndexConfig> indexConfigs, boolean enableDefaultStarTree, SegmentMetadata segmentMetadata)
Generates the deduplicated star-tree builder configs.
-
serializeTree
public static void serializeTree(File starTreeFile, StarTreeBuilderUtils.TreeNode rootNode, String[] dimensions, int numNodes) throws IOException
Serialize the star-tree structure into a file.- Throws:
IOException
-
shouldModifyExistingStarTrees
public static boolean shouldModifyExistingStarTrees(List<StarTreeV2BuilderConfig> builderConfigs, List<StarTreeV2Metadata> metadataList)
Returnstrueif the given star-tree builder configs do not match the star-tree metadata, in which case the relevant star-trees need to be added/removed,falseotherwise.
-
-