Documentation ¶
Index ¶
- Constants
- func BuildBootstrapIndexSegment(ns namespace.Metadata, requestedRanges result.ShardTimeRanges, ...) (result.IndexBlock, error)
- func EnqueueReaders(ns namespace.Metadata, runOpts bootstrap.RunOptions, ...)
- func GetDefaultIndexBlockForBlockStart(results result.IndexResults, blockStart time.Time) (result.IndexBlock, bool)
- func NewBaseBootstrapper(name string, src bootstrap.Source, opts result.Options, ...) (bootstrap.Bootstrapper, error)
- func NewNoOpAllBootstrapperProvider() bootstrap.BootstrapperProvider
- func NewNoOpNoneBootstrapperProvider() bootstrap.BootstrapperProvider
- func PersistBootstrapIndexSegment(ns namespace.Metadata, requestedRanges result.ShardTimeRanges, ...) (result.IndexBlock, error)
- type NewReaderPoolOptions
- type ReaderPool
- type ReaderPoolAllocFn
- type Segment
- type ShardID
- type ShardReaders
- type ShardTimeRangesTimeWindowGroup
- type SharedCompactor
- type SharedPersistManager
- type TimeWindowReaders
Constants ¶
const ( // NoOpNoneBootstrapperName is the name of the noOpNoneBootstrapper NoOpNoneBootstrapperName = "noop-none" // NoOpAllBootstrapperName is the name of the noOpAllBootstrapperProvider NoOpAllBootstrapperName = "noop-all" )
Variables ¶
This section is empty.
Functions ¶
func BuildBootstrapIndexSegment ¶ added in v0.15.0
func BuildBootstrapIndexSegment( ns namespace.Metadata, requestedRanges result.ShardTimeRanges, builder segment.DocumentsBuilder, compactor *SharedCompactor, resultOpts result.Options, mmapReporter mmap.Reporter, blockStart time.Time, blockEnd time.Time, ) (result.IndexBlock, error)
BuildBootstrapIndexSegment is a helper function that builds (in memory) bootstrapped index segments for a ns -> block of time.
func EnqueueReaders ¶ added in v0.15.0
func EnqueueReaders( ns namespace.Metadata, runOpts bootstrap.RunOptions, runtimeOpts runtime.Options, fsOpts fs.Options, shardsTimeRanges result.ShardTimeRanges, readerPool *ReaderPool, readersCh chan<- TimeWindowReaders, blockSize time.Duration, logger *zap.Logger, )
EnqueueReaders into a readers channel grouped by data block.
func GetDefaultIndexBlockForBlockStart ¶ added in v0.15.0
func GetDefaultIndexBlockForBlockStart( results result.IndexResults, blockStart time.Time, ) (result.IndexBlock, bool)
GetDefaultIndexBlockForBlockStart gets the index block for the default volume type from the index results.
func NewBaseBootstrapper ¶
func NewBaseBootstrapper( name string, src bootstrap.Source, opts result.Options, next bootstrap.Bootstrapper, ) (bootstrap.Bootstrapper, error)
NewBaseBootstrapper creates a new base bootstrapper.
func NewNoOpAllBootstrapperProvider ¶
func NewNoOpAllBootstrapperProvider() bootstrap.BootstrapperProvider
NewNoOpAllBootstrapperProvider creates a new noOpAllBootstrapperProvider.
func NewNoOpNoneBootstrapperProvider ¶
func NewNoOpNoneBootstrapperProvider() bootstrap.BootstrapperProvider
NewNoOpNoneBootstrapperProvider creates a new noOpNoneBootstrapper.
func PersistBootstrapIndexSegment ¶ added in v0.15.0
func PersistBootstrapIndexSegment( ns namespace.Metadata, requestedRanges result.ShardTimeRanges, builder segment.DocumentsBuilder, persistManager *SharedPersistManager, resultOpts result.Options, fulfilled result.ShardTimeRanges, blockStart time.Time, blockEnd time.Time, ) (result.IndexBlock, error)
PersistBootstrapIndexSegment is a helper function that persists bootstrapped index segments for a ns -> block of time.
Types ¶
type NewReaderPoolOptions ¶ added in v0.15.0
type NewReaderPoolOptions struct { Alloc ReaderPoolAllocFn DisableReuse bool }
NewReaderPoolOptions contains reader pool options.
type ReaderPool ¶ added in v0.15.0
ReaderPool is a lean pool that does not allocate instances up front and is used per bootstrap call.
func NewReaderPool ¶ added in v0.15.0
func NewReaderPool( opts NewReaderPoolOptions, ) *ReaderPool
NewReaderPool creates a new share-able fileset reader pool
func (*ReaderPool) Get ¶ added in v0.15.0
func (p *ReaderPool) Get() (fs.DataFileSetReader, error)
Get gets a fileset reader from the pool in synchronized fashion.
func (*ReaderPool) Put ¶ added in v0.15.0
func (p *ReaderPool) Put(r fs.DataFileSetReader)
Put returns a fileset reader back the the pool in synchronized fashion.
type ReaderPoolAllocFn ¶ added in v0.15.0
type ReaderPoolAllocFn func() (fs.DataFileSetReader, error)
ReaderPoolAllocFn allocates a new fileset reader.
type Segment ¶ added in v0.15.0
Segment wraps an index segment so we can easily determine whether or not the segment is persisted to disk.
func NewSegment ¶ added in v0.15.0
NewSegment returns an index segment w/ persistence metadata.
func (*Segment) IsPersisted ¶ added in v0.15.0
IsPersisted returns whether or not the underlying segment was persisted to disk.
type ShardReaders ¶ added in v0.15.0
type ShardReaders struct {
Readers []fs.DataFileSetReader
}
ShardReaders are the fileset readers for a shard.
type ShardTimeRangesTimeWindowGroup ¶ added in v0.15.0
type ShardTimeRangesTimeWindowGroup struct { Ranges result.ShardTimeRanges // contains filtered or unexported fields }
ShardTimeRangesTimeWindowGroup represents all time ranges for every shard w/in a block of time.
func NewShardTimeRangesTimeWindowGroups ¶ added in v0.15.0
func NewShardTimeRangesTimeWindowGroups( shardTimeRanges result.ShardTimeRanges, windowSize time.Duration, ) []ShardTimeRangesTimeWindowGroup
NewShardTimeRangesTimeWindowGroups divides shard time ranges into grouped blocks.
type SharedCompactor ¶ added in v0.15.0
type SharedCompactor struct {}
SharedCompactor is a lockable compactor that's safe to be shared across threads.
type SharedPersistManager ¶ added in v0.15.0
type SharedPersistManager struct {}
SharedPersistManager is a lockable persist manager that's safe to be shared across threads.
type TimeWindowReaders ¶ added in v0.15.0
type TimeWindowReaders struct { Ranges result.ShardTimeRanges Readers map[ShardID]ShardReaders }
TimeWindowReaders are grouped by data block.