use of org.apache.carbondata.core.mutate.data.RowCountDetailsVO in project carbondata by apache.
the class CarbonUpdateUtil method createBlockDetailsMap.
/**
* @param blockMappingVO
* @param segmentUpdateStatusManager
*/
public static void createBlockDetailsMap(BlockMappingVO blockMappingVO, SegmentUpdateStatusManager segmentUpdateStatusManager) {
Map<String, Long> blockRowCountMap = blockMappingVO.getBlockRowCountMapping();
Map<String, RowCountDetailsVO> outputMap = new HashMap<>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
for (Map.Entry<String, Long> blockRowEntry : blockRowCountMap.entrySet()) {
String key = blockRowEntry.getKey();
long alreadyDeletedCount = 0;
SegmentUpdateDetails detail = segmentUpdateStatusManager.getDetailsForABlock(key);
if (null != detail) {
alreadyDeletedCount = Long.parseLong(detail.getDeletedRowsInBlock());
}
RowCountDetailsVO rowCountDetailsVO = new RowCountDetailsVO(blockRowEntry.getValue(), alreadyDeletedCount);
outputMap.put(key, rowCountDetailsVO);
}
blockMappingVO.setCompleteBlockRowDetailVO(outputMap);
}
Aggregations