public class HoodieArchivedTimeline extends HoodieDefaultTimeline
Instants are read from the archive file during initialization and never refreshed. To refresh, clients need to call #reload().
This class can be serialized and de-serialized and on de-serialization the FileSystem is re-initialized.
| Modifier and Type | Class and Description |
|---|---|
static class |
HoodieArchivedTimeline.ClosedOpenTimeRangeFilter
A time based filter with range [startTs, endTs).
|
static class |
HoodieArchivedTimeline.LoadMode
Different mode for loading the archived instant metadata.
|
static class |
HoodieArchivedTimeline.StartTsFilter
A time based filter with range [startTs, +∞).
|
static class |
HoodieArchivedTimeline.TimeRangeFilter
A time based filter with range (startTs, endTs].
|
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPLETION_TIME_ARCHIVED_META_FIELD |
static String |
INSTANT_TIME_ARCHIVED_META_FIELD |
detailsCLEAN_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 |
|---|
HoodieArchivedTimeline()
Deprecated.
|
HoodieArchivedTimeline(HoodieTableMetaClient metaClient)
Loads all the archived instants.
|
HoodieArchivedTimeline(HoodieTableMetaClient metaClient,
String startTs)
Loads completed instants from startTs(inclusive).
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearInstantDetailsFromMemory(String instantTime) |
void |
clearInstantDetailsFromMemory(String startTs,
String endTs) |
Option<byte[]> |
getInstantDetails(HoodieInstant instant)
Read the completed instant details.
|
HoodieDefaultTimeline |
getWriteTimeline()
Timeline to just include commits (commit/deltacommit), compaction and replace actions.
|
void |
loadCompactionDetailsInMemory(String compactionInstantTime) |
void |
loadCompactionDetailsInMemory(String startTs,
String endTs) |
void |
loadCompletedInstantDetailsInMemory() |
void |
loadInstantDetailsInMemory(String startTs,
String endTs) |
static void |
loadInstants(HoodieTableMetaClient metaClient,
HoodieArchivedTimeline.TimeRangeFilter filter,
HoodieArchivedTimeline.LoadMode loadMode,
Function<org.apache.avro.generic.GenericRecord,Boolean> commitsFilter,
BiConsumer<String,org.apache.avro.generic.GenericRecord> recordConsumer)
Loads the instants from the timeline.
|
HoodieArchivedTimeline |
reload() |
HoodieArchivedTimeline |
reload(String startTs)
Reloads the archived timeline incrementally with given beginning timestamp
startTs. |
appendInstants, containsInstant, containsInstant, containsOrBeforeTimelineStarts, countInstants, empty, filter, filterCompletedAndCompactionInstants, filterCompletedIndexTimeline, filterCompletedInstants, filterCompletedInstantsOrRewriteTimeline, filterCompletedOrMajorOrMinorCompactionInstants, filterInflights, filterInflightsAndRequested, filterInstantsByAction, filterPendingCompactionTimeline, filterPendingExcludingCompaction, filterPendingExcludingLogCompaction, filterPendingExcludingMajorAndMinorCompaction, filterPendingIndexTimeline, filterPendingLogCompactionTimeline, filterPendingMajorOrMinorCompactionTimeline, filterPendingReplaceTimeline, filterPendingRollbackTimeline, filterRequestedRollbackTimeline, findInstantBefore, findInstantsAfter, findInstantsAfter, findInstantsAfterOrEquals, findInstantsBefore, findInstantsBeforeOrEquals, findInstantsInClosedRange, findInstantsInRange, findInstantsInRangeByCompletionTime, findInstantsModifiedAfterByCompletionTime, firstInstant, firstInstant, getAllCommitsTimeline, getCleanerTimeline, getCommitAndReplaceTimeline, getCommitsAndCompactionTimeline, getCommitsTimeline, getCommitTimeline, getCompletedReplaceTimeline, getContiguousCompletedWriteTimeline, getDeltaCommitTimeline, getFirstNonSavepointCommit, getFirstPendingClusterInstant, getInstants, getInstantsAsStream, getInstantsOrderedByCompletionTime, getLastClusteringInstant, getLastPendingClusterInstant, getRestoreTimeline, getReverseOrderedInstants, getRollbackAndRestoreTimeline, getRollbackTimeline, getSavePointTimeline, getTimelineHash, getTimelineOfActions, isBeforeTimelineStarts, isEmpty, isPendingClusterInstant, lastInstant, mergeTimeline, nthFromLastInstant, nthInstant, setInstants, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcompareTimestamps, getCleanInflightInstant, getCleanRequestedInstant, getCommitFromCommitFile, getCompactionInflightInstant, getCompactionRequestedInstant, getIndexInflightInstant, getIndexRequestedInstant, getInflightInstant, getLogCompactionInflightInstant, getLogCompactionRequestedInstant, getReplaceCommitInflightInstant, getReplaceCommitRequestedInstant, getRequestedInstant, getRestoreRequestedInstant, getRollbackRequestedInstant, isInClosedOpenRange, 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, makeSchemaFileName, maxInstant, minInstantpublic static final String INSTANT_TIME_ARCHIVED_META_FIELD
public static final String COMPLETION_TIME_ARCHIVED_META_FIELD
public HoodieArchivedTimeline(HoodieTableMetaClient metaClient)
public HoodieArchivedTimeline(HoodieTableMetaClient metaClient, String startTs)
public HoodieArchivedTimeline()
public void loadCompletedInstantDetailsInMemory()
public void loadCompactionDetailsInMemory(String compactionInstantTime)
public void loadCompactionDetailsInMemory(String startTs, String endTs)
public void clearInstantDetailsFromMemory(String instantTime)
public void clearInstantDetailsFromMemory(String startTs, String endTs)
public Option<byte[]> getInstantDetails(HoodieInstant instant)
HoodieTimelinegetInstantDetails in interface HoodieTimelinegetInstantDetails in class HoodieDefaultTimelinepublic HoodieArchivedTimeline reload()
public HoodieArchivedTimeline reload(String startTs)
startTs.
This method is not thread safe.
IMPORTANT: this is for multiple loading of one static snapshot of the timeline, if there is new instants got archived,
use reload() instead.
public static void loadInstants(HoodieTableMetaClient metaClient, @Nullable HoodieArchivedTimeline.TimeRangeFilter filter, HoodieArchivedTimeline.LoadMode loadMode, Function<org.apache.avro.generic.GenericRecord,Boolean> commitsFilter, BiConsumer<String,org.apache.avro.generic.GenericRecord> recordConsumer)
metaClient - The meta client.filter - The time range filter where the target instant belongs to.loadMode - The load mode.commitsFilter - Filter of the instant type.recordConsumer - Consumer of the instant record payload.public HoodieDefaultTimeline getWriteTimeline()
HoodieTimelinegetWriteTimeline in interface HoodieTimelinegetWriteTimeline in class HoodieDefaultTimelineCopyright © 2024 The Apache Software Foundation. All rights reserved.