Documentation ¶
Index ¶
- Constants
- Variables
- func CheckpointFileSingular(dir string, version int64) string
- func CheckpointFileWithParts(dir string, version int64, numParts int) []string
- func CheckpointPrefix(path string, version int64) string
- func CheckpointVersion(path string) (int64, error)
- func DeltaFile(path string, version int64) string
- func GetFileVersion(path string) (int64, error)
- func IsCheckpointFile(path string) bool
- func IsDeltaFile(path string) bool
- func LogVersion(path string) (int64, error)
- func NumCheckpointParts(path string) (int, error)
- type CheckpointInstance
- func FindLastCompleteCheckpoint(s store.Store, cv CheckpointInstance) (*CheckpointInstance, error)
- func FromMetadata(metadata CheckpointMetaData) *CheckpointInstance
- func FromPath(path string) (*CheckpointInstance, error)
- func LatestCompleteCheckpoint(instances []*CheckpointInstance, notLaterThan CheckpointInstance) *CheckpointInstance
- type CheckpointMetaData
- type CheckpointReader
- type LogSegment
- type MemoryOptimizedLogReplay
- type Replayer
- type Snapshot
- type SnapshotReader
- type StoreCheckpointReader
- type TableConfig
- type TableLog
- func (l *TableLog) CommitInfoAt(version int64) (*action.CommitInfo, error)
- func (l *TableLog) Path() string
- func (l *TableLog) Snapshot() (*Snapshot, error)
- func (l *TableLog) SnapshotForTimestamp(timestamp int64) (*Snapshot, error)
- func (l *TableLog) SnapshotForVersion(version int64) (*Snapshot, error)
- func (l *TableLog) TableExists() bool
- func (l *TableLog) Update() (*Snapshot, error)
Constants ¶
View Source
const LastCheckpointPath string = "_last_checkpoint"
Variables ¶
View Source
var ( LogRetentionProp = &TableConfig[time.Duration]{ Key: "logRetentionDuration", DefaultValue: "interval 30 days", FromString: parseDuration, } TombstoneRetentionProp = &TableConfig[time.Duration]{ Key: "deletedFileRetentionDuration", DefaultValue: "interval 1 week", FromString: parseDuration, } DeltaConfigCheckpointInterval = &TableConfig[int]{ Key: "checkpointInterval", DefaultValue: "10", FromString: func(s string) (int, error) { return strconv.Atoi(s) }, } EnableExpiredLogCleanupProp = &TableConfig[bool]{ Key: "enableExpiredLogCleanup", DefaultValue: "true", FromString: func(s string) (bool, error) { return strings.ToLower(s) == "true", nil }, } IsAppendOnlyProp = &TableConfig[bool]{ Key: "appendOnly", DefaultValue: "false", FromString: func(s string) (bool, error) { return strings.ToLower(s) == "true", nil }, } )
View Source
var MaxInstance = CheckpointInstance{Version: -1, NumParts: 0}
Functions ¶
func CheckpointFileSingular ¶
func CheckpointFileWithParts ¶
func CheckpointPrefix ¶
func CheckpointVersion ¶
func GetFileVersion ¶
func IsCheckpointFile ¶
func IsDeltaFile ¶
func LogVersion ¶
func NumCheckpointParts ¶
Types ¶
type CheckpointInstance ¶
func FindLastCompleteCheckpoint ¶
func FindLastCompleteCheckpoint(s store.Store, cv CheckpointInstance) (*CheckpointInstance, error)
func FromMetadata ¶
func FromMetadata(metadata CheckpointMetaData) *CheckpointInstance
func FromPath ¶
func FromPath(path string) (*CheckpointInstance, error)
func LatestCompleteCheckpoint ¶
func LatestCompleteCheckpoint(instances []*CheckpointInstance, notLaterThan CheckpointInstance) *CheckpointInstance
func (*CheckpointInstance) Compare ¶
func (t *CheckpointInstance) Compare(other CheckpointInstance) int
func (*CheckpointInstance) GetCorrespondingFiles ¶
func (t *CheckpointInstance) GetCorrespondingFiles(dir string) (res []string)
func (*CheckpointInstance) IsEarlierThan ¶
func (t *CheckpointInstance) IsEarlierThan(other CheckpointInstance) bool
IsEarlierThan compare based just on version and amount of parts in checkpoint
func (*CheckpointInstance) IsNotLaterThan ¶
func (t *CheckpointInstance) IsNotLaterThan(other CheckpointInstance) bool
IsNotLaterThan compare based just on version
type CheckpointMetaData ¶
type CheckpointMetaData struct { Version int64 `json:"version,omitempty"` Size int64 `json:"size,omitempty"` Parts *int64 `json:"parts,omitempty"` }
func LastCheckpoint ¶
func LastCheckpoint(s store.Store) (*CheckpointMetaData, error)
func LoadMetadataFromFile ¶
func LoadMetadataFromFile(s store.Store) (*CheckpointMetaData, error)
type CheckpointReader ¶
type LogSegment ¶
type MemoryOptimizedLogReplay ¶
type MemoryOptimizedLogReplay struct {
// contains filtered or unexported fields
}
func (*MemoryOptimizedLogReplay) GetReverseIterator ¶
func (m *MemoryOptimizedLogReplay) GetReverseIterator() iter.Iter[*replayTuple]
type Replayer ¶
type Replayer struct { MinTS int64 // contains filtered or unexported fields }
func NewReplayer ¶
func (*Replayer) GetSetTransactions ¶
func (r *Replayer) GetSetTransactions() []*action.SetTransaction
func (*Replayer) GetTombstones ¶
func (r *Replayer) GetTombstones() iter.Iter[*action.RemoveFile]
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot provides APIs to access the Delta table state (such as table metadata, active files) at some version. See Delta Transaction Log Protocol for more details about the transaction logs.
func NewInitialSnapshot ¶
func NewSnapshot ¶
func NewSnapshot( path string, version int64, logsegment *LogSegment, minTS int64, commitTS int64, store store2.Store, checkpointReader CheckpointReader, ) (*Snapshot, error)
type SnapshotReader ¶
type SnapshotReader struct {
// contains filtered or unexported fields
}
func NewSnapshotReader ¶
func NewSnapshotReader(cpReader CheckpointReader, logStore store.Store, history *history) (*SnapshotReader, error)
type StoreCheckpointReader ¶
type StoreCheckpointReader struct {
// contains filtered or unexported fields
}
func NewCheckpointReader ¶
func NewCheckpointReader(store store.Store) (*StoreCheckpointReader, error)
type TableConfig ¶
type TableConfig[T any] struct { Key string DefaultValue string FromString func(s string) (T, error) }
TableConfig generic config structure from any string-val to typed-val.
type TableLog ¶
type TableLog struct {
// contains filtered or unexported fields
}
func NewTableLog ¶
NewTableLog Create a DeltaLog instance representing the table located at the provided path.
func (*TableLog) CommitInfoAt ¶
func (l *TableLog) CommitInfoAt(version int64) (*action.CommitInfo, error)
func (*TableLog) Snapshot ¶
Snapshot the current Snapshot of the Delta table. You may need to call update() to access the latest Snapshot if the current Snapshot is stale.
func (*TableLog) SnapshotForTimestamp ¶
func (*TableLog) SnapshotForVersion ¶
func (*TableLog) TableExists ¶
Click to show internal directories.
Click to hide internal directories.