Versions in this module Expand all Collapse all v0 v0.4.0 May 5, 2022 Changes in this version + const LockName + var CopyFileFn func(src, dest string) error + var CopyTableFn func(t iface.ITableData, destDir string) error + var DefaultFlushInterval = time.Duration(20) * time.Second + var DefaultNodeFlushInterval = time.Duration(120) * time.Second + var ErrClosed = errors.New("aoe: closed") + var ErrIdempotence = metadata.ErrIdempotence + var ErrNotFound = errors.New("aoe: notfound") + var ErrResourceDeleted = errors.New("aoe: resource is deleted") + var ErrStaleErr = errors.New("aoe: stale") + var ErrTimeout = errors.New("aoe: timeout") + var ErrUnexpectedWalRole = errors.New("aoe: unexpected wal role setted") + var ErrUnsupported = errors.New("aoe: unsupported") + func CopyBlockFileToDestDir(file, srcDir, destDir string, idMapFn func(*common.ID) (*common.ID, error)) error + func CopyDataFiles(tblks, blks, segs []string, srcDir, destDir string, ...) error + func CopySegmentFileToDestDir(file, srcDir, destDir string, idMapFn func(*common.ID) (*common.ID, error)) error + func CopyTBlockFileToDestDir(file, srcDir, destDir string, idMapFn func(*common.ID) (*common.ID, error)) error + func NewDBSSLoader(catalog *metadata.Catalog, replaced *metadata.Database, tables *table.Tables, ...) *ssLoader + func NewDBSSWriter(database *metadata.Database, dir string, tables *table.Tables) *ssWriter + func NewReplayHandle(workDir string, catalog *metadata.Catalog, tables *table.Tables, ...) *replayHandle + func NewSegmentFilter(s *Segment) engine.Filter + func NewSegmentSparseFilter(s *Segment) aoe.SparseFilter + func NewSegmentSummarizer(s *Segment) engine.Summarizer + func ScanMigrationDir(path string) (metas []string, tblks []string, blks []string, segs []string, err error) + type Block struct + Host *Segment + Id uint64 + StrId string + func (blk *Block) Cardinality(_ string) int64 + func (blk *Block) ID() string + func (blk *Block) Prefetch(attrs []string) + func (blk *Block) Read(cs []uint64, attrs []string, compressed []*bytes.Buffer, ...) (*batch.Batch, error) + func (blk *Block) Rows() int64 + func (blk *Block) Size(attr string) int64 + type ColDef = metadata.ColDef + type DB struct + Closed *atomic.Value + ClosedC chan struct{} + DBLocker io.Closer + DataDir *os.File + Dir string + FlushDriver flusher.Driver + FsMgr base.IManager + IndexBufMgr bmgrif.IBufferManager + MTBufMgr bmgrif.IBufferManager + MutationBufMgr bb.INodeManager + Opts *storage.Options + SSTBufMgr bmgrif.IBufferManager + Scheduler sched.Scheduler + Store struct{ ... } + TimedFlusher wb.IHeartbeater + Wal wal.ShardAwareWal + func Open(dirname string, opts *storage.Options) (db *DB, err error) + func OpenWithWalBroker(dirname string, opts *storage.Options) (db *DB, err error) + func (d *DB) AbortTxn(txn *TxnCtx) error + func (d *DB) ApplySnapshot(dbName string, path string) error + func (d *DB) Close() error + func (d *DB) CommitTxn(txn *TxnCtx) error + func (d *DB) CreateDatabaseInTxn(txn *TxnCtx, name string) (*metadata.Database, error) + func (d *DB) CreateSnapshot(dbName string, path string, forcesync bool) (uint64, error) + func (d *DB) CreateTableInTxn(txn *TxnCtx, dbName string, schema *TableSchema, indice *IndexSchema) (*metadata.Table, error) + func (d *DB) DatabaseNames() []string + func (d *DB) DoAppend(meta *metadata.Table, data *batch.Batch, index *shard.SliceIndex) error + func (d *DB) DoCreateSnapshot(database *metadata.Database, path string, forcesync bool) (uint64, error) + func (d *DB) DoFlushDatabase(meta *metadata.Database) error + func (d *DB) DoFlushTable(meta *metadata.Table) error + func (d *DB) FlushDatabase(dbName string) error + func (d *DB) FlushTable(dbName, tableName string) error + func (d *DB) ForceCompactCatalog() error + func (d *DB) GetDBCheckpointId(dbName string) uint64 + func (d *DB) GetSegmentIds(dbName string, tableName string) (ids dbi.IDS) + func (d *DB) GetShardCheckpointId(shardId uint64) uint64 + func (d *DB) GetSnapshot(ctx *dbi.GetSnapshotCtx) (*handle.Snapshot, error) + func (d *DB) GetTableData(meta *metadata.Table) (tiface.ITableData, error) + func (d *DB) GetTempDir() string + func (d *DB) IsClosed() bool + func (d *DB) MakeMutationHandle(meta *metadata.Table) (iface.MutationHandle, error) + func (d *DB) ScheduleGCDatabase(database *metadata.Database) + func (d *DB) ScheduleGCTable(meta *metadata.Table) + func (d *DB) SpliteDatabaseCheck(dbName string, size uint64) (coarseSize uint64, coarseCount uint64, keys [][]byte, ctx []byte, err error) + func (d *DB) StartTxn(index *metadata.LogIndex) *TxnCtx + func (d *DB) TableIDs(dbName string) (ids []uint64, err error) + func (d *DB) TableIdempotenceCheckAndIndexRewrite(meta *metadata.Table, index *LogIndex) (*LogIndex, error) + func (d *DB) TableNames(dbName string) (names []string) + type IReplayObserver interface + OnRemove func(string) + type IndexId = metadata.IndexId + type IndexInfo = metadata.IndexInfo + type IndexSchema = metadata.IndexSchema + type IndexT = metadata.IndexT + type LogIndex = metadata.LogIndex + type RenameTableFactory = metadata.RenameTableFactory + type SSLoader = metadata.SSLoader + type SSWriter interface + GetIndex func() uint64 + type Segment struct + Data iface.ISegment + Ids *atomic.Value + func (seg *Segment) Block(id string) aoe.Block + func (seg *Segment) Blocks() []string + func (seg *Segment) Cardinality(_ string) int64 + func (seg *Segment) ID() string + func (seg *Segment) NewFilter() engine.Filter + func (seg *Segment) NewSparseFilter() aoe.SparseFilter + func (seg *Segment) NewSummarizer() engine.Summarizer + func (seg *Segment) Rows() int64 + func (seg *Segment) Size(attr string) int64 + type SegmentFilter struct + func (f *SegmentFilter) Btw(attr string, minv interface{}, maxv interface{}) (*roaring64.Bitmap, error) + func (f *SegmentFilter) Eq(attr string, val interface{}) (*roaring64.Bitmap, error) + func (f *SegmentFilter) Ge(attr string, val interface{}) (*roaring64.Bitmap, error) + func (f *SegmentFilter) Gt(attr string, val interface{}) (*roaring64.Bitmap, error) + func (f *SegmentFilter) Le(attr string, val interface{}) (*roaring64.Bitmap, error) + func (f *SegmentFilter) Lt(attr string, val interface{}) (*roaring64.Bitmap, error) + func (f *SegmentFilter) Ne(attr string, val interface{}) (*roaring64.Bitmap, error) + type SegmentSparseFilter struct + func (f *SegmentSparseFilter) Btw(attr string, minv interface{}, maxv interface{}) ([]string, error) + func (f *SegmentSparseFilter) Eq(attr string, val interface{}) ([]string, error) + func (f *SegmentSparseFilter) Ge(attr string, val interface{}) ([]string, error) + func (f *SegmentSparseFilter) Gt(attr string, val interface{}) ([]string, error) + func (f *SegmentSparseFilter) Le(attr string, val interface{}) ([]string, error) + func (f *SegmentSparseFilter) Lt(attr string, val interface{}) ([]string, error) + func (f *SegmentSparseFilter) Ne(attr string, val interface{}) ([]string, error) + type SegmentSummarizer struct + func (s *SegmentSummarizer) Count(attr string, filter *roaring.Bitmap) (uint64, error) + func (s *SegmentSummarizer) Max(attr string, filter *roaring.Bitmap) (interface{}, error) + func (s *SegmentSummarizer) Min(attr string, filter *roaring.Bitmap) (interface{}, error) + func (s *SegmentSummarizer) NullCount(attr string, filter *roaring.Bitmap) (uint64, error) + func (s *SegmentSummarizer) Sum(attr string, filter *roaring.Bitmap) (int64, uint64, error) + type Snapshoter interface + type Splitter struct + func NewSplitter(database *metadata.Database, newDBNames []string, rename RenameTableFactory, ...) *Splitter + func (splitter *Splitter) Close() error + func (splitter *Splitter) Commit() error + func (splitter *Splitter) Prepare() error + func (splitter *Splitter) ScheduleEvents(d *DB) error + type TableSchema = metadata.Schema + type TxnCtx = metadata.TxnCtx