Class StarTreeIndexMapUtils
- java.lang.Object
-
- org.apache.pinot.segment.local.startree.v2.store.StarTreeIndexMapUtils
-
public class StarTreeIndexMapUtils extends Object
TheStarTreeIndexMapUtilsclass is a utility class to store/load star-tree index map to/from file.The star-tree index map file contains index maps for multiple star-trees, where the index map is a map from index to the offset and size in the star-tree index file.
The entry in the index file is stored in the following format (for STAR_TREE index type, column is null):
- $starTreeId.$column.$indexType.OFFSET = $indexOffsetInFile
- $starTreeId.$column.$indexType.SIZE = $indexSize
For an example:
- 0.null.STAR_TREE.OFFSET = 0
- 0.null.STAR_TREE.SIZE = 2000
- 0.dimension1.FORWARD.OFFSET = 2000
- 0.dimension1.FORWARD.SIZE = 1000
- 0.dimension2.FORWARD.OFFSET = 3000
- 0.dimension2.FORWARD.SIZE = 1500
- 0.sum__metric.FORWARD.OFFSET = 4500
- 0.sum__metric.FORWARD.SIZE = 1000
- 1.null.STAR_TREE.OFFSET = 5500
- 1.null.STAR_TREE.SIZE = 2500
- ...
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStarTreeIndexMapUtils.IndexKeyKey of the index map.static classStarTreeIndexMapUtils.IndexTypeType of the index.static classStarTreeIndexMapUtils.IndexValueValue of the index map.
-
Field Summary
Fields Modifier and Type Field Description static StarTreeIndexMapUtils.IndexKeySTAR_TREE_INDEX_KEY
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Map<StarTreeIndexMapUtils.IndexKey,StarTreeIndexMapUtils.IndexValue>>loadFromInputStream(InputStream indexMapInputStream, int numStarTrees)Loads the index maps for multiple star-trees from an input stream.static voidstoreToFile(List<List<org.apache.commons.lang3.tuple.Pair<StarTreeIndexMapUtils.IndexKey,StarTreeIndexMapUtils.IndexValue>>> indexMaps, File indexMapFile)Stores the index maps for multiple star-trees into a file.
-
-
-
Field Detail
-
STAR_TREE_INDEX_KEY
public static final StarTreeIndexMapUtils.IndexKey STAR_TREE_INDEX_KEY
-
-
Method Detail
-
storeToFile
public static void storeToFile(List<List<org.apache.commons.lang3.tuple.Pair<StarTreeIndexMapUtils.IndexKey,StarTreeIndexMapUtils.IndexValue>>> indexMaps, File indexMapFile)
Stores the index maps for multiple star-trees into a file.
-
loadFromInputStream
public static List<Map<StarTreeIndexMapUtils.IndexKey,StarTreeIndexMapUtils.IndexValue>> loadFromInputStream(InputStream indexMapInputStream, int numStarTrees)
Loads the index maps for multiple star-trees from an input stream.
-
-