@Override public short blockletIndex() { return blockInfos.get(index).getDetailInfo().getBlockletId(); }
/** * Read the file footer of block file and get the blocklets to query */ private void readAndFillBlockletInfo(List<TableBlockInfo> tableBlockInfos, TableBlockInfo blockInfo, BlockletDetailInfo blockletDetailInfo, DataFileFooter fileFooter, SegmentProperties segmentProperties) { List<BlockletInfo> blockletList = fileFooter.getBlockletList(); // cases when blockletID will be -1 // 1. In case of legacy store // 2. In case CACHE_LEVEL is block and no other dataMap apart from blockletDataMap is // created for a table // In all above cases entries will be according to the number of blocks and not according to // number of blocklets if (blockletDetailInfo.getBlockletId() != -1) { // fill the info only for given blockletId in detailInfo BlockletInfo blockletInfo = blockletList.get(blockletDetailInfo.getBlockletId()); fillBlockletInfoToTableBlock(tableBlockInfos, blockInfo, blockletDetailInfo, fileFooter, blockletInfo, blockletDetailInfo.getBlockletId(), segmentProperties); } else { short count = 0; for (BlockletInfo blockletInfo : blockletList) { fillBlockletInfoToTableBlock(tableBlockInfos, blockInfo, blockletDetailInfo, fileFooter, blockletInfo, count, segmentProperties); count++; } } }
detailInfo.getBlockletInfo().setNumberOfRows(detailInfo.getRowCount()); detailInfo.getBlockletInfo().setNumberOfPages(detailInfo.getPagesCount()); detailInfo.setBlockletId(blockInfo.getDetailInfo().getBlockletId()); int[] pageRowCount = new int[detailInfo.getPagesCount()]; int numberOfPagesCompletelyFilled = detailInfo.getRowCount();