public class HoodieActiveTimeline extends HoodieDefaultTimeline
The timeline is not automatically reloaded on any mutation operation, clients have to manually call reload() so that they can chain multiple mutations to the timeline and then call reload() once.
This class can be serialized and de-serialized and on de-serialization the FileSystem is re-initialized.
| Modifier and Type | Field and Description |
|---|---|
static SimpleDateFormat |
COMMIT_FORMATTER |
protected HoodieTableMetaClient |
metaClient |
static Set<String> |
VALID_EXTENSIONS_IN_ACTIVE_TIMELINE |
detailsCLEAN_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, INFLIGHT_CLEAN_EXTENSION, INFLIGHT_COMMIT_EXTENSION, INFLIGHT_COMPACTION_EXTENSION, INFLIGHT_DELTA_COMMIT_EXTENSION, INFLIGHT_EXTENSION, INFLIGHT_REPLACE_COMMIT_EXTENSION, INFLIGHT_RESTORE_EXTENSION, INFLIGHT_ROLLBACK_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_REPLACE_COMMIT_EXTENSION, RESTORE_ACTION, RESTORE_EXTENSION, ROLLBACK_ACTION, ROLLBACK_EXTENSION, SAVEPOINT_ACTION, SAVEPOINT_EXTENSION, VALID_ACTIONS_IN_TIMELINE| Modifier | Constructor and Description |
|---|---|
|
HoodieActiveTimeline()
Deprecated.
|
|
HoodieActiveTimeline(HoodieTableMetaClient metaClient) |
|
HoodieActiveTimeline(HoodieTableMetaClient metaClient,
boolean applyLayoutFilter) |
protected |
HoodieActiveTimeline(HoodieTableMetaClient metaClient,
Set<String> includedExtensions) |
protected |
HoodieActiveTimeline(HoodieTableMetaClient metaClient,
Set<String> includedExtensions,
boolean applyLayoutFilters) |
| Modifier and Type | Method and Description |
|---|---|
void |
createNewInstant(HoodieInstant instant) |
static String |
createNewInstantTime()
Returns next instant time in the
COMMIT_FORMATTER format. |
static String |
createNewInstantTime(long milliseconds)
Returns next instant time that adds N milliseconds in the
COMMIT_FORMATTER format. |
void |
deleteCompactionRequested(HoodieInstant instant) |
void |
deleteInflight(HoodieInstant instant) |
void |
deletePending(HoodieInstant.State state,
String action,
String instantStr) |
void |
deletePending(HoodieInstant instant) |
Option<byte[]> |
getInstantDetails(HoodieInstant instant)
Read the completed instant details.
|
Option<byte[]> |
readCleanerInfoAsBytes(HoodieInstant instant) |
Option<byte[]> |
readCompactionPlanAsBytes(HoodieInstant instant) |
HoodieActiveTimeline |
reload() |
HoodieInstant |
revertCompactionInflightToRequested(HoodieInstant inflightInstant)
Revert compaction State from inflight to requested.
|
HoodieInstant |
revertReplaceCommitInflightToRequested(HoodieInstant inflightInstant)
Revert replace requested State from inflight to requested.
|
HoodieInstant |
revertToInflight(HoodieInstant instant) |
void |
saveAsComplete(HoodieInstant instant,
Option<byte[]> data) |
void |
saveToCleanRequested(HoodieInstant instant,
Option<byte[]> content) |
void |
saveToCompactionRequested(HoodieInstant instant,
Option<byte[]> content) |
void |
saveToCompactionRequested(HoodieInstant instant,
Option<byte[]> content,
boolean overwrite) |
void |
saveToPendingReplaceCommit(HoodieInstant instant,
Option<byte[]> content)
Saves content for inflight/requested REPLACE instant.
|
HoodieInstant |
transitionCleanInflightToComplete(HoodieInstant inflightInstant,
Option<byte[]> data)
Transition Clean State from inflight to Committed.
|
HoodieInstant |
transitionCleanRequestedToInflight(HoodieInstant requestedInstant,
Option<byte[]> data)
Transition Clean State from requested to inflight.
|
HoodieInstant |
transitionCompactionInflightToComplete(HoodieInstant inflightInstant,
Option<byte[]> data)
Transition Compaction State from inflight to Committed.
|
HoodieInstant |
transitionCompactionRequestedToInflight(HoodieInstant requestedInstant)
Transition Compaction State from requested to inflight.
|
HoodieInstant |
transitionReplaceInflightToComplete(HoodieInstant inflightInstant,
Option<byte[]> data)
Transition replace inflight to Committed.
|
HoodieInstant |
transitionReplaceRequestedToInflight(HoodieInstant requestedInstant,
Option<byte[]> data)
Transition replace requested file to replace inflight.
|
void |
transitionRequestedToInflight(HoodieInstant requested,
Option<byte[]> content) |
void |
transitionRequestedToInflight(HoodieInstant requested,
Option<byte[]> content,
boolean allowRedundantTransitions) |
containsInstant, containsInstant, containsOrBeforeTimelineStarts, countInstants, empty, filter, filterCompletedAndCompactionInstants, filterCompletedInstants, filterInflights, filterInflightsAndRequested, filterInstantsByAction, filterPendingCompactionTimeline, filterPendingExcludingCompaction, filterPendingReplaceTimeline, findInstantsAfter, findInstantsAfter, findInstantsAfterOrEquals, findInstantsBefore, findInstantsBeforeOrEquals, findInstantsInRange, firstInstant, getAllCommitsTimeline, getCleanerTimeline, getCommitsTimeline, getCommitTimeline, getCompletedReplaceTimeline, getDeltaCommitTimeline, getInstants, getRestoreTimeline, getReverseOrderedInstants, getRollbackTimeline, getSavePointTimeline, getTimelineHash, getTimelineOfActions, getWriteTimeline, isBeforeTimelineStarts, lastInstant, nthFromLastInstant, nthInstant, setInstants, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcompareTimestamps, getCleanInflightInstant, getCleanRequestedInstant, getCommitFromCommitFile, getCompactionInflightInstant, getCompactionRequestedInstant, getCompletedInstant, getInflightInstant, getReplaceCommitInflightInstant, getReplaceCommitRequestedInstant, getRequestedInstant, isInRange, makeCleanerFileName, makeCommitFileName, makeDeltaFileName, makeFileNameAsComplete, makeFileNameAsInflight, makeInflightCleanerFileName, makeInflightCommitFileName, makeInflightCompactionFileName, makeInflightDeltaFileName, makeInflightReplaceFileName, makeInflightRestoreFileName, makeInflightRollbackFileName, makeInflightSavePointFileName, makeReplaceFileName, makeRequestedCleanerFileName, makeRequestedCommitFileName, makeRequestedCompactionFileName, makeRequestedDeltaFileName, makeRequestedReplaceFileName, makeRestoreFileName, makeRollbackFileName, makeSavePointFileNamepublic static final SimpleDateFormat COMMIT_FORMATTER
public static final Set<String> VALID_EXTENSIONS_IN_ACTIVE_TIMELINE
protected HoodieTableMetaClient metaClient
protected HoodieActiveTimeline(HoodieTableMetaClient metaClient, Set<String> includedExtensions)
protected HoodieActiveTimeline(HoodieTableMetaClient metaClient, Set<String> includedExtensions, boolean applyLayoutFilters)
public HoodieActiveTimeline(HoodieTableMetaClient metaClient)
public HoodieActiveTimeline(HoodieTableMetaClient metaClient, boolean applyLayoutFilter)
public HoodieActiveTimeline()
public static String createNewInstantTime()
COMMIT_FORMATTER format.
Ensures each instant time is atleast 1 second apart since we create instant times at second granularitypublic static String createNewInstantTime(long milliseconds)
COMMIT_FORMATTER format.
Ensures each instant time is atleast 1 second apart since we create instant times at second granularitypublic void createNewInstant(HoodieInstant instant)
public void saveAsComplete(HoodieInstant instant, Option<byte[]> data)
public HoodieInstant revertToInflight(HoodieInstant instant)
public void deleteInflight(HoodieInstant instant)
public void deletePending(HoodieInstant instant)
public void deletePending(HoodieInstant.State state, String action, String instantStr)
public void deleteCompactionRequested(HoodieInstant instant)
public Option<byte[]> getInstantDetails(HoodieInstant instant)
HoodieTimelinegetInstantDetails in interface HoodieTimelinegetInstantDetails in class HoodieDefaultTimelinepublic Option<byte[]> readCleanerInfoAsBytes(HoodieInstant instant)
public Option<byte[]> readCompactionPlanAsBytes(HoodieInstant instant)
public HoodieInstant revertCompactionInflightToRequested(HoodieInstant inflightInstant)
inflightInstant - Inflight Instantpublic HoodieInstant transitionCompactionRequestedToInflight(HoodieInstant requestedInstant)
requestedInstant - Requested instantpublic HoodieInstant transitionCompactionInflightToComplete(HoodieInstant inflightInstant, Option<byte[]> data)
inflightInstant - Inflight instantdata - Extra Metadatapublic HoodieInstant transitionCleanInflightToComplete(HoodieInstant inflightInstant, Option<byte[]> data)
inflightInstant - Inflight instantdata - Extra Metadatapublic HoodieInstant transitionCleanRequestedToInflight(HoodieInstant requestedInstant, Option<byte[]> data)
requestedInstant - requested instantdata - Optional data to be storedpublic HoodieInstant transitionReplaceRequestedToInflight(HoodieInstant requestedInstant, Option<byte[]> data)
requestedInstant - Requested instantdata - Extra Metadatapublic HoodieInstant transitionReplaceInflightToComplete(HoodieInstant inflightInstant, Option<byte[]> data)
inflightInstant - Inflight instantdata - Extra Metadatapublic HoodieInstant revertReplaceCommitInflightToRequested(HoodieInstant inflightInstant)
inflightInstant - Inflight Instantpublic void transitionRequestedToInflight(HoodieInstant requested, Option<byte[]> content)
public void transitionRequestedToInflight(HoodieInstant requested, Option<byte[]> content, boolean allowRedundantTransitions)
public void saveToCompactionRequested(HoodieInstant instant, Option<byte[]> content)
public void saveToCompactionRequested(HoodieInstant instant, Option<byte[]> content, boolean overwrite)
public void saveToPendingReplaceCommit(HoodieInstant instant, Option<byte[]> content)
public void saveToCleanRequested(HoodieInstant instant, Option<byte[]> content)
public HoodieActiveTimeline reload()
Copyright © 2021 The Apache Software Foundation. All rights reserved.