/** * This method returns the list of Blocks associated with the segment * from the SegmentUpdateDetails List. * @param segmentName * @return */ public List<String> getBlockNameFromSegment(String segmentName) { List<String> blockNames = new ArrayList<String>(); for (SegmentUpdateDetails block : updateDetails) { if (block.getSegmentName().equalsIgnoreCase(segmentName) && !CarbonUpdateUtil .isBlockInvalid(block.getSegmentStatus())) { blockNames.add(block.getBlockName()); } } return blockNames; }
if (needCompleteList && block.getBlockName().equalsIgnoreCase(blkName)) { files.add(eachFile); CarbonTablePath.DataFileUtil.getTimeStampFromDeleteDeltaFile(fileName)); if (block.getBlockName().equalsIgnoreCase(blkName)) {
/** * Returns all delta file paths of specified block * * @param blockDir block directory with CarbonFile format * @param blockNameFromTuple block name from tuple * @param extension the file extension name * @param segment the segment name * @return the list of delete file */ private List<String> getDeltaFiles(CarbonFile blockDir, final String blockNameFromTuple, final String extension, String segment) throws IOException { List<String> deleteFileList = new ArrayList<>(); for (SegmentUpdateDetails block : updateDetails) { if (block.getBlockName().equalsIgnoreCase(blockNameFromTuple) && block.getSegmentName() .equalsIgnoreCase(segment) && !CarbonUpdateUtil .isBlockInvalid(block.getSegmentStatus())) { final long deltaStartTimestamp = getStartTimeOfDeltaFile(extension, block); // If there is no delete delete file , then return null if (deltaStartTimestamp == 0) { return deleteFileList; } final long deltaEndTimeStamp = getEndTimeOfDeltaFile(extension, block); // final long deltaEndTimeStamp = block.getDeleteDeltaEndTimeAsLong(); // final long deltaStartTimestamp = block.getDeleteDeltaStartTimeAsLong(); return getFilePaths(blockDir, blockNameFromTuple, extension, deleteFileList, deltaStartTimestamp, deltaEndTimeStamp); } } return deleteFileList; }
if (updateLists[i].getBlockName().equalsIgnoreCase(compactedBlocks) && updateLists[i].getSegmentStatus() != SegmentStatus.COMPACTED && updateLists[i].getSegmentStatus() != SegmentStatus.MARKED_FOR_DELETE) {
FileFactory.getCarbonFile(segmentPath, FileFactory.getFileType(segmentPath)); for (SegmentUpdateDetails block : updateDetails) { if ((block.getBlockName().equalsIgnoreCase(blockName)) && (block.getSegmentName().equalsIgnoreCase(segmentId.getSegmentNo())) && !CarbonUpdateUtil.isBlockInvalid((block.getSegmentStatus()))) {
if (origDetails.getBlockName().equalsIgnoreCase(carbonDataMergerUtilResult.getBlockName()) && origDetails.getSegmentName() .equalsIgnoreCase(carbonDataMergerUtilResult.getSegmentName())) {