public interface HoodieTimeline extends Serializable
Timelines are immutable once created and operations create new instance of timelines which filter on the instants and this can be chained.
HoodieTableMetaClient,
HoodieDefaultTimeline,
HoodieInstant| Modifier and Type | Method and Description |
|---|---|
static boolean |
compareTimestamps(String commit1,
BiPredicate<String,String> predicateToApply,
String commit2) |
boolean |
containsInstant(HoodieInstant instant) |
boolean |
containsInstant(String ts) |
boolean |
containsOrBeforeTimelineStarts(String ts) |
int |
countInstants() |
boolean |
empty()
If the timeline has any instants.
|
HoodieTimeline |
filter(Predicate<HoodieInstant> filter)
Custom Filter of Instants.
|
HoodieTimeline |
filterCompletedAndCompactionInstants()
Filter this timeline to just include the completed + compaction (inflight + requested) instants A RT filesystem
view is constructed with this timeline so that file-slice after pending compaction-requested instant-time is also
considered valid.
|
HoodieTimeline |
filterCompletedInstants()
Filter this timeline to just include the completed instants.
|
HoodieTimeline |
filterInflights()
Filter this timeline to just include the in-flights.
|
HoodieTimeline |
filterInflightsAndRequested()
Filter this timeline to include requested and in-flights.
|
HoodieTimeline |
filterPendingCompactionTimeline()
Filter this timeline to just include requested and inflight compaction instants.
|
HoodieTimeline |
filterPendingExcludingCompaction()
Filter this timeline to just include the in-flights excluding compaction instants.
|
HoodieTimeline |
filterPendingReplaceTimeline()
Filter this timeline to just include requested and inflight replacecommit instants.
|
HoodieTimeline |
findInstantsAfter(String instantTime)
Create a new Timeline with all the instants after startTs.
|
HoodieTimeline |
findInstantsAfter(String instantTime,
int numCommits)
Create a new Timeline with all the instants after startTs.
|
HoodieTimeline |
findInstantsAfterOrEquals(String commitTime,
int numCommits)
Create a new Timeline with all the instants after startTs.
|
HoodieTimeline |
findInstantsBefore(String instantTime)
Create a new Timeline with all instants before specified time.
|
HoodieTimeline |
findInstantsBeforeOrEquals(String instantTime)
Create new timeline with all instants before or equals specified time.
|
HoodieTimeline |
findInstantsInRange(String startTs,
String endTs)
Create a new Timeline with instants after startTs and before or on endTs.
|
Option<HoodieInstant> |
firstInstant() |
static HoodieInstant |
getCleanInflightInstant(String timestamp) |
static HoodieInstant |
getCleanRequestedInstant(String timestamp) |
static String |
getCommitFromCommitFile(String commitFileName) |
static HoodieInstant |
getCompactionInflightInstant(String timestamp) |
static HoodieInstant |
getCompactionRequestedInstant(String timestamp) |
static HoodieInstant |
getCompletedInstant(HoodieInstant instant) |
HoodieTimeline |
getCompletedReplaceTimeline()
Timeline to just include replace instants that have valid (commit/deltacommit) actions.
|
static HoodieInstant |
getInflightInstant(HoodieInstant instant,
HoodieTableType tableType)
Returns the inflight instant corresponding to the instant being passed.
|
Option<byte[]> |
getInstantDetails(HoodieInstant instant)
Read the completed instant details.
|
Stream<HoodieInstant> |
getInstants() |
static HoodieInstant |
getReplaceCommitInflightInstant(String timestamp) |
static HoodieInstant |
getReplaceCommitRequestedInstant(String timestamp) |
static HoodieInstant |
getRequestedInstant(HoodieInstant instant) |
Stream<HoodieInstant> |
getReverseOrderedInstants() |
String |
getTimelineHash()
Get hash of timeline.
|
HoodieTimeline |
getWriteTimeline()
Timeline to just include commits (commit/deltacommit), compaction and replace actions.
|
boolean |
isBeforeTimelineStarts(String ts) |
static boolean |
isInRange(String timestamp,
String startTs,
String endTs)
Return true if specified timestamp is in range (startTs, endTs].
|
Option<HoodieInstant> |
lastInstant() |
static String |
makeCleanerFileName(String instant) |
static String |
makeCommitFileName(String instantTime) |
static String |
makeDeltaFileName(String instantTime) |
static String |
makeFileNameAsComplete(String fileName) |
static String |
makeFileNameAsInflight(String fileName) |
static String |
makeInflightCleanerFileName(String instant) |
static String |
makeInflightCommitFileName(String instantTime) |
static String |
makeInflightCompactionFileName(String instantTime) |
static String |
makeInflightDeltaFileName(String instantTime) |
static String |
makeInflightReplaceFileName(String instant) |
static String |
makeInflightRestoreFileName(String instant) |
static String |
makeInflightRollbackFileName(String instant) |
static String |
makeInflightSavePointFileName(String instantTime) |
static String |
makeReplaceFileName(String instant) |
static String |
makeRequestedCleanerFileName(String instant) |
static String |
makeRequestedCommitFileName(String instantTime) |
static String |
makeRequestedCompactionFileName(String instantTime) |
static String |
makeRequestedDeltaFileName(String instantTime) |
static String |
makeRequestedReplaceFileName(String instant) |
static String |
makeRestoreFileName(String instant) |
static String |
makeRollbackFileName(String instant) |
static String |
makeSavePointFileName(String instantTime) |
Option<HoodieInstant> |
nthFromLastInstant(int n) |
Option<HoodieInstant> |
nthInstant(int n) |
static final String COMMIT_ACTION
static final String DELTA_COMMIT_ACTION
static final String CLEAN_ACTION
static final String ROLLBACK_ACTION
static final String SAVEPOINT_ACTION
static final String REPLACE_COMMIT_ACTION
static final String INFLIGHT_EXTENSION
static final String COMPACTION_ACTION
static final String REQUESTED_EXTENSION
static final String RESTORE_ACTION
static final String[] VALID_ACTIONS_IN_TIMELINE
static final String COMMIT_EXTENSION
static final String DELTA_COMMIT_EXTENSION
static final String CLEAN_EXTENSION
static final String ROLLBACK_EXTENSION
static final String SAVEPOINT_EXTENSION
static final String INFLIGHT_COMMIT_EXTENSION
static final String REQUESTED_COMMIT_EXTENSION
static final String REQUESTED_DELTA_COMMIT_EXTENSION
static final String INFLIGHT_DELTA_COMMIT_EXTENSION
static final String INFLIGHT_CLEAN_EXTENSION
static final String REQUESTED_CLEAN_EXTENSION
static final String INFLIGHT_ROLLBACK_EXTENSION
static final String INFLIGHT_SAVEPOINT_EXTENSION
static final String REQUESTED_COMPACTION_SUFFIX
static final String REQUESTED_COMPACTION_EXTENSION
static final String INFLIGHT_COMPACTION_EXTENSION
static final String INFLIGHT_RESTORE_EXTENSION
static final String RESTORE_EXTENSION
static final String INFLIGHT_REPLACE_COMMIT_EXTENSION
static final String REQUESTED_REPLACE_COMMIT_EXTENSION
static final String REPLACE_COMMIT_EXTENSION
static final String INVALID_INSTANT_TS
static final String INIT_INSTANT_TS
static final String METADATA_BOOTSTRAP_INSTANT_TS
static final String FULL_BOOTSTRAP_INSTANT_TS
static final BiPredicate<String,String> EQUALS
static final BiPredicate<String,String> GREATER_THAN_OR_EQUALS
static final BiPredicate<String,String> GREATER_THAN
static final BiPredicate<String,String> LESSER_THAN_OR_EQUALS
static final BiPredicate<String,String> LESSER_THAN
HoodieTimeline filterInflights()
HoodieTimeline filterInflightsAndRequested()
HoodieTimeline filterPendingExcludingCompaction()
HoodieTimeline filterCompletedInstants()
HoodieTimeline filterCompletedAndCompactionInstants()
HoodieTimeline getWriteTimeline()
HoodieTimeline getCompletedReplaceTimeline()
HoodieTimeline filterPendingCompactionTimeline()
HoodieTimeline filterPendingReplaceTimeline()
HoodieTimeline findInstantsAfterOrEquals(String commitTime, int numCommits)
HoodieTimeline findInstantsInRange(String startTs, String endTs)
HoodieTimeline findInstantsAfter(String instantTime, int numCommits)
HoodieTimeline findInstantsAfter(String instantTime)
HoodieTimeline findInstantsBefore(String instantTime)
HoodieTimeline findInstantsBeforeOrEquals(String instantTime)
HoodieTimeline filter(Predicate<HoodieInstant> filter)
boolean empty()
int countInstants()
Option<HoodieInstant> firstInstant()
Option<HoodieInstant> nthInstant(int n)
Option<HoodieInstant> lastInstant()
String getTimelineHash()
Option<HoodieInstant> nthFromLastInstant(int n)
boolean containsInstant(HoodieInstant instant)
boolean containsInstant(String ts)
boolean containsOrBeforeTimelineStarts(String ts)
Stream<HoodieInstant> getInstants()
Stream<HoodieInstant> getReverseOrderedInstants()
boolean isBeforeTimelineStarts(String ts)
Option<byte[]> getInstantDetails(HoodieInstant instant)
static boolean compareTimestamps(String commit1, BiPredicate<String,String> predicateToApply, String commit2)
static boolean isInRange(String timestamp, String startTs, String endTs)
static HoodieInstant getCompletedInstant(HoodieInstant instant)
static HoodieInstant getRequestedInstant(HoodieInstant instant)
static HoodieInstant getCleanRequestedInstant(String timestamp)
static HoodieInstant getCleanInflightInstant(String timestamp)
static HoodieInstant getCompactionRequestedInstant(String timestamp)
static HoodieInstant getCompactionInflightInstant(String timestamp)
static HoodieInstant getReplaceCommitRequestedInstant(String timestamp)
static HoodieInstant getReplaceCommitInflightInstant(String timestamp)
static HoodieInstant getInflightInstant(HoodieInstant instant, HoodieTableType tableType)
instant - Hoodie InstanttableType - Hoodie Table TypeCopyright © 2021 The Apache Software Foundation. All rights reserved.