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, COMPLETED_COMPACTION_SUFFIX, COMPLETED_EXTENSION, 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_LOG_COMPACTION_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, LOG_COMPACTION_ACTION, 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_LOG_COMPACTION_EXTENSION, REQUESTED_LOG_COMPACTION_SUFFIX, 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.
|
HoodieDefaultTimeline |
filterCompletedInstantsOrRewriteTimeline()
Timeline to just include completed commits or all rewrites like compaction, logcompaction and replace actions.
|
HoodieTimeline |
filterCompletedOrMajorOrMinorCompactionInstants() |
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 |
filterPendingExcludingLogCompaction()
Filter this timeline to just include the in-flights excluding logcompaction instants.
|
HoodieTimeline |
filterPendingExcludingMajorAndMinorCompaction()
Filter this timeline to just include the in-flights excluding major and minor compaction instants.
|
HoodieTimeline |
filterPendingIndexTimeline()
Filter this timeline to just include requested and inflight index instants.
|
HoodieTimeline |
filterPendingLogCompactionTimeline()
Filter this timeline to just include requested and inflight log compaction instants.
|
HoodieTimeline |
filterPendingMajorOrMinorCompactionTimeline()
Compaction and logcompaction operation on MOR table is called major and minor compaction respectively.
|
HoodieTimeline |
filterPendingReplaceTimeline()
Filter this timeline to just include requested and inflight replacecommit instants.
|
HoodieTimeline |
filterPendingRollbackTimeline()
Filter this timeline to include pending rollbacks.
|
HoodieTimeline |
filterRequestedRollbackTimeline()
Filter this timeline for requested rollbacks.
|
Option<HoodieInstant> |
findInstantBefore(String instantTime)
Finds the instant before specified time.
|
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 |
findInstantsInClosedRange(String startTs,
String endTs)
Create a new Timeline with instants after or equals startTs and before or on endTs.
|
HoodieDefaultTimeline |
findInstantsInRange(String startTs,
String endTs)
Create a new Timeline with instants after startTs and before or on endTs.
|
HoodieDefaultTimeline |
findInstantsInRangeByStateTransitionTime(String startTs,
String endTs)
`
Create a new Timeline with instants after startTs and before or on endTs
by state transition timestamp of actions.
|
HoodieDefaultTimeline |
findInstantsModifiedAfterByStateTransitionTime(String instantTime)
Create new timeline with all instants that were modified after specified time.
|
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 |
getCommitAndReplaceTimeline()
Get only pure commit and replace commits (inflight and completed) in the active timeline.
|
HoodieTimeline |
getCommitsAndCompactionTimeline()
Get all instants (commits, delta commits, replace, compaction) that produce new data or merge file, 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<HoodieInstant> |
getFirstPendingClusterInstant()
get the least recent pending cluster commit if present
|
Option<byte[]> |
getInstantDetails(HoodieInstant instant)
Read the completed instant details.
|
List<HoodieInstant> |
getInstants() |
Stream<HoodieInstant> |
getInstantsAsStream() |
Stream<HoodieInstant> |
getInstantsOrderedByStateTransitionTime()
Get the stream of instants in order by state transition timestamp of actions.
|
Option<HoodieInstant> |
getLastClusteringInstant()
get the most recent cluster commit if present
|
Option<HoodieInstant> |
getLastPendingClusterInstant()
get the most recent pending cluster commit if present
|
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) |
boolean |
isPendingClusterInstant(String instantTime)
return true if instant is a pending clustering commit, otherwise false
|
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, getLogCompactionInflightInstant, getLogCompactionRequestedInstant, getReplaceCommitInflightInstant, getReplaceCommitRequestedInstant, getRequestedInstant, getRestoreRequestedInstant, getRollbackRequestedInstant, isInClosedRange, isInRange, makeCleanerFileName, makeCommitFileName, makeDeltaFileName, makeFileNameAsComplete, makeFileNameAsInflight, makeIndexCommitFileName, makeInflightCleanerFileName, makeInflightCommitFileName, makeInflightCompactionFileName, makeInflightDeltaFileName, makeInflightIndexFileName, makeInflightLogCompactionFileName, makeInflightReplaceFileName, makeInflightRestoreFileName, makeInflightRollbackFileName, makeInflightSavePointFileName, makeInflightSchemaFileName, makeReplaceFileName, makeRequestedCleanerFileName, makeRequestedCommitFileName, makeRequestedCompactionFileName, makeRequestedDeltaFileName, makeRequestedIndexFileName, makeRequestedLogCompactionFileName, 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 filterPendingExcludingLogCompaction()
HoodieTimelinefilterPendingExcludingLogCompaction in interface HoodieTimelinepublic HoodieTimeline filterPendingExcludingMajorAndMinorCompaction()
HoodieTimelinefilterPendingExcludingMajorAndMinorCompaction in interface HoodieTimelinepublic HoodieTimeline filterCompletedInstants()
HoodieTimelinefilterCompletedInstants in interface HoodieTimelinepublic HoodieTimeline filterCompletedAndCompactionInstants()
HoodieTimelinefilterCompletedAndCompactionInstants in interface HoodieTimelinepublic HoodieTimeline filterCompletedOrMajorOrMinorCompactionInstants()
filterCompletedOrMajorOrMinorCompactionInstants in interface HoodieTimelinepublic HoodieDefaultTimeline filterCompletedInstantsOrRewriteTimeline()
HoodieTimelinefilterCompletedInstantsOrRewriteTimeline 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 filterRequestedRollbackTimeline()
HoodieTimelinefilterRequestedRollbackTimeline in interface HoodieTimelinepublic HoodieTimeline filterPendingCompactionTimeline()
HoodieTimelinefilterPendingCompactionTimeline in interface HoodieTimelinepublic HoodieTimeline filterPendingLogCompactionTimeline()
HoodieTimelinefilterPendingLogCompactionTimeline in interface HoodieTimelinepublic HoodieTimeline filterPendingMajorOrMinorCompactionTimeline()
filterPendingMajorOrMinorCompactionTimeline in interface HoodieTimelinepublic HoodieDefaultTimeline findInstantsInRange(String startTs, String endTs)
HoodieTimelinefindInstantsInRange in interface HoodieTimelinepublic HoodieDefaultTimeline findInstantsInClosedRange(String startTs, String endTs)
HoodieTimelinefindInstantsInClosedRange in interface HoodieTimelinepublic HoodieDefaultTimeline findInstantsInRangeByStateTransitionTime(String startTs, String endTs)
HoodieTimelinefindInstantsInRangeByStateTransitionTime in interface HoodieTimelinepublic HoodieDefaultTimeline findInstantsModifiedAfterByStateTransitionTime(String instantTime)
HoodieTimelinefindInstantsModifiedAfterByStateTransitionTime 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 Option<HoodieInstant> findInstantBefore(String instantTime)
HoodieTimelinefindInstantBefore 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 getCommitsAndCompactionTimeline()
public HoodieTimeline getAllCommitsTimeline()
public HoodieTimeline getCommitAndReplaceTimeline()
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> getInstantsAsStream()
getInstantsAsStream in interface HoodieTimelinepublic List<HoodieInstant> getInstants()
getInstants in interface HoodieTimelinepublic Stream<HoodieInstant> getReverseOrderedInstants()
getReverseOrderedInstants in interface HoodieTimelinepublic Stream<HoodieInstant> getInstantsOrderedByStateTransitionTime()
HoodieTimelinegetInstantsOrderedByStateTransitionTime in interface HoodieTimelinepublic boolean isBeforeTimelineStarts(String instant)
isBeforeTimelineStarts in interface HoodieTimelinepublic Option<HoodieInstant> getFirstNonSavepointCommit()
HoodieTimelinegetFirstNonSavepointCommit in interface HoodieTimelinepublic Option<HoodieInstant> getLastClusteringInstant()
HoodieTimelinegetLastClusteringInstant in interface HoodieTimelinepublic Option<HoodieInstant> getFirstPendingClusterInstant()
HoodieTimelinegetFirstPendingClusterInstant in interface HoodieTimelinepublic Option<HoodieInstant> getLastPendingClusterInstant()
HoodieTimelinegetLastPendingClusterInstant in interface HoodieTimelinepublic boolean isPendingClusterInstant(String instantTime)
HoodieTimelineisPendingClusterInstant 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 © 2024 The Apache Software Foundation. All rights reserved.