Class StarTreeIndexSeparator

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class StarTreeIndexSeparator
    extends Object
    implements Closeable
    The StarTreeIndexSeparator pulls out the individual star-trees from the common star-tree index file
    • 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 of StarTreeV2BuilderConfig for 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-trees
        builderConfig - StarTreeV2BuilderConfig of the star-tree to separate
        Returns:
        if star-tree exist then total docs in the separated tree, else -1
        Throws:
        IOException