use of com.google.common.collect.HashBiMap in project pinot by linkedin.
the class SegmentIndexCreationDriverImpl method serializeTree.
private void serializeTree(StarTreeBuilder starTreeBuilder, boolean enableOffHeapFormat) throws Exception {
//star tree was built using its own dictionary, we need to re-map dimension value id
Map<String, HashBiMap<Object, Integer>> dictionaryMap = starTreeBuilder.getDictionaryMap();
StarTree tree = starTreeBuilder.getTree();
HashBiMap<String, Integer> dimensionNameToIndexMap = starTreeBuilder.getDimensionNameToIndexMap();
StarTreeIndexNode node = (StarTreeIndexNode) tree.getRoot();
updateTree(node, dictionaryMap, dimensionNameToIndexMap);
File starTreeFile = new File(tempIndexDir, V1Constants.STAR_TREE_INDEX_FILE);
if (enableOffHeapFormat) {
StarTreeSerDe.writeTreeOffHeapFormat(tree, starTreeFile);
} else {
StarTreeSerDe.writeTreeOnHeapFormat(tree, starTreeFile);
}
}
Aggregations