public abstract class AbstractTableFileSystemView extends Object implements SyncableFileSystemView, Serializable
TableFileSystemView.BaseFileOnlyView, TableFileSystemView.BaseFileOnlyViewWithLatestSlice, TableFileSystemView.SliceView, TableFileSystemView.SliceViewWithLatestSlice| Modifier and Type | Field and Description |
|---|---|
protected CompletionTimeQueryView |
completionTimeQueryView |
protected HoodieTableMetaClient |
metaClient |
protected ReentrantReadWriteLock.ReadLock |
readLock |
protected ReentrantReadWriteLock.WriteLock |
writeLock |
| Constructor and Description |
|---|
AbstractTableFileSystemView() |
| Modifier and Type | Method and Description |
|---|---|
protected FileSlice |
addBootstrapBaseFileIfPresent(FileSlice fileSlice) |
protected FileSlice |
addBootstrapBaseFileIfPresent(FileSlice fileSlice,
Function<HoodieFileGroupId,Option<BootstrapBaseFileMapping>> bootstrapBaseFileMappingFunc) |
protected HoodieFileGroup |
addBootstrapBaseFileIfPresent(HoodieFileGroup fileGroup) |
protected HoodieFileGroup |
addBootstrapBaseFileIfPresent(HoodieFileGroup fileGroup,
Function<HoodieFileGroupId,Option<BootstrapBaseFileMapping>> bootstrapBaseFileMappingFunc) |
protected HoodieBaseFile |
addBootstrapBaseFileIfPresent(HoodieFileGroupId fileGroupId,
HoodieBaseFile baseFile) |
protected HoodieBaseFile |
addBootstrapBaseFileIfPresent(HoodieFileGroupId fileGroupId,
HoodieBaseFile baseFile,
Function<HoodieFileGroupId,Option<BootstrapBaseFileMapping>> bootstrapBaseFileMappingFunc) |
List<HoodieFileGroup> |
addFilesToView(List<StoragePathInfo> statuses)
Adds the provided statuses into the file system view, and also caches it inside this object.
|
List<HoodieFileGroup> |
addFilesToView(String partitionPath,
List<StoragePathInfo> statuses)
Adds the provided statuses into the file system view for a single partition, and also caches it inside this object.
|
protected abstract void |
addReplacedFileGroups(Map<HoodieFileGroupId,HoodieInstant> replacedFileGroups)
Track instant time for new file groups replaced.
|
protected List<HoodieFileGroup> |
buildFileGroups(String partition,
List<StoragePathInfo> statuses,
HoodieTimeline timeline,
boolean addPendingCompactionFileSlice)
Build FileGroups from passed in file-status.
|
protected List<HoodieFileGroup> |
buildFileGroups(String partition,
Stream<HoodieBaseFile> baseFileStream,
Stream<HoodieLogFile> logFileStream,
HoodieTimeline timeline,
boolean addPendingCompactionFileSlice) |
protected void |
clear()
Clear the resource.
|
void |
close()
Allow View to release resources and close.
|
protected void |
ensurePartitionLoadedCorrectly(String partition)
Allows lazily loading the partitions if needed.
|
protected abstract Stream<Pair<HoodieFileGroupId,HoodieInstant>> |
fetchFileGroupsInPendingClustering()
Fetch all file groups in pending clustering.
|
protected Option<HoodieBaseFile> |
fetchLatestBaseFile(String partitionPath,
String fileId)
Default implementation for fetching latest base-file.
|
Stream<HoodieBaseFile> |
fetchLatestBaseFiles(String partitionPath)
Default implementation for fetching latest base-files for the partition-path.
|
Option<FileSlice> |
fetchLatestFileSlice(String partitionPath,
String fileId)
Default implementation for fetching file-slice.
|
Stream<HoodieBaseFile> |
getAllBaseFiles(String partitionStr)
Stream all the data file versions grouped by FileId for a given partition.
|
Stream<HoodieFileGroup> |
getAllFileGroups(String partitionStr)
Stream all the file groups for a given partition.
|
Stream<HoodieFileGroup> |
getAllFileGroupsStateless(String partitionStr)
Stream all the file groups for a given partition without caching the file group mappings.
|
Stream<FileSlice> |
getAllFileSlices(String partitionStr)
Stream all the file slices for a given partition, latest or not.
|
Map<String,Stream<HoodieBaseFile>> |
getAllLatestBaseFilesBeforeOrOn(String maxCommitTime)
Streams the latest version base files in all partitions with precondition that
commitTime(file) before maxCommitTime.
|
Map<String,Stream<FileSlice>> |
getAllLatestFileSlicesBeforeOrOn(String maxCommitTime)
Stream all latest file slices with precondition that commitTime(file) before maxCommitTime.
|
Stream<FileSlice> |
getAllLogsMergedFileSliceBeforeOrOn(String partitionStr,
String maxInstantTime)
Stream all "merged" file-slices before on an instant time
for a MERGE_ON_READ table with index that can index log files(which means it writes pure logs first).
|
protected List<String> |
getAllPartitionPaths() |
Stream<HoodieFileGroup> |
getAllReplacedFileGroups(String partitionPath)
Stream all the replaced file groups for given partition.
|
Option<HoodieBaseFile> |
getBaseFileOn(String partitionStr,
String instantTime,
String fileId)
Get the version of data file matching the instant time in the given partition.
|
protected abstract Option<BootstrapBaseFileMapping> |
getBootstrapBaseFile(HoodieFileGroupId fileGroupId)
Return pending compaction operation for a file-group.
|
Option<String> |
getCompletionTime(String instantTime)
Returns the completion time for instant.
|
Stream<Pair<HoodieFileGroupId,HoodieInstant>> |
getFileGroupsInPendingClustering()
Filegroups that are in pending clustering.
|
Option<HoodieInstant> |
getLastInstant()
Last Known Instant on which the view is built.
|
protected Option<HoodieBaseFile> |
getLatestBaseFile(HoodieFileGroup fileGroup) |
Option<HoodieBaseFile> |
getLatestBaseFile(String partitionStr,
String fileId)
Get Latest base file for a partition and file-Id.
|
Stream<HoodieBaseFile> |
getLatestBaseFiles()
Stream all the latest data files, in the file system view.
|
Stream<HoodieBaseFile> |
getLatestBaseFiles(String partitionStr)
Stream all the latest data files in the given partition.
|
Stream<HoodieBaseFile> |
getLatestBaseFilesBeforeOrOn(String partitionStr,
String maxCommitTime)
Stream all the latest version data files in the given partition with precondition that commitTime(file) before
maxCommitTime.
|
Stream<HoodieBaseFile> |
getLatestBaseFilesInRange(List<String> commitsToReturn)
Stream all the latest data files pass.
|
Option<FileSlice> |
getLatestFileSlice(String partitionStr,
String fileId)
Get Latest File Slice for a given fileId in a given partition.
|
Stream<FileSlice> |
getLatestFileSliceInRange(List<String> commitsToReturn)
Stream all the latest file slices, in the given range.
|
Stream<FileSlice> |
getLatestFileSlices(String partitionStr)
Stream all the latest file slices in the given partition.
|
Stream<FileSlice> |
getLatestFileSlicesBeforeOrOn(String partitionStr,
String maxCommitTime,
boolean includeFileSlicesInPendingCompaction)
Stream all latest file slices in given partition with precondition that commitTime(file) before maxCommitTime.
|
Stream<FileSlice> |
getLatestFileSlicesIncludingInflight(String partitionPath)
Get the latest file slices for a given partition including the inflight ones.
|
Stream<FileSlice> |
getLatestFileSlicesStateless(String partitionStr)
Stream all the latest file slices in the given partition
without caching the file group mappings.
|
Stream<FileSlice> |
getLatestMergedFileSlicesBeforeOrOn(String partitionStr,
String maxInstantTime)
Stream all "merged" file-slices before on an instant time If a file-group has a pending compaction request, the
file-slice before and after compaction request instant is merged and returned.
|
Stream<FileSlice> |
getLatestUnCompactedFileSlices(String partitionStr)
Stream all the latest uncompacted file slices in the given partition.
|
List<String> |
getPartitionNames() |
List<StoragePath> |
getPartitionPaths() |
protected abstract Option<HoodieInstant> |
getPendingClusteringInstant(HoodieFileGroupId fileGroupId)
Get pending clustering instant time for specified file group.
|
Stream<Pair<String,CompactionOperation>> |
getPendingCompactionOperations()
Return Pending Compaction Operations.
|
protected abstract Option<Pair<String,CompactionOperation>> |
getPendingCompactionOperationWithInstant(HoodieFileGroupId fileGroupId)
Return pending compaction operation for a file-group.
|
Stream<Pair<String,CompactionOperation>> |
getPendingLogCompactionOperations()
Return Pending Compaction Operations.
|
protected abstract Option<Pair<String,CompactionOperation>> |
getPendingLogCompactionOperationWithInstant(HoodieFileGroupId fileGroupId)
Return pending Log compaction operation for a file-group.
|
Stream<HoodieFileGroup> |
getReplacedFileGroupsAfterOrOn(String minCommitTime,
String partitionPath)
Stream all the replaced file groups after or on minCommitTime.
|
Stream<HoodieFileGroup> |
getReplacedFileGroupsBefore(String maxCommitTime,
String partitionPath)
Stream all the replaced file groups before maxCommitTime for given partition.
|
Stream<HoodieFileGroup> |
getReplacedFileGroupsBeforeOrOn(String maxCommitTime,
String partitionPath)
Stream all the replaced file groups before or on maxCommitTime for given partition.
|
protected abstract Option<HoodieInstant> |
getReplaceInstant(HoodieFileGroupId fileGroupId)
Track instant time for file groups replaced.
|
HoodieTimeline |
getTimeline()
Timeline corresponding to the view.
|
HoodieTimeline |
getVisibleCommitsAndCompactionTimeline()
Return Only Commits and Compaction timeline for building file-groups.
|
protected abstract boolean |
hasReplacedFilesInPartition(String partitionPath)
Returns whether there are replaced files within the given partition.
|
protected void |
init(HoodieTableMetaClient metaClient,
HoodieTimeline visibleActiveTimeline)
Initialize the view.
|
protected boolean |
isBaseFileDueToPendingClustering(HoodieBaseFile baseFile)
With async clustering, it is possible to see partial/complete base-files due to inflight-clustering, Ignore those
base-files.
|
protected boolean |
isBaseFileDueToPendingCompaction(String partitionPath,
HoodieBaseFile baseFile)
With async compaction, it is possible to see partial/complete base-files due to inflight-compactions, Ignore those
base-files.
|
protected abstract boolean |
isBootstrapBaseFilePresentForFileId(HoodieFileGroupId fgId)
Check if there is a bootstrap base file present for this file.
|
protected abstract boolean |
isPendingClusteringScheduledForFileId(HoodieFileGroupId fgId)
Check if there is an outstanding clustering operation (requested/inflight) scheduled for this file.
|
protected abstract boolean |
isPendingCompactionScheduledForFileId(HoodieFileGroupId fgId)
Check if there is an outstanding compaction scheduled for this file.
|
protected abstract boolean |
isPendingLogCompactionScheduledForFileId(HoodieFileGroupId fgId)
Check if there is an outstanding log compaction scheduled for this file.
|
protected List<StoragePathInfo> |
listPartition(StoragePath partitionPath)
Return all the files from the partition.
|
protected Map<Pair<String,StoragePath>,List<StoragePathInfo>> |
listPartitions(List<Pair<String,StoragePath>> partitionPathList) |
void |
loadAllPartitions()
Load all partition and file slices into view
|
void |
loadPartitions(List<String> partitionPaths)
Load all partition and file slices into view for the provided partition paths
|
protected void |
refreshCompletionTimeQueryView()
Refresh the completion time query view.
|
protected void |
refreshTimeline(HoodieTimeline visibleActiveTimeline)
Refresh commits timeline.
|
protected abstract void |
removeReplacedFileIdsAtInstants(Set<String> instants)
Remove file groups that are replaced in any of the specified instants.
|
void |
reset()
Clears the partition Map and reset view states.
|
protected abstract void |
resetReplacedFileGroups(Map<HoodieFileGroupId,HoodieInstant> replacedFileGroups)
Track instant time for file groups replaced.
|
protected abstract void |
resetViewState()
Allows all view metadata in file system view storage to be reset by subclasses.
|
void |
sync()
Syncs the file system view from storage to memory.
|
protected HoodieTableMetaClient metaClient
protected CompletionTimeQueryView completionTimeQueryView
protected final ReentrantReadWriteLock.ReadLock readLock
protected final ReentrantReadWriteLock.WriteLock writeLock
protected void init(HoodieTableMetaClient metaClient, HoodieTimeline visibleActiveTimeline)
protected void refreshTimeline(HoodieTimeline visibleActiveTimeline)
visibleActiveTimeline - Visible Active Timelineprotected void refreshCompletionTimeQueryView()
public Option<String> getCompletionTime(String instantTime)
public List<HoodieFileGroup> addFilesToView(List<StoragePathInfo> statuses)
addFilesToView(String, List) instead.public List<HoodieFileGroup> addFilesToView(String partitionPath, List<StoragePathInfo> statuses)
protected List<HoodieFileGroup> buildFileGroups(String partition, List<StoragePathInfo> statuses, HoodieTimeline timeline, boolean addPendingCompactionFileSlice)
protected List<HoodieFileGroup> buildFileGroups(String partition, Stream<HoodieBaseFile> baseFileStream, Stream<HoodieLogFile> logFileStream, HoodieTimeline timeline, boolean addPendingCompactionFileSlice)
public void close()
SyncableFileSystemViewclose in interface AutoCloseableclose in interface SyncableFileSystemViewpublic void reset()
NOTE: The logic MUST BE guarded by the write lock.
reset in interface SyncableFileSystemViewprotected void clear()
protected abstract void resetViewState()
protected List<String> getAllPartitionPaths() throws IOException
IOException - upon error.protected Map<Pair<String,StoragePath>,List<StoragePathInfo>> listPartitions(List<Pair<String,StoragePath>> partitionPathList) throws IOException
partitionPathList - A list of pairs of the relative and absolute paths of the partitions.IOException - upon error.protected void ensurePartitionLoadedCorrectly(String partition)
partition - partition to be loaded if not presentprotected List<StoragePathInfo> listPartition(StoragePath partitionPath) throws IOException
partitionPath - The absolute path of the partitionIOExceptionprotected boolean isBaseFileDueToPendingCompaction(String partitionPath, HoodieBaseFile baseFile)
partitionPath - partition path for the base filebaseFile - base Fileprotected boolean isBaseFileDueToPendingClustering(HoodieBaseFile baseFile)
baseFile - base Fileprotected HoodieFileGroup addBootstrapBaseFileIfPresent(HoodieFileGroup fileGroup)
protected HoodieFileGroup addBootstrapBaseFileIfPresent(HoodieFileGroup fileGroup, Function<HoodieFileGroupId,Option<BootstrapBaseFileMapping>> bootstrapBaseFileMappingFunc)
protected FileSlice addBootstrapBaseFileIfPresent(FileSlice fileSlice)
protected FileSlice addBootstrapBaseFileIfPresent(FileSlice fileSlice, Function<HoodieFileGroupId,Option<BootstrapBaseFileMapping>> bootstrapBaseFileMappingFunc)
protected HoodieBaseFile addBootstrapBaseFileIfPresent(HoodieFileGroupId fileGroupId, HoodieBaseFile baseFile)
protected HoodieBaseFile addBootstrapBaseFileIfPresent(HoodieFileGroupId fileGroupId, HoodieBaseFile baseFile, Function<HoodieFileGroupId,Option<BootstrapBaseFileMapping>> bootstrapBaseFileMappingFunc)
public final Stream<Pair<String,CompactionOperation>> getPendingCompactionOperations()
TableFileSystemViewgetPendingCompactionOperations in interface TableFileSystemViewpublic final List<StoragePath> getPartitionPaths()
public final Stream<Pair<String,CompactionOperation>> getPendingLogCompactionOperations()
TableFileSystemViewgetPendingLogCompactionOperations in interface TableFileSystemViewpublic final Stream<HoodieBaseFile> getLatestBaseFiles(String partitionStr)
TableFileSystemView.BaseFileOnlyViewWithLatestSlicegetLatestBaseFiles in interface TableFileSystemView.BaseFileOnlyViewWithLatestSlicepublic final Stream<HoodieBaseFile> getLatestBaseFiles()
TableFileSystemView.BaseFileOnlyViewWithLatestSlicegetLatestBaseFiles in interface TableFileSystemView.BaseFileOnlyViewWithLatestSlicepublic final Stream<HoodieBaseFile> getLatestBaseFilesBeforeOrOn(String partitionStr, String maxCommitTime)
TableFileSystemView.BaseFileOnlyViewWithLatestSlicegetLatestBaseFilesBeforeOrOn in interface TableFileSystemView.BaseFileOnlyViewWithLatestSlicepublic final Map<String,Stream<HoodieBaseFile>> getAllLatestBaseFilesBeforeOrOn(String maxCommitTime)
TableFileSystemView.BaseFileOnlyViewWithLatestSlicegetAllLatestBaseFilesBeforeOrOn in interface TableFileSystemView.BaseFileOnlyViewWithLatestSlicemaxCommitTime - The max commit time to consider.Map of partition path to the latest version base files before or on the
commit timepublic final Option<HoodieBaseFile> getBaseFileOn(String partitionStr, String instantTime, String fileId)
TableFileSystemView.BaseFileOnlyViewgetBaseFileOn in interface TableFileSystemView.BaseFileOnlyViewpublic final Option<HoodieBaseFile> getLatestBaseFile(String partitionStr, String fileId)
getLatestBaseFile in interface TableFileSystemView.BaseFileOnlyViewWithLatestSlicepublic final Stream<HoodieBaseFile> getLatestBaseFilesInRange(List<String> commitsToReturn)
TableFileSystemView.BaseFileOnlyViewWithLatestSlicegetLatestBaseFilesInRange in interface TableFileSystemView.BaseFileOnlyViewWithLatestSlicepublic void loadAllPartitions()
TableFileSystemViewloadAllPartitions in interface TableFileSystemViewpublic void loadPartitions(List<String> partitionPaths)
TableFileSystemViewloadPartitions in interface TableFileSystemViewpartitionPaths - List of partition paths to loadpublic final Stream<HoodieBaseFile> getAllBaseFiles(String partitionStr)
TableFileSystemView.BaseFileOnlyViewgetAllBaseFiles in interface TableFileSystemView.BaseFileOnlyViewpublic final Stream<FileSlice> getLatestFileSlices(String partitionStr)
TableFileSystemView.SliceViewWithLatestSlicegetLatestFileSlices in interface TableFileSystemView.SliceViewWithLatestSlicepublic Stream<FileSlice> getLatestFileSlicesIncludingInflight(String partitionPath)
TableFileSystemView.SliceViewWithLatestSlicegetLatestFileSlicesIncludingInflight in interface TableFileSystemView.SliceViewWithLatestSlicepartitionPath - The partition path of interestFileSlice in the partition path.public final Stream<FileSlice> getLatestFileSlicesStateless(String partitionStr)
TableFileSystemView.SliceViewWithLatestSliceThis is useful for some table services such as compaction and clustering, these services may search around the files to clean within some ancient data partitions, if there triggers a full table service for enormous number of partitions, the cache could cause a huge memory pressure to the timeline server which induces an OOM exception.
The caching of these file groups does not benefit to writers most often because the writers write to recent data partitions usually.
getLatestFileSlicesStateless in interface TableFileSystemView.SliceViewWithLatestSlicepublic final Option<FileSlice> getLatestFileSlice(String partitionStr, String fileId)
getLatestFileSlice in interface TableFileSystemView.SliceViewWithLatestSlicepublic final Stream<FileSlice> getLatestUnCompactedFileSlices(String partitionStr)
TableFileSystemView.SliceViewWithLatestSlicegetLatestUnCompactedFileSlices in interface TableFileSystemView.SliceViewWithLatestSlicepublic final Stream<FileSlice> getLatestFileSlicesBeforeOrOn(String partitionStr, String maxCommitTime, boolean includeFileSlicesInPendingCompaction)
TableFileSystemView.SliceViewWithLatestSlicegetLatestFileSlicesBeforeOrOn in interface TableFileSystemView.SliceViewWithLatestSlicepartitionStr - Partition pathmaxCommitTime - Max Instant TimeincludeFileSlicesInPendingCompaction - include file-slices that are in pending compactionpublic final Map<String,Stream<FileSlice>> getAllLatestFileSlicesBeforeOrOn(String maxCommitTime)
TableFileSystemView.SliceViewWithLatestSlicegetAllLatestFileSlicesBeforeOrOn in interface TableFileSystemView.SliceViewWithLatestSlicemaxCommitTime - Max Instant TimeMap of partition path to the latest file slices before maxCommitTime.public final Stream<FileSlice> getLatestMergedFileSlicesBeforeOrOn(String partitionStr, String maxInstantTime)
TableFileSystemView.SliceViewWithLatestSlicegetLatestMergedFileSlicesBeforeOrOn in interface TableFileSystemView.SliceViewWithLatestSlicepartitionStr - Partition PathmaxInstantTime - Max Instant Timepublic final Stream<FileSlice> getAllLogsMergedFileSliceBeforeOrOn(String partitionStr, String maxInstantTime)
In streaming read scenario, in order for better reading efficiency, the user can choose to skip the base files that are produced by compaction. That is to say, we allow the users to consumer only from these partitioned log files, these log files keep the record sequence just like the normal message queue.
NOTE: only local view is supported.
partitionStr - Partition PathmaxInstantTime - Max Instant Timepublic final Stream<FileSlice> getLatestFileSliceInRange(List<String> commitsToReturn)
TableFileSystemView.SliceViewWithLatestSlicegetLatestFileSliceInRange in interface TableFileSystemView.SliceViewWithLatestSlicepublic final Stream<FileSlice> getAllFileSlices(String partitionStr)
TableFileSystemView.SliceViewgetAllFileSlices in interface TableFileSystemView.SliceViewpublic final Stream<HoodieFileGroup> getAllFileGroups(String partitionStr)
TableFileSystemViewgetAllFileGroups in interface TableFileSystemViewpublic final Stream<HoodieFileGroup> getAllFileGroupsStateless(String partitionStr)
TableFileSystemViewThis is useful for some table services such as cleaning, the cleaning service may search around the files to clean within some ancient data partitions, if there triggers a full table cleaning for enormous number of partitions, the cache could cause a huge memory pressure to the timeline server which induces an OOM exception.
The caching of these file groups does not benefit to writers most often because the writers write to recent data partitions usually.
getAllFileGroupsStateless in interface TableFileSystemViewpublic Stream<HoodieFileGroup> getReplacedFileGroupsBeforeOrOn(String maxCommitTime, String partitionPath)
TableFileSystemViewgetReplacedFileGroupsBeforeOrOn in interface TableFileSystemViewpublic Stream<HoodieFileGroup> getReplacedFileGroupsBefore(String maxCommitTime, String partitionPath)
TableFileSystemViewgetReplacedFileGroupsBefore in interface TableFileSystemViewpublic Stream<HoodieFileGroup> getReplacedFileGroupsAfterOrOn(String minCommitTime, String partitionPath)
TableFileSystemViewgetReplacedFileGroupsAfterOrOn in interface TableFileSystemViewpublic Stream<HoodieFileGroup> getAllReplacedFileGroups(String partitionPath)
TableFileSystemViewgetAllReplacedFileGroups in interface TableFileSystemViewpublic final Stream<Pair<HoodieFileGroupId,HoodieInstant>> getFileGroupsInPendingClustering()
TableFileSystemViewgetFileGroupsInPendingClustering in interface TableFileSystemViewprotected abstract boolean isPendingCompactionScheduledForFileId(HoodieFileGroupId fgId)
fgId - File-Group Idprotected abstract boolean isPendingLogCompactionScheduledForFileId(HoodieFileGroupId fgId)
fgId - File-Group Idprotected abstract boolean isPendingClusteringScheduledForFileId(HoodieFileGroupId fgId)
fgId - File-Group Idprotected abstract Option<HoodieInstant> getPendingClusteringInstant(HoodieFileGroupId fileGroupId)
protected abstract Stream<Pair<HoodieFileGroupId,HoodieInstant>> fetchFileGroupsInPendingClustering()
protected abstract Option<Pair<String,CompactionOperation>> getPendingCompactionOperationWithInstant(HoodieFileGroupId fileGroupId)
fileGroupId - File-Group Idprotected abstract Option<Pair<String,CompactionOperation>> getPendingLogCompactionOperationWithInstant(HoodieFileGroupId fileGroupId)
fileGroupId - File-Group Idprotected abstract boolean isBootstrapBaseFilePresentForFileId(HoodieFileGroupId fgId)
fgId - File-Group Idprotected abstract Option<BootstrapBaseFileMapping> getBootstrapBaseFile(HoodieFileGroupId fileGroupId)
fileGroupId - File-Group Idprotected abstract void resetReplacedFileGroups(Map<HoodieFileGroupId,HoodieInstant> replacedFileGroups)
protected abstract void addReplacedFileGroups(Map<HoodieFileGroupId,HoodieInstant> replacedFileGroups)
protected abstract void removeReplacedFileIdsAtInstants(Set<String> instants)
protected abstract boolean hasReplacedFilesInPartition(String partitionPath)
protected abstract Option<HoodieInstant> getReplaceInstant(HoodieFileGroupId fileGroupId)
public Stream<HoodieBaseFile> fetchLatestBaseFiles(String partitionPath)
protected Option<HoodieBaseFile> getLatestBaseFile(HoodieFileGroup fileGroup)
protected Option<HoodieBaseFile> fetchLatestBaseFile(String partitionPath, String fileId)
partitionPath - Partition pathfileId - File Idpublic Option<FileSlice> fetchLatestFileSlice(String partitionPath, String fileId)
partitionPath - Partition pathfileId - File Idpublic Option<HoodieInstant> getLastInstant()
TableFileSystemViewgetLastInstant in interface TableFileSystemViewpublic HoodieTimeline getTimeline()
TableFileSystemViewgetTimeline in interface TableFileSystemViewpublic void sync()
NOTE: The logic MUST BE guarded by the write lock.
sync in interface SyncableFileSystemViewpublic HoodieTimeline getVisibleCommitsAndCompactionTimeline()
HoodieTimelineCopyright © 2024 The Apache Software Foundation. All rights reserved.