public class HoodieDefaultTimeline extends Object implements HoodieTimeline
HoodieTimeline,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected Function<HoodieInstant,Option<byte[]>> |
details |
CLEAN_ACTION, CLEAN_EXTENSION, COMMIT_ACTION, COMMIT_EXTENSION, COMPACTION_ACTION, DELTA_COMMIT_ACTION, DELTA_COMMIT_EXTENSION, EQUALS, FULL_BOOTSTRAP_INSTANT_TS, GREATER_THAN, GREATER_THAN_OR_EQUALS, INDEX_COMMIT_EXTENSION, INDEXING_ACTION, INFLIGHT_CLEAN_EXTENSION, INFLIGHT_COMMIT_EXTENSION, INFLIGHT_COMPACTION_EXTENSION, INFLIGHT_DELTA_COMMIT_EXTENSION, INFLIGHT_EXTENSION, INFLIGHT_INDEX_COMMIT_EXTENSION, INFLIGHT_REPLACE_COMMIT_EXTENSION, INFLIGHT_RESTORE_EXTENSION, INFLIGHT_ROLLBACK_EXTENSION, INFLIGHT_SAVE_SCHEMA_ACTION_EXTENSION, INFLIGHT_SAVEPOINT_EXTENSION, INIT_INSTANT_TS, INVALID_INSTANT_TS, LESSER_THAN, LESSER_THAN_OR_EQUALS, METADATA_BOOTSTRAP_INSTANT_TS, REPLACE_COMMIT_ACTION, REPLACE_COMMIT_EXTENSION, REQUESTED_CLEAN_EXTENSION, REQUESTED_COMMIT_EXTENSION, REQUESTED_COMPACTION_EXTENSION, REQUESTED_COMPACTION_SUFFIX, REQUESTED_DELTA_COMMIT_EXTENSION, REQUESTED_EXTENSION, REQUESTED_INDEX_COMMIT_EXTENSION, REQUESTED_REPLACE_COMMIT_EXTENSION, REQUESTED_RESTORE_EXTENSION, REQUESTED_ROLLBACK_EXTENSION, REQUESTED_SAVE_SCHEMA_ACTION_EXTENSION, RESTORE_ACTION, RESTORE_EXTENSION, ROLLBACK_ACTION, ROLLBACK_EXTENSION, SAVE_SCHEMA_ACTION_EXTENSION, SAVEPOINT_ACTION, SAVEPOINT_EXTENSION, SCHEMA_COMMIT_ACTION, VALID_ACTIONS_IN_TIMELINE| Constructor and Description |
|---|
HoodieDefaultTimeline()
Deprecated.
|
HoodieDefaultTimeline(Stream<HoodieInstant> instants,
Function<HoodieInstant,Option<byte[]>> details) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsInstant(HoodieInstant instant) |
boolean |
containsInstant(String ts) |
boolean |
containsOrBeforeTimelineStarts(String instant) |
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 |
filterCompletedIndexTimeline()
Filter this timeline to just include completed index instants.
|
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.
|
protected Stream<HoodieInstant> |
filterInstantsByAction(String action) |
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 |
filterPendingIndexTimeline()
Filter this timeline to just include requested and inflight index instants.
|
HoodieTimeline |
filterPendingReplaceTimeline()
Filter this timeline to just include requested and inflight replacecommit instants.
|
HoodieTimeline |
filterPendingRollbackTimeline()
Filter this timeline to include pending rollbacks.
|
HoodieTimeline |
findInstantsAfter(String instantTime)
Create a new Timeline with all the instants after startTs.
|
HoodieDefaultTimeline |
findInstantsAfter(String instantTime,
int numCommits)
Create a new Timeline with all the instants after startTs.
|
HoodieDefaultTimeline |
findInstantsAfterOrEquals(String commitTime,
int numCommits)
Create a new Timeline with all the instants after startTs.
|
HoodieDefaultTimeline |
findInstantsBefore(String instantTime)
Create a new Timeline with all instants before specified time.
|
HoodieDefaultTimeline |
findInstantsBeforeOrEquals(String instantTime)
Create new timeline with all instants before or equals specified time.
|
HoodieDefaultTimeline |
findInstantsInRange(String startTs,
String endTs)
Create a new Timeline with instants after startTs and before or on endTs.
|
Option<HoodieInstant> |
firstInstant() |
Option<HoodieInstant> |
firstInstant(String action,
HoodieInstant.State state) |
HoodieTimeline |
getAllCommitsTimeline()
Get all instants (commits, delta commits, compaction, clean, savepoint, rollback, replace commits, index) that result in actions,
in the active timeline.
|
HoodieTimeline |
getCleanerTimeline()
Get only the cleaner action (inflight and completed) in the active timeline.
|
HoodieTimeline |
getCommitsTimeline()
Get all instants (commits, delta commits) that produce new data, in the active timeline.
|
HoodieTimeline |
getCommitTimeline()
Get only pure commits (inflight and completed) in the active timeline.
|
HoodieTimeline |
getCompletedReplaceTimeline()
Timeline to just include replace instants that have valid (commit/deltacommit) actions.
|
HoodieTimeline |
getContiguousCompletedWriteTimeline()
Timeline to just include commits (commit/deltacommit), compaction and replace actions that are completed and contiguous.
|
HoodieTimeline |
getDeltaCommitTimeline()
Get only the delta commits (inflight and completed) in the active timeline.
|
Option<HoodieInstant> |
getFirstNonSavepointCommit()
First non-savepoint commit in the active data timeline.
|
Option<byte[]> |
getInstantDetails(HoodieInstant instant)
Read the completed instant details.
|
Stream<HoodieInstant> |
getInstants() |
HoodieTimeline |
getRestoreTimeline()
Get only the restore action (inflight and completed) in the active timeline.
|
Stream<HoodieInstant> |
getReverseOrderedInstants() |
HoodieTimeline |
getRollbackAndRestoreTimeline()
Get only the rollback and restore action (inflight and completed) in the active timeline.
|
HoodieTimeline |
getRollbackTimeline()
Get only the rollback action (inflight and completed) in the active timeline.
|
HoodieTimeline |
getSavePointTimeline()
Get only the save point action (inflight and completed) in the active timeline.
|
String |
getTimelineHash()
Get hash of timeline.
|
HoodieTimeline |
getTimelineOfActions(Set<String> actions)
Get a timeline of a specific set of actions.
|
HoodieDefaultTimeline |
getWriteTimeline()
Timeline to just include commits (commit/deltacommit), compaction and replace actions.
|
boolean |
isBeforeTimelineStarts(String instant) |
boolean |
isEmpty(HoodieInstant instant) |
Option<HoodieInstant> |
lastInstant() |
HoodieDefaultTimeline |
mergeTimeline(HoodieDefaultTimeline timeline)
Merge this timeline with the given timeline.
|
Option<HoodieInstant> |
nthFromLastInstant(int n) |
Option<HoodieInstant> |
nthInstant(int n) |
void |
setInstants(List<HoodieInstant> instants) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcompareTimestamps, getCleanInflightInstant, getCleanRequestedInstant, getCommitFromCommitFile, getCompactionInflightInstant, getCompactionRequestedInstant, getCompletedInstant, getIndexInflightInstant, getIndexRequestedInstant, getInflightInstant, getReplaceCommitInflightInstant, getReplaceCommitRequestedInstant, getRequestedInstant, getRollbackRequestedInstant, isInRange, makeCleanerFileName, makeCommitFileName, makeDeltaFileName, makeFileNameAsComplete, makeFileNameAsInflight, makeIndexCommitFileName, makeInflightCleanerFileName, makeInflightCommitFileName, makeInflightCompactionFileName, makeInflightDeltaFileName, makeInflightIndexFileName, makeInflightReplaceFileName, makeInflightRestoreFileName, makeInflightRollbackFileName, makeInflightSavePointFileName, makeInflightSchemaFileName, makeReplaceFileName, makeRequestedCleanerFileName, makeRequestedCommitFileName, makeRequestedCompactionFileName, makeRequestedDeltaFileName, makeRequestedIndexFileName, makeRequestedReplaceFileName, makeRequestedRestoreFileName, makeRequestedRollbackFileName, makeRequestSchemaFileName, makeRestoreFileName, makeRollbackFileName, makeSavePointFileName, makeSchemaFileNameprotected transient Function<HoodieInstant,Option<byte[]>> details
public HoodieDefaultTimeline(Stream<HoodieInstant> instants, Function<HoodieInstant,Option<byte[]>> details)
public HoodieDefaultTimeline()
public void setInstants(List<HoodieInstant> instants)
public HoodieTimeline filterInflights()
HoodieTimelinefilterInflights in interface HoodieTimelinepublic HoodieTimeline filterInflightsAndRequested()
HoodieTimelinefilterInflightsAndRequested in interface HoodieTimelinepublic HoodieTimeline filterPendingExcludingCompaction()
HoodieTimelinefilterPendingExcludingCompaction in interface HoodieTimelinepublic HoodieTimeline filterCompletedInstants()
HoodieTimelinefilterCompletedInstants in interface HoodieTimelinepublic HoodieTimeline filterCompletedAndCompactionInstants()
HoodieTimelinefilterCompletedAndCompactionInstants in interface HoodieTimelinepublic HoodieDefaultTimeline getWriteTimeline()
HoodieTimelinegetWriteTimeline in interface HoodieTimelinepublic HoodieTimeline getContiguousCompletedWriteTimeline()
HoodieTimelinegetContiguousCompletedWriteTimeline in interface HoodieTimelinepublic HoodieTimeline getCompletedReplaceTimeline()
HoodieTimelinegetCompletedReplaceTimeline in interface HoodieTimelinepublic HoodieTimeline filterPendingReplaceTimeline()
HoodieTimelinefilterPendingReplaceTimeline in interface HoodieTimelinepublic HoodieTimeline filterPendingRollbackTimeline()
HoodieTimelinefilterPendingRollbackTimeline in interface HoodieTimelinepublic HoodieTimeline filterPendingCompactionTimeline()
HoodieTimelinefilterPendingCompactionTimeline in interface HoodieTimelinepublic HoodieDefaultTimeline findInstantsInRange(String startTs, String endTs)
HoodieTimelinefindInstantsInRange in interface HoodieTimelinepublic HoodieDefaultTimeline findInstantsAfter(String instantTime, int numCommits)
HoodieTimelinefindInstantsAfter in interface HoodieTimelinepublic HoodieTimeline findInstantsAfter(String instantTime)
HoodieTimelinefindInstantsAfter in interface HoodieTimelinepublic HoodieDefaultTimeline findInstantsAfterOrEquals(String commitTime, int numCommits)
HoodieTimelinefindInstantsAfterOrEquals in interface HoodieTimelinepublic HoodieDefaultTimeline findInstantsBefore(String instantTime)
HoodieTimelinefindInstantsBefore in interface HoodieTimelinepublic HoodieDefaultTimeline findInstantsBeforeOrEquals(String instantTime)
HoodieTimelinefindInstantsBeforeOrEquals in interface HoodieTimelinepublic HoodieTimeline filter(Predicate<HoodieInstant> filter)
HoodieTimelinefilter in interface HoodieTimelinepublic HoodieTimeline filterPendingIndexTimeline()
HoodieTimelinefilterPendingIndexTimeline in interface HoodieTimelinepublic HoodieTimeline filterCompletedIndexTimeline()
HoodieTimelinefilterCompletedIndexTimeline in interface HoodieTimelinepublic HoodieTimeline getCommitsTimeline()
public HoodieTimeline getAllCommitsTimeline()
public HoodieTimeline getCommitTimeline()
public HoodieTimeline getDeltaCommitTimeline()
public HoodieTimeline getTimelineOfActions(Set<String> actions)
actions - actions allowed in the timelinepublic HoodieTimeline getCleanerTimeline()
public HoodieTimeline getRollbackTimeline()
public HoodieTimeline getRollbackAndRestoreTimeline()
public HoodieTimeline getSavePointTimeline()
public HoodieTimeline getRestoreTimeline()
protected Stream<HoodieInstant> filterInstantsByAction(String action)
public boolean empty()
HoodieTimelineempty in interface HoodieTimelinepublic int countInstants()
countInstants in interface HoodieTimelinepublic Option<HoodieInstant> firstInstant()
firstInstant in interface HoodieTimelinepublic Option<HoodieInstant> firstInstant(String action, HoodieInstant.State state)
firstInstant in interface HoodieTimelineaction - Instant action String.state - Instant State.public Option<HoodieInstant> nthInstant(int n)
nthInstant in interface HoodieTimelinepublic Option<HoodieInstant> lastInstant()
lastInstant in interface HoodieTimelinepublic Option<HoodieInstant> nthFromLastInstant(int n)
nthFromLastInstant in interface HoodieTimelinepublic boolean containsInstant(HoodieInstant instant)
containsInstant in interface HoodieTimelinepublic boolean containsInstant(String ts)
containsInstant in interface HoodieTimelinepublic boolean containsOrBeforeTimelineStarts(String instant)
containsOrBeforeTimelineStarts in interface HoodieTimelinepublic String getTimelineHash()
HoodieTimelinegetTimelineHash in interface HoodieTimelinepublic Stream<HoodieInstant> getInstants()
getInstants in interface HoodieTimelinepublic Stream<HoodieInstant> getReverseOrderedInstants()
getReverseOrderedInstants in interface HoodieTimelinepublic boolean isBeforeTimelineStarts(String instant)
isBeforeTimelineStarts in interface HoodieTimelinepublic Option<HoodieInstant> getFirstNonSavepointCommit()
HoodieTimelinegetFirstNonSavepointCommit in interface HoodieTimelinepublic Option<byte[]> getInstantDetails(HoodieInstant instant)
HoodieTimelinegetInstantDetails in interface HoodieTimelinepublic boolean isEmpty(HoodieInstant instant)
isEmpty in interface HoodieTimelinepublic HoodieDefaultTimeline mergeTimeline(HoodieDefaultTimeline timeline)
Copyright © 2022 The Apache Software Foundation. All rights reserved.