-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
priority:mediumModerate impact; usability gapsModerate impact; usability gapstype:featureNew features and enhancementsNew features and enhancements
Description
Here is Override function fetchLatestBaseFile(String partitionPath, String fileId) in RocksDbBasedFileSystemView
@Override
protected Option<HoodieBaseFile> fetchLatestBaseFile(String partitionPath, String fileId) {
// Retries only file-slices of the file and filters for the latest
return Option
.ofNullable(rocksDB
.<HoodieBaseFile>prefixSearch(schemaHelper.getColFamilyForView(),
schemaHelper.getPrefixForDataFileViewByPartitionFile(partitionPath, fileId))
.map(Pair::getValue).reduce(null,
(x, y) -> ((x == null) ? y
: (y == null) ? null
: HoodieTimeline.compareTimestamps(x.getCommitTime(), HoodieTimeline.GREATER_THAN, y.getCommitTime())
? x
: y)));
}
Question is Why we need to OverWrite this un-abstract function in AbstractTableFileSystemView
/**
* Default implementation for fetching latest base-file.
*
* @param partitionPath Partition path
* @param fileId File Id
* @return base File if present
*/
protected Option<HoodieBaseFile> fetchLatestBaseFile(String partitionPath, String fileId) {
return Option.fromJavaOptional(fetchLatestBaseFiles(partitionPath)
.filter(fs -> fs.getFileId().equals(fileId)).findFirst());
}
Is it necessary? Or Is it correctly if we don't flow this common logic.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority:mediumModerate impact; usability gapsModerate impact; usability gapstype:featureNew features and enhancementsNew features and enhancements