Documentation
¶
Index ¶
- type AccountInfo
- type CheckpointInfo
- type CheckpointReader
- func (r *CheckpointReader) Close() error
- func (r *CheckpointReader) ComposeAt(ts types.TS) (*ComposedView, error)
- func (r *CheckpointReader) Dir() string
- func (r *CheckpointReader) Entries() []*checkpoint.CheckpointEntry
- func (r *CheckpointReader) EntryInfo(index int, e *checkpoint.CheckpointEntry) *EntryInfo
- func (r *CheckpointReader) GetAccounts(entry *checkpoint.CheckpointEntry) ([]*AccountInfo, error)
- func (r *CheckpointReader) GetEntry(index int) (*checkpoint.CheckpointEntry, error)
- func (r *CheckpointReader) GetObjectEntries(entry *checkpoint.CheckpointEntry, tableID uint64) ([]*ObjectEntryInfo, []*ObjectEntryInfo, error)
- func (r *CheckpointReader) GetTableRanges(entry *checkpoint.CheckpointEntry) ([]ckputil.TableRange, error)
- func (r *CheckpointReader) GetTables(entry *checkpoint.CheckpointEntry) ([]*TableInfo, error)
- func (r *CheckpointReader) GetTablesByAccount(entry *checkpoint.CheckpointEntry, accountID uint32) ([]*TableInfo, error)
- func (r *CheckpointReader) Info() *CheckpointInfo
- func (r *CheckpointReader) ReadRangeData(entry *checkpoint.CheckpointEntry, rng ckputil.TableRange) ([]string, [][]string, error)
- func (r *CheckpointReader) ReadTableData(ctx context.Context, rng ckputil.TableRange) (*batch.Batch, func(), error)
- type ComposedView
- type EntryInfo
- type ObjectEntryInfo
- type Option
- type TableInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountInfo ¶
type AccountInfo struct {
AccountID uint32
TableCount int
ObjectCount int
DataRanges int
TombRanges int
}
AccountInfo contains account summary within checkpoint
type CheckpointInfo ¶
type CheckpointInfo struct {
Dir string
TotalEntries int
GlobalCount int
IncrCount int
CompactCount int
LatestTS types.TS
EarliestTS types.TS
TotalAccounts int
TotalTables int
}
CheckpointInfo contains checkpoint metadata summary
type CheckpointReader ¶
type CheckpointReader struct {
// contains filtered or unexported fields
}
CheckpointReader reads checkpoint data from a directory
func (*CheckpointReader) ComposeAt ¶
func (r *CheckpointReader) ComposeAt(ts types.TS) (*ComposedView, error)
ComposeAt creates a logical view at timestamp
func (*CheckpointReader) Dir ¶
func (r *CheckpointReader) Dir() string
Dir returns the checkpoint directory
func (*CheckpointReader) Entries ¶
func (r *CheckpointReader) Entries() []*checkpoint.CheckpointEntry
Entries returns all checkpoint entries
func (*CheckpointReader) EntryInfo ¶
func (r *CheckpointReader) EntryInfo(index int, e *checkpoint.CheckpointEntry) *EntryInfo
EntryInfo converts CheckpointEntry to EntryInfo
func (*CheckpointReader) GetAccounts ¶
func (r *CheckpointReader) GetAccounts(entry *checkpoint.CheckpointEntry) ([]*AccountInfo, error)
GetAccounts extracts unique accounts from table ranges
func (*CheckpointReader) GetEntry ¶
func (r *CheckpointReader) GetEntry(index int) (*checkpoint.CheckpointEntry, error)
GetEntry returns entry at index
func (*CheckpointReader) GetObjectEntries ¶
func (r *CheckpointReader) GetObjectEntries(entry *checkpoint.CheckpointEntry, tableID uint64) ([]*ObjectEntryInfo, []*ObjectEntryInfo, error)
GetObjectEntries reads detailed object entries with timestamps for a table
func (*CheckpointReader) GetTableRanges ¶
func (r *CheckpointReader) GetTableRanges(entry *checkpoint.CheckpointEntry) ([]ckputil.TableRange, error)
GetTableRanges reads table ranges from an entry
func (*CheckpointReader) GetTables ¶
func (r *CheckpointReader) GetTables(entry *checkpoint.CheckpointEntry) ([]*TableInfo, error)
GetTables extracts tables from an entry
func (*CheckpointReader) GetTablesByAccount ¶
func (r *CheckpointReader) GetTablesByAccount(entry *checkpoint.CheckpointEntry, accountID uint32) ([]*TableInfo, error)
GetTablesByAccount filters tables by account
func (*CheckpointReader) Info ¶
func (r *CheckpointReader) Info() *CheckpointInfo
Info returns checkpoint summary
func (*CheckpointReader) ReadRangeData ¶
func (r *CheckpointReader) ReadRangeData(entry *checkpoint.CheckpointEntry, rng ckputil.TableRange) ([]string, [][]string, error)
ReadRangeData reads actual data from a range and returns column names and row data as strings
func (*CheckpointReader) ReadTableData ¶
func (r *CheckpointReader) ReadTableData(ctx context.Context, rng ckputil.TableRange) (*batch.Batch, func(), error)
ReadTableData reads actual data from a table range
type ComposedView ¶
type ComposedView struct {
Timestamp types.TS
BaseEntry *EntryInfo
Incrementals []*EntryInfo
Tables map[uint64]*TableInfo
}
ComposedView represents logical checkpoint view at a timestamp
type EntryInfo ¶
type EntryInfo struct {
Index int
Start types.TS
End types.TS
Type checkpoint.EntryType
State checkpoint.State
Version uint32
Location string
TNLocation string
TableIDLocations []string
CKPLSN uint64
TruncLSN uint64
}
EntryInfo is a simplified view of CheckpointEntry for display
type ObjectEntryInfo ¶
ObjectEntryInfo contains detailed object entry information with timestamps
type TableInfo ¶
type TableInfo struct {
TableID uint64
AccountID uint32
DatabaseID uint64
DataRanges []ckputil.TableRange
TombRanges []ckputil.TableRange
}
TableInfo contains table data within checkpoint