use of org.apache.carbondata.core.indexstore.blockletindex.BlockletIndexModel in project carbondata by apache.
the class BlockletIndexStore method loadAndGetIndex.
/**
* Below method will be used to load the segment of segments
* One segment may have multiple task , so table segment will be loaded
* based on task id and will return the map of taskId to table segment
* map
*
* @return map of task id to segment mapping
* @throws IOException
*/
private BlockIndex loadAndGetIndex(TableBlockIndexUniqueIdentifier identifier, SegmentIndexFileStore indexFileStore, Map<String, BlockMetaInfo> blockMetaInfoMap, CarbonTable carbonTable, boolean addTableBlockToUnsafe, Configuration configuration, boolean serializeDmStore, List<DataFileFooter> indexInfos) throws IOException {
BlockIndex blockIndex = (BlockIndex) BlockletIndexFactory.createIndex(carbonTable);
final BlockletIndexModel blockletIndexModel = new BlockletIndexModel(carbonTable, identifier.getIndexFilePath() + CarbonCommonConstants.FILE_SEPARATOR + identifier.getIndexFileName(), indexFileStore.getFileData(identifier.getIndexFileName()), blockMetaInfoMap, identifier.getSegmentId(), addTableBlockToUnsafe, configuration, serializeDmStore);
blockletIndexModel.setIndexInfos(indexInfos);
blockIndex.init(blockletIndexModel);
return blockIndex;
}
Aggregations