Documentation ¶
Index ¶
- Constants
- func CreateVector(ctx context.Context, engine storage.Engine, path *storage.URI, id ksuid.KSUID) error
- func DeleteVector(ctx context.Context, engine storage.Engine, path *storage.URI, id ksuid.KSUID) error
- func LookupSeekRange(ctx context.Context, engine storage.Engine, path *storage.URI, obj *Object, ...) ([]seekindex.Range, error)
- func RangeFromBitVector(ctx context.Context, engine storage.Engine, path *storage.URI, o *Object, ...) ([]seekindex.Range, error)
- func SeekIndexURI(path *storage.URI, id ksuid.KSUID) *storage.URI
- func SequenceURI(path *storage.URI, id ksuid.KSUID) *storage.URI
- func VectorURI(path *storage.URI, id ksuid.KSUID) *storage.URI
- type FileKind
- type Object
- func (o *Object) Equal(to *Object) bool
- func (o Object) IsZero() bool
- func (o *Object) NewReader(ctx context.Context, engine storage.Engine, path *storage.URI, ...) (*Reader, error)
- func (o *Object) NewVectorWriter(ctx context.Context, engine storage.Engine, path *storage.URI) (*VectorWriter, error)
- func (o *Object) NewWriter(ctx context.Context, engine storage.Engine, path *storage.URI, ...) (*Writer, error)
- func (o Object) ObjectPrefix(path *storage.URI) *storage.URI
- func (o Object) Remove(ctx context.Context, engine storage.Engine, path *storage.URI) error
- func (o Object) SeekIndexURI(path *storage.URI) *storage.URI
- func (o Object) SequenceURI(path *storage.URI) *storage.URI
- func (o Object) Span(order order.Which) *extent.Generic
- func (o Object) String() string
- func (o Object) VectorURI(path *storage.URI) *storage.URI
- type Reader
- type VectorWriter
- type Writer
Constants ¶
const ( DefaultSeekStride = 64 * 1024 DefaultThreshold = 500 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func CreateVector ¶ added in v1.2.0
func CreateVector(ctx context.Context, engine storage.Engine, path *storage.URI, id ksuid.KSUID) error
CreateVector writes the vectorized form of an existing Object in the VNG format.
func DeleteVector ¶ added in v1.2.0
func LookupSeekRange ¶ added in v1.3.0
func RangeFromBitVector ¶ added in v1.15.0
func SeekIndexURI ¶ added in v1.8.0
Types ¶
type FileKind ¶
type FileKind string
A FileKind is the first part of a file name, used to differentiate files when they are listed from the archive's backing store.
func (FileKind) Description ¶
type Object ¶
type Object struct { ID ksuid.KSUID `zed:"id"` Min zed.Value `zed:"min"` Max zed.Value `zed:"max"` Count uint64 `zed:"count"` Size int64 `zed:"size"` }
An Object represents a cloud object or file that holds an ordered sequence of Zed values sorted according to the pool's data order where From is the the first value in the sequence and To is the last value. Count is the number of values in the sequence and Size is total size in bytes of the Object as persisted to storage (i.e., its compressed size).
func (*Object) NewReader ¶
func (o *Object) NewReader(ctx context.Context, engine storage.Engine, path *storage.URI, ranges []seekindex.Range) (*Reader, error)
NewReader returns a Reader for this data object. If the object has a seek index and if the provided span skips part of the object, the seek index will be used to limit the reading window of the returned reader.
func (*Object) NewVectorWriter ¶ added in v1.10.0
func (*Object) NewWriter ¶
func (o *Object) NewWriter(ctx context.Context, engine storage.Engine, path *storage.URI, sortKey order.SortKey, seekIndexStride int) (*Writer, error)
NewWriter returns a writer for writing the data of a zng-row storage object as well as optionally creating a seek index for the row object when the seekIndexStride is non-zero. We assume all records are non-volatile until Close as zed.Values from the various record bodies are referenced across calls to Write.
func (Object) ObjectPrefix ¶
ObjectPrefix returns a prefix for the various objects that comprise a data object so they can all be deleted with the storage engine's DeleteByPrefix method.
func (Object) Remove ¶
Remove deletes the row object and its seek index. Any 'not found' errors are ignored.
func (Object) SeekIndexURI ¶ added in v1.2.0
func (Object) SequenceURI ¶ added in v1.2.0
type VectorWriter ¶ added in v1.10.0
func NewVectorWriter ¶ added in v1.10.0
func (*VectorWriter) Abort ¶ added in v1.10.0
func (w *VectorWriter) Abort()
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is a zio.Writer that writes a stream of sorted records into a data object.
func (*Writer) Abort ¶
func (w *Writer) Abort()
Abort is called when an error occurs during write. Errors are ignored because the write error will be more informative and should be returned.
func (*Writer) BytesWritten ¶
func (*Writer) Object ¶
Object returns the Object written by the writer. This is only valid after Close() has returned a nil error.