Class StarTreeIndexSeparator
- java.lang.Object
-
- org.apache.pinot.segment.local.startree.v2.builder.StarTreeIndexSeparator
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class StarTreeIndexSeparator extends Object implements Closeable
TheStarTreeIndexSeparatorpulls out the individual star-trees from the common star-tree index file
-
-
Constructor Summary
Constructors Constructor Description StarTreeIndexSeparator(File indexMapFile, File indexFile, org.apache.commons.configuration.PropertiesConfiguration metadataProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()List<StarTreeV2BuilderConfig>extractBuilderConfigs(org.apache.commons.configuration.PropertiesConfiguration metadataProperties)Extract the list ofStarTreeV2BuilderConfigfor each of the star-tree present in the given metadata properties.List<Integer>extractTotalDocsList(org.apache.commons.configuration.PropertiesConfiguration metadataProperties)intseparate(File starTreeOutputDir, StarTreeV2BuilderConfig builderConfig)Extract star-tree index files of the star-tree represented by the builderConfig.
-
-
-
Constructor Detail
-
StarTreeIndexSeparator
public StarTreeIndexSeparator(File indexMapFile, File indexFile, org.apache.commons.configuration.PropertiesConfiguration metadataProperties) throws IOException
- Throws:
IOException
-
-
Method Detail
-
extractTotalDocsList
public List<Integer> extractTotalDocsList(org.apache.commons.configuration.PropertiesConfiguration metadataProperties)
-
extractBuilderConfigs
public List<StarTreeV2BuilderConfig> extractBuilderConfigs(org.apache.commons.configuration.PropertiesConfiguration metadataProperties)
Extract the list ofStarTreeV2BuilderConfigfor each of the star-tree present in the given metadata properties.- Parameters:
metadataProperties- index metadata properties- Returns:
- List of
StarTreeV2BuilderConfig
-
separate
public int separate(File starTreeOutputDir, StarTreeV2BuilderConfig builderConfig) throws IOException
Extract star-tree index files of the star-tree represented by the builderConfig. The extracted star-tree index files are written to the provided starTreeOutputDir.- Parameters:
starTreeOutputDir- output directory for extracted star-treesbuilderConfig-StarTreeV2BuilderConfigof the star-tree to separate- Returns:
- if star-tree exist then total docs in the separated tree, else -1
- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-