public class RocksDbBasedFileSystemView extends IncrementalTimelineSyncFileSystemView
TableFileSystemView.BaseFileOnlyView, TableFileSystemView.BaseFileOnlyViewWithLatestSlice, TableFileSystemView.SliceView, TableFileSystemView.SliceViewWithLatestSlicecompletionTimeQueryView, metaClient, readLock, writeLock| Constructor and Description |
|---|
RocksDbBasedFileSystemView(HoodieTableMetaClient metaClient,
HoodieTimeline visibleActiveTimeline,
FileSystemViewStorageConfig config) |
RocksDbBasedFileSystemView(HoodieTableMetaClient metaClient,
HoodieTimeline visibleActiveTimeline,
List<StoragePathInfo> pathInfoList,
FileSystemViewStorageConfig config) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPendingCompactionOperations(Stream<Pair<String,CompactionOperation>> operations)
Add pending compaction operations to store.
|
protected void |
addPendingLogCompactionOperations(Stream<Pair<String,CompactionOperation>> operations)
Add pending Log compaction operations to store.
|
protected void |
addReplacedFileGroups(Map<HoodieFileGroupId,HoodieInstant> replacedFileGroups)
Track instant time for new file groups replaced.
|
protected void |
applyDeltaFileSlicesToPartitionView(String partition,
List<HoodieFileGroup> deltaFileGroups,
org.apache.hudi.common.table.view.IncrementalTimelineSyncFileSystemView.DeltaApplyMode mode)
Apply changes to partition file-system view.
|
void |
close()
Allow View to release resources and close.
|
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.
|
Option<FileSlice> |
fetchLatestFileSlice(String partitionPath,
String fileId)
Default implementation for fetching file-slice.
|
Option<FileSlice> |
fetchLatestFileSliceBeforeOrOn(String partitionPath,
String fileId,
String instantTime) |
protected Option<BootstrapBaseFileMapping> |
getBootstrapBaseFile(HoodieFileGroupId fileGroupId)
Return pending compaction operation for a file-group.
|
protected Option<HoodieInstant> |
getPendingClusteringInstant(HoodieFileGroupId fgId)
Get pending clustering instant time for specified file group.
|
protected Option<Pair<String,CompactionOperation>> |
getPendingCompactionOperationWithInstant(HoodieFileGroupId fgId)
Return pending compaction operation for a file-group.
|
protected Option<Pair<String,CompactionOperation>> |
getPendingLogCompactionOperationWithInstant(HoodieFileGroupId fgId)
Return pending Log compaction operation for a file-group.
|
protected Option<HoodieInstant> |
getReplaceInstant(HoodieFileGroupId fileGroupId)
Track instant time for file groups replaced.
|
protected 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 |
isBootstrapBaseFilePresentForFileId(HoodieFileGroupId fgId)
Check if there is a bootstrap base file present for this file.
|
protected boolean |
isPartitionAvailableInStore(String partitionPath)
Checks if partition is pre-loaded and available in store.
|
protected boolean |
isPendingClusteringScheduledForFileId(HoodieFileGroupId fgId)
Check if there is an outstanding clustering operation (requested/inflight) scheduled for this file.
|
protected boolean |
isPendingCompactionScheduledForFileId(HoodieFileGroupId fgId)
Check if there is an outstanding compaction scheduled for this file.
|
protected boolean |
isPendingLogCompactionScheduledForFileId(HoodieFileGroupId fgId)
Check if there is an outstanding log compaction scheduled for this file.
|
protected void |
removeReplacedFileIdsAtInstants(Set<String> instants)
Remove file groups that are replaced in any of the specified instants.
|
protected void |
resetPendingCompactionOperations(Stream<Pair<String,CompactionOperation>> operations)
resets the pending compaction operation and overwrite with the new list.
|
protected void |
resetPendingLogCompactionOperations(Stream<Pair<String,CompactionOperation>> operations)
resets the pending Log compaction operation and overwrite with the new list.
|
protected void |
resetReplacedFileGroups(Map<HoodieFileGroupId,HoodieInstant> replacedFileGroups)
Track instant time for file groups replaced.
|
protected void |
resetViewState()
Allows all view metadata in file system view storage to be reset by subclasses.
|
protected void |
storePartitionView(String partitionPath,
List<HoodieFileGroup> fileGroups)
Add a complete partition view to store.
|
getTimeline, maySyncIncrementally, refreshTimeline, syncaddBootstrapBaseFileIfPresent, addBootstrapBaseFileIfPresent, addBootstrapBaseFileIfPresent, addBootstrapBaseFileIfPresent, addBootstrapBaseFileIfPresent, addBootstrapBaseFileIfPresent, addFilesToView, addFilesToView, buildFileGroups, buildFileGroups, clear, ensurePartitionLoadedCorrectly, fetchLatestBaseFiles, getAllBaseFiles, getAllFileGroups, getAllFileGroupsStateless, getAllFileSlices, getAllLatestBaseFilesBeforeOrOn, getAllLatestFileSlicesBeforeOrOn, getAllLogsMergedFileSliceBeforeOrOn, getAllPartitionPaths, getAllReplacedFileGroups, getBaseFileOn, getCompletionTime, getFileGroupsInPendingClustering, getLastInstant, getLatestBaseFile, getLatestBaseFile, getLatestBaseFiles, getLatestBaseFiles, getLatestBaseFilesBeforeOrOn, getLatestBaseFilesInRange, getLatestFileSlice, getLatestFileSliceInRange, getLatestFileSlices, getLatestFileSlicesBeforeOrOn, getLatestFileSlicesIncludingInflight, getLatestFileSlicesStateless, getLatestMergedFileSlicesBeforeOrOn, getLatestUnCompactedFileSlices, getPartitionNames, getPartitionPaths, getPendingCompactionOperations, getPendingLogCompactionOperations, getReplacedFileGroupsAfterOrOn, getReplacedFileGroupsBefore, getReplacedFileGroupsBeforeOrOn, getVisibleCommitsAndCompactionTimeline, isBaseFileDueToPendingClustering, isBaseFileDueToPendingCompaction, listPartition, listPartitions, loadAllPartitions, loadPartitions, refreshCompletionTimeQueryView, resetpublic RocksDbBasedFileSystemView(HoodieTableMetaClient metaClient, HoodieTimeline visibleActiveTimeline, FileSystemViewStorageConfig config)
public RocksDbBasedFileSystemView(HoodieTableMetaClient metaClient, HoodieTimeline visibleActiveTimeline, List<StoragePathInfo> pathInfoList, FileSystemViewStorageConfig config)
protected void init(HoodieTableMetaClient metaClient, HoodieTimeline visibleActiveTimeline)
AbstractTableFileSystemViewinit in class AbstractTableFileSystemViewprotected boolean isPendingCompactionScheduledForFileId(HoodieFileGroupId fgId)
AbstractTableFileSystemViewisPendingCompactionScheduledForFileId in class AbstractTableFileSystemViewfgId - File-Group Idprotected void resetPendingCompactionOperations(Stream<Pair<String,CompactionOperation>> operations)
AbstractTableFileSystemViewoperations - Pending Compaction Operationsprotected void addPendingCompactionOperations(Stream<Pair<String,CompactionOperation>> operations)
AbstractTableFileSystemViewoperations - Pending compaction operations to be addedprotected boolean isPendingLogCompactionScheduledForFileId(HoodieFileGroupId fgId)
AbstractTableFileSystemViewisPendingLogCompactionScheduledForFileId in class AbstractTableFileSystemViewfgId - File-Group Idprotected void resetPendingLogCompactionOperations(Stream<Pair<String,CompactionOperation>> operations)
AbstractTableFileSystemViewoperations - Pending Log Compaction Operationsprotected void addPendingLogCompactionOperations(Stream<Pair<String,CompactionOperation>> operations)
AbstractTableFileSystemViewoperations - Pending Log compaction operations to be addedprotected boolean isPendingClusteringScheduledForFileId(HoodieFileGroupId fgId)
AbstractTableFileSystemViewisPendingClusteringScheduledForFileId in class AbstractTableFileSystemViewfgId - File-Group Idprotected Option<HoodieInstant> getPendingClusteringInstant(HoodieFileGroupId fgId)
AbstractTableFileSystemViewgetPendingClusteringInstant in class AbstractTableFileSystemViewpublic Stream<Pair<HoodieFileGroupId,HoodieInstant>> fetchFileGroupsInPendingClustering()
AbstractTableFileSystemViewfetchFileGroupsInPendingClustering in class AbstractTableFileSystemViewprotected void resetViewState()
AbstractTableFileSystemViewresetViewState in class AbstractTableFileSystemViewprotected Option<Pair<String,CompactionOperation>> getPendingCompactionOperationWithInstant(HoodieFileGroupId fgId)
AbstractTableFileSystemViewgetPendingCompactionOperationWithInstant in class AbstractTableFileSystemViewfgId - File-Group Idprotected Option<Pair<String,CompactionOperation>> getPendingLogCompactionOperationWithInstant(HoodieFileGroupId fgId)
AbstractTableFileSystemViewgetPendingLogCompactionOperationWithInstant in class AbstractTableFileSystemViewfgId - File-Group Idprotected boolean isPartitionAvailableInStore(String partitionPath)
AbstractTableFileSystemViewpartitionPath - Partition Pathprotected void storePartitionView(String partitionPath, List<HoodieFileGroup> fileGroups)
AbstractTableFileSystemViewpartitionPath - Partition PathfileGroups - File Groups for the partition pathprotected void applyDeltaFileSlicesToPartitionView(String partition, List<HoodieFileGroup> deltaFileGroups, org.apache.hudi.common.table.view.IncrementalTimelineSyncFileSystemView.DeltaApplyMode mode)
IncrementalTimelineSyncFileSystemViewapplyDeltaFileSlicesToPartitionView in class IncrementalTimelineSyncFileSystemViewpartition - PartitionPathdeltaFileGroups - Changed file-slices aggregated as file-groupsmode - Delta Apply modeprotected boolean isBootstrapBaseFilePresentForFileId(HoodieFileGroupId fgId)
AbstractTableFileSystemViewisBootstrapBaseFilePresentForFileId in class AbstractTableFileSystemViewfgId - File-Group Idprotected Option<BootstrapBaseFileMapping> getBootstrapBaseFile(HoodieFileGroupId fileGroupId)
AbstractTableFileSystemViewgetBootstrapBaseFile in class AbstractTableFileSystemViewfileGroupId - File-Group Idpublic Option<FileSlice> fetchLatestFileSlice(String partitionPath, String fileId)
AbstractTableFileSystemViewfetchLatestFileSlice in class AbstractTableFileSystemViewpartitionPath - Partition pathfileId - File Idpublic Option<FileSlice> fetchLatestFileSliceBeforeOrOn(String partitionPath, String fileId, String instantTime)
protected Option<HoodieBaseFile> fetchLatestBaseFile(String partitionPath, String fileId)
AbstractTableFileSystemViewfetchLatestBaseFile in class AbstractTableFileSystemViewpartitionPath - Partition pathfileId - File Idprotected void resetReplacedFileGroups(Map<HoodieFileGroupId,HoodieInstant> replacedFileGroups)
AbstractTableFileSystemViewresetReplacedFileGroups in class AbstractTableFileSystemViewprotected void addReplacedFileGroups(Map<HoodieFileGroupId,HoodieInstant> replacedFileGroups)
AbstractTableFileSystemViewaddReplacedFileGroups in class AbstractTableFileSystemViewprotected void removeReplacedFileIdsAtInstants(Set<String> instants)
AbstractTableFileSystemViewremoveReplacedFileIdsAtInstants in class AbstractTableFileSystemViewprotected boolean hasReplacedFilesInPartition(String partitionPath)
AbstractTableFileSystemViewhasReplacedFilesInPartition in class AbstractTableFileSystemViewprotected Option<HoodieInstant> getReplaceInstant(HoodieFileGroupId fileGroupId)
AbstractTableFileSystemViewgetReplaceInstant in class AbstractTableFileSystemViewpublic void close()
SyncableFileSystemViewclose in interface AutoCloseableclose in interface SyncableFileSystemViewclose in class AbstractTableFileSystemViewCopyright © 2024 The Apache Software Foundation. All rights reserved.