public class PriorityBasedFileSystemView extends Object implements SyncableFileSystemView, Serializable
TableFileSystemView.BaseFileOnlyView, TableFileSystemView.BaseFileOnlyViewWithLatestSlice, TableFileSystemView.SliceView, TableFileSystemView.SliceViewWithLatestSlice| Constructor and Description |
|---|
PriorityBasedFileSystemView(SyncableFileSystemView preferredView,
SyncableFileSystemView secondaryView) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Allow View to release resources and close.
|
Stream<HoodieBaseFile> |
getAllBaseFiles(String partitionPath)
Stream all the data file versions grouped by FileId for a given partition.
|
Stream<HoodieFileGroup> |
getAllFileGroups(String partitionPath)
Stream all the file groups for a given partition.
|
Stream<FileSlice> |
getAllFileSlices(String partitionPath)
Stream all the file slices for a given partition, latest or not.
|
Stream<HoodieFileGroup> |
getAllReplacedFileGroups(String partitionPath)
Stream all the replaced file groups for given partition.
|
Option<HoodieBaseFile> |
getBaseFileOn(String partitionPath,
String instantTime,
String fileId)
Get the version of data file matching the instant time in the given partition.
|
Stream<Pair<HoodieFileGroupId,HoodieInstant>> |
getFileGroupsInPendingClustering()
Filegroups that are in pending clustering.
|
Option<HoodieInstant> |
getLastInstant()
Last Known Instant on which the view is built.
|
Option<HoodieBaseFile> |
getLatestBaseFile(String partitionPath,
String fileId)
Get Latest data 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 partitionPath)
Stream all the latest data files in the given partition.
|
Stream<HoodieBaseFile> |
getLatestBaseFilesBeforeOrOn(String partitionPath,
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 partitionPath,
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 partitionPath)
Stream all the latest file slices in the given partition.
|
Stream<FileSlice> |
getLatestFileSlicesBeforeOrOn(String partitionPath,
String maxCommitTime,
boolean includeFileSlicesInPendingCompaction)
Stream all latest file slices in given partition with precondition that commitTime(file) before maxCommitTime.
|
Stream<FileSlice> |
getLatestMergedFileSlicesBeforeOrOn(String partitionPath,
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 partitionPath)
Stream all the latest uncompacted file slices in the given partition.
|
Stream<Pair<String,CompactionOperation>> |
getPendingCompactionOperations()
Return Pending Compaction Operations.
|
SyncableFileSystemView |
getPreferredView() |
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.
|
SyncableFileSystemView |
getSecondaryView() |
HoodieTimeline |
getTimeline()
Timeline corresponding to the view.
|
void |
reset()
Reset View so that they can be refreshed.
|
void |
sync()
Read the latest timeline and refresh the file-system view to match the current state of the file-system.
|
public PriorityBasedFileSystemView(SyncableFileSystemView preferredView, SyncableFileSystemView secondaryView)
public Stream<HoodieBaseFile> getLatestBaseFiles(String partitionPath)
TableFileSystemView.BaseFileOnlyViewWithLatestSlicegetLatestBaseFiles in interface TableFileSystemView.BaseFileOnlyViewWithLatestSlicepublic Stream<HoodieBaseFile> getLatestBaseFiles()
TableFileSystemView.BaseFileOnlyViewWithLatestSlicegetLatestBaseFiles in interface TableFileSystemView.BaseFileOnlyViewWithLatestSlicepublic Stream<HoodieBaseFile> getLatestBaseFilesBeforeOrOn(String partitionPath, String maxCommitTime)
TableFileSystemView.BaseFileOnlyViewWithLatestSlicegetLatestBaseFilesBeforeOrOn in interface TableFileSystemView.BaseFileOnlyViewWithLatestSlicepublic Option<HoodieBaseFile> getLatestBaseFile(String partitionPath, String fileId)
TableFileSystemView.BaseFileOnlyViewWithLatestSlicegetLatestBaseFile in interface TableFileSystemView.BaseFileOnlyViewWithLatestSlicepublic Option<HoodieBaseFile> getBaseFileOn(String partitionPath, String instantTime, String fileId)
TableFileSystemView.BaseFileOnlyViewgetBaseFileOn in interface TableFileSystemView.BaseFileOnlyViewpublic Stream<HoodieBaseFile> getLatestBaseFilesInRange(List<String> commitsToReturn)
TableFileSystemView.BaseFileOnlyViewWithLatestSlicegetLatestBaseFilesInRange in interface TableFileSystemView.BaseFileOnlyViewWithLatestSlicepublic Stream<HoodieBaseFile> getAllBaseFiles(String partitionPath)
TableFileSystemView.BaseFileOnlyViewgetAllBaseFiles in interface TableFileSystemView.BaseFileOnlyViewpublic Stream<FileSlice> getLatestFileSlices(String partitionPath)
TableFileSystemView.SliceViewWithLatestSlicegetLatestFileSlices in interface TableFileSystemView.SliceViewWithLatestSlicepublic Stream<FileSlice> getLatestUnCompactedFileSlices(String partitionPath)
TableFileSystemView.SliceViewWithLatestSlicegetLatestUnCompactedFileSlices in interface TableFileSystemView.SliceViewWithLatestSlicepublic Stream<FileSlice> getLatestFileSlicesBeforeOrOn(String partitionPath, String maxCommitTime, boolean includeFileSlicesInPendingCompaction)
TableFileSystemView.SliceViewWithLatestSlicegetLatestFileSlicesBeforeOrOn in interface TableFileSystemView.SliceViewWithLatestSlicepartitionPath - Partition pathmaxCommitTime - Max Instant TimeincludeFileSlicesInPendingCompaction - include file-slices that are in pending compactionpublic Stream<FileSlice> getLatestMergedFileSlicesBeforeOrOn(String partitionPath, String maxInstantTime)
TableFileSystemView.SliceViewWithLatestSlicegetLatestMergedFileSlicesBeforeOrOn in interface TableFileSystemView.SliceViewWithLatestSlicepartitionPath - Partition PathmaxInstantTime - Max Instant Timepublic Stream<FileSlice> getLatestFileSliceInRange(List<String> commitsToReturn)
TableFileSystemView.SliceViewWithLatestSlicegetLatestFileSliceInRange in interface TableFileSystemView.SliceViewWithLatestSlicepublic Stream<FileSlice> getAllFileSlices(String partitionPath)
TableFileSystemView.SliceViewgetAllFileSlices in interface TableFileSystemView.SliceViewpublic Stream<HoodieFileGroup> getAllFileGroups(String partitionPath)
TableFileSystemViewgetAllFileGroups 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> getAllReplacedFileGroups(String partitionPath)
TableFileSystemViewgetAllReplacedFileGroups in interface TableFileSystemViewpublic Stream<Pair<String,CompactionOperation>> getPendingCompactionOperations()
TableFileSystemViewgetPendingCompactionOperations in interface TableFileSystemViewpublic Stream<Pair<HoodieFileGroupId,HoodieInstant>> getFileGroupsInPendingClustering()
TableFileSystemViewgetFileGroupsInPendingClustering in interface TableFileSystemViewpublic void close()
SyncableFileSystemViewclose in interface SyncableFileSystemViewpublic void reset()
SyncableFileSystemViewreset in interface SyncableFileSystemViewpublic Option<HoodieInstant> getLastInstant()
TableFileSystemViewgetLastInstant in interface TableFileSystemViewpublic HoodieTimeline getTimeline()
TableFileSystemViewgetTimeline in interface TableFileSystemViewpublic void sync()
SyncableFileSystemViewsync in interface SyncableFileSystemViewpublic Option<FileSlice> getLatestFileSlice(String partitionPath, String fileId)
TableFileSystemView.SliceViewWithLatestSlicegetLatestFileSlice in interface TableFileSystemView.SliceViewWithLatestSlicepublic SyncableFileSystemView getPreferredView()
public SyncableFileSystemView getSecondaryView()
Copyright © 2022 The Apache Software Foundation. All rights reserved.