batch

package module
v1.22.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

batch

Documentation

Index

Constants

View Source
const (
	Timestamp uint64 = iota
	Labels
	Value
)
View Source
const (
	Quantum = quantum.TimeQuantum("YMDH")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	// contains filtered or unexported fields
}

func New

func New() *Batch

func (*Batch) Add

func (b *Batch) Add(id uint64, ts time.Time, labels [][]byte, value float64)

func (*Batch) Build

func (b *Batch) Build() (Fragments, error)

func (*Batch) Reset

func (b *Batch) Reset()

func (*Batch) WithTranslator

func (b *Batch) WithTranslator(t Translator) *Batch

type FragmentKey

type FragmentKey struct {
	Shard uint64
	Field uint64
}

func (*FragmentKey) Compare added in v1.22.5

func (f *FragmentKey) Compare(o *FragmentKey) int

type Fragments

type Fragments map[FragmentKey]map[string]*roaring.Bitmap

func (Fragments) DeleteView

func (f Fragments) DeleteView(shard uint64, field uint64, view string)

func (Fragments) GetOrCreate

func (f Fragments) GetOrCreate(shard uint64, field uint64, view string) *roaring.Bitmap

func (Fragments) GetViewMap

func (f Fragments) GetViewMap(shard uint64, field uint64) map[string]*roaring.Bitmap

func (Fragments) String added in v1.22.5

func (f Fragments) String() string

type QuantizedTime added in v1.22.5

type QuantizedTime struct {
	// contains filtered or unexported fields
}

QuantizedTime represents a moment in time down to some granularity (year, month, day, or hour).

func NeqQuantumTime added in v1.22.5

func NeqQuantumTime() *QuantizedTime

func (*QuantizedTime) Clone added in v1.22.5

func (q *QuantizedTime) Clone() *QuantizedTime

func (*QuantizedTime) Release added in v1.22.5

func (q *QuantizedTime) Release()

func (*QuantizedTime) Reset added in v1.22.5

func (q *QuantizedTime) Reset()

func (*QuantizedTime) Set added in v1.22.5

func (qt *QuantizedTime) Set(t time.Time)

Set sets the Quantized time to the given timestamp (down to hour granularity).

func (*QuantizedTime) SetDay added in v1.22.5

func (qt *QuantizedTime) SetDay(day string)

SetDay sets the QuantizedTime's day, but leaves year, month, and hour untouched.

func (*QuantizedTime) SetHour added in v1.22.5

func (qt *QuantizedTime) SetHour(hour string)

SetHour sets the QuantizedTime's hour, but leaves year, month, and day untouched.

func (*QuantizedTime) SetMonth added in v1.22.5

func (qt *QuantizedTime) SetMonth(month string)

SetMonth sets the QuantizedTime's month, but leaves year, day, and hour untouched.

func (*QuantizedTime) SetYear added in v1.22.5

func (qt *QuantizedTime) SetYear(year string)

SetYear sets the quantized time's year, but leaves month, day, and hour untouched.

func (*QuantizedTime) Time added in v1.22.5

func (qt *QuantizedTime) Time() (time.Time, error)

func (*QuantizedTime) Views added in v1.22.5

func (qt *QuantizedTime) Views(q quantum.TimeQuantum) ([]string, error)

Views builds the list of Pilosa Views for this particular time, given a quantum.

type Translator

type Translator interface {
	Translate(column uint64, value []byte) uint64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址