Documentation ¶
Index ¶
- Constants
- Variables
- func CreateBranch(ctx context.Context, engine storage.Engine, logger *zap.Logger, ...) (*branches.Config, error)
- func CreatePool(ctx context.Context, engine storage.Engine, logger *zap.Logger, ...) error
- func DataPath(poolPath *storage.URI) *storage.URI
- func ImportComparator(zctx *zed.Context, pool *Pool) *expr.Comparator
- func RemovePool(ctx context.Context, engine storage.Engine, root *storage.URI, ...) error
- type Branch
- func (b *Branch) AddVectors(ctx context.Context, ids []ksuid.KSUID, author, message string) (ksuid.KSUID, error)
- func (b *Branch) CommitCompact(ctx context.Context, src, rollup []*data.Object, rollupVecs []ksuid.KSUID, ...) (ksuid.KSUID, error)
- func (b *Branch) Delete(ctx context.Context, ids []ksuid.KSUID, author, message string) (ksuid.KSUID, error)
- func (b *Branch) DeleteVectors(ctx context.Context, ids []ksuid.KSUID, author, message string) (ksuid.KSUID, error)
- func (b *Branch) DeleteWhere(ctx context.Context, c runtime.Compiler, program ast.Seq, ...) (ksuid.KSUID, error)
- func (b *Branch) Load(ctx context.Context, zctx *zed.Context, r zio.Reader, ...) (ksuid.KSUID, error)
- func (b *Branch) LookupTags(ctx context.Context, tags []ksuid.KSUID) ([]ksuid.KSUID, error)
- func (b *Branch) Pool() *Pool
- func (b *Branch) Revert(ctx context.Context, commit ksuid.KSUID, author, message string) (ksuid.KSUID, error)
- type BranchMeta
- type BranchTip
- type ImportStats
- type LakeMagic
- type Pool
- func (p *Pool) BatchifyBranchTips(ctx context.Context, zctx *zed.Context, f expr.Evaluator) ([]zed.Value, error)
- func (p *Pool) BatchifyBranches(ctx context.Context, zctx *zed.Context, recs []zed.Value, ...) ([]zed.Value, error)
- func (p *Pool) ListBranches(ctx context.Context) ([]branches.Config, error)
- func (p *Pool) LookupBranchByName(ctx context.Context, name string) (*branches.Config, error)
- func (p *Pool) Main(ctx context.Context) (BranchMeta, error)
- func (p *Pool) ObjectExists(ctx context.Context, id ksuid.KSUID) (bool, error)
- func (p *Pool) OpenBranchByName(ctx context.Context, name string) (*Branch, error)
- func (p *Pool) OpenCommitLog(ctx context.Context, zctx *zed.Context, commit ksuid.KSUID) zio.Reader
- func (p *Pool) OpenCommitLogAsZNG(ctx context.Context, zctx *zed.Context, commit ksuid.KSUID) (*zngio.Reader, error)
- func (p *Pool) ResolveRevision(ctx context.Context, revision string) (ksuid.KSUID, error)
- func (p *Pool) Snapshot(ctx context.Context, commit ksuid.KSUID) (commits.View, error)
- func (p *Pool) Storage() storage.Engine
- func (p *Pool) Vacuum(ctx context.Context, commit ksuid.KSUID, dryrun bool) ([]ksuid.KSUID, error)
- type Root
- func (r *Root) BatchifyBranches(ctx context.Context, zctx *zed.Context, f expr.Evaluator) ([]zed.Value, error)
- func (r *Root) BatchifyPools(ctx context.Context, zctx *zed.Context, f expr.Evaluator) ([]zed.Value, error)
- func (r *Root) CommitObject(ctx context.Context, poolID ksuid.KSUID, branchName string) (ksuid.KSUID, error)
- func (r *Root) CreateBranch(ctx context.Context, poolID ksuid.KSUID, name string, parent ksuid.KSUID) (*branches.Config, error)
- func (r *Root) CreatePool(ctx context.Context, name string, sortKeys order.SortKeys, seekStride int, ...) (*Pool, error)
- func (r *Root) ListPools(ctx context.Context) ([]pools.Config, error)
- func (r *Root) MergeBranch(ctx context.Context, poolID ksuid.KSUID, ...) (ksuid.KSUID, error)
- func (r *Root) Open(context.Context, *zed.Context, string, string, zbuf.Filter) (zbuf.Puller, error)
- func (r *Root) OpenPool(ctx context.Context, id ksuid.KSUID) (*Pool, error)
- func (r *Root) PoolID(ctx context.Context, poolName string) (ksuid.KSUID, error)
- func (r *Root) RemoveBranch(ctx context.Context, poolID ksuid.KSUID, name string) error
- func (r *Root) RemovePool(ctx context.Context, id ksuid.KSUID) error
- func (r *Root) RenamePool(ctx context.Context, id ksuid.KSUID, newName string) error
- func (r *Root) Revert(ctx context.Context, poolID ksuid.KSUID, branchName string, ...) (ksuid.KSUID, error)
- func (r *Root) SortKeys(ctx context.Context, src dag.Op) order.SortKeys
- func (r *Root) VectorCache() *vcache.Cache
- type SortedWriter
- type Writer
Constants ¶
const ( DataTag = "data" BranchesTag = "branches" CommitsTag = "commits" )
const ( Version = 3 PoolsTag = "pools" LakeMagicFile = "lake.zng" LakeMagicString = "ZED LAKE" )
Variables ¶
var ( ErrCommitFailed = fmt.Errorf("exceeded max update attempts (%d) to branch tip: commit failed", maxCommitRetries) ErrInvalidCommitMeta = errors.New("cannot parse ZSON string") )
var ( ErrExist = errors.New("lake already exists") ErrNotExist = errors.New("lake does not exist") )
Functions ¶
func CreateBranch ¶
func CreatePool ¶
func ImportComparator ¶ added in v1.2.0
func ImportComparator(zctx *zed.Context, pool *Pool) *expr.Comparator
Types ¶
type Branch ¶
func OpenBranch ¶
func (*Branch) AddVectors ¶ added in v1.3.0
func (*Branch) CommitCompact ¶ added in v1.2.0
func (*Branch) DeleteVectors ¶ added in v1.3.0
func (*Branch) DeleteWhere ¶ added in v1.3.0
func (*Branch) LookupTags ¶
type BranchMeta ¶
type ImportStats ¶
func (*ImportStats) Accumulate ¶
func (s *ImportStats) Accumulate(b ImportStats)
func (*ImportStats) Copy ¶
func (s *ImportStats) Copy() ImportStats
type Pool ¶
type Pool struct { pools.Config Path *storage.URI DataPath *storage.URI // contains filtered or unexported fields }
func (*Pool) BatchifyBranchTips ¶ added in v1.2.0
func (*Pool) BatchifyBranches ¶ added in v1.2.0
func (*Pool) ListBranches ¶
func (*Pool) LookupBranchByName ¶
func (*Pool) ObjectExists ¶
XXX this is inefficient but is only meant for interactive queries...?
func (*Pool) OpenBranchByName ¶
func (*Pool) OpenCommitLog ¶ added in v1.2.0
func (*Pool) OpenCommitLogAsZNG ¶ added in v1.2.0
func (*Pool) ResolveRevision ¶ added in v1.8.0
ResolveRevision returns the commit id for revision. revision can be either a commit ID in string form or a branch name.
type Root ¶
type Root struct {
// contains filtered or unexported fields
}
The Root of the lake represents the path prefix and configuration state for all of the data pools in the lake.
func CreateOrOpen ¶
func (*Root) BatchifyBranches ¶ added in v1.2.0
func (*Root) BatchifyPools ¶ added in v1.2.0
func (*Root) CommitObject ¶
func (*Root) CreateBranch ¶
func (*Root) CreatePool ¶
func (*Root) MergeBranch ¶
func (r *Root) MergeBranch(ctx context.Context, poolID ksuid.KSUID, childBranch, parentBranch, author, message string) (ksuid.KSUID, error)
MergeBranch merges the indicated branch into its parent returning the commit tag of the new commit into the parent branch.
func (*Root) RemoveBranch ¶
func (*Root) RemovePool ¶
RemovePool deletes a pool from the configuration journal and deletes all data associated with the pool.
func (*Root) RenamePool ¶
func (*Root) VectorCache ¶ added in v1.12.0
type SortedWriter ¶ added in v1.2.0
type SortedWriter struct {
// contains filtered or unexported fields
}
func NewSortedWriter ¶ added in v1.2.0
func (*SortedWriter) Abort ¶ added in v1.2.0
func (w *SortedWriter) Abort()
func (*SortedWriter) Close ¶ added in v1.2.0
func (w *SortedWriter) Close() error
func (*SortedWriter) Objects ¶ added in v1.2.0
func (w *SortedWriter) Objects() []*data.Object
func (*SortedWriter) Vectors ¶ added in v1.10.0
func (w *SortedWriter) Vectors() []ksuid.KSUID
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is a zio.Writer that consumes records into memory according to the pools data object threshold, sorts each resulting buffer, and writes it as an immutable object to the storage system. The presumption is that each buffer's worth of data fits into memory.
func NewWriter ¶
NewWriter creates a zio.Writer compliant writer for writing data to an a data pool presuming the input is not guaranteed to be sorted. XXX we should make another writer that takes sorted input and is a bit more efficient. This other writer could have different commit triggers to do useful things like paritioning given the context is a rollup.
func (*Writer) Stats ¶
func (w *Writer) Stats() ImportStats