config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OrderAttrs16ByVariants = map[string]OrderAttrs16By{
	"":                         OrderAttrs16ByNothing,
	"parent_id,key,value":      OrderAttrs16ByParentIdKeyValue,
	"type,key,parent_id,value": OrderAttrs16ByTypeKeyParentIdValue,
	"type,key,value,parent_id": OrderAttrs16ByTypeKeyValueParentId,
}

OrderAttrs16ByVariants is a map of string to OrderAttrs16By. It is used to iterate over the possible values of OrderAttrs16By. This map must be kept in sync with the OrderAttrs16By enumeration.

View Source
var OrderAttrs32ByVariants = map[string]OrderAttrs32By{
	"":                         OrderAttrs32ByNothing,
	"type,parent_id,key,value": OrderAttrs32ByTypeParentIdKeyValue,
	"type,key,parent_id,value": OrderAttrs32ByTypeKeyParentIdValue,
	"type,key,value,parent_id": OrderAttrs32ByTypeKeyValueParentId,
	"key,value,parent_id":      OrderAttrs32ByKeyValueParentId,
}

OrderAttrs32ByVariants is a map of string to OrderAttrs32By. It is used to iterate over the possible values of OrderAttrs32By. This map must be kept in sync with the OrderAttrs32By enumeration.

View Source
var OrderSpanByVariants = map[string]OrderSpanBy{
	"":                         OrderSpanByNothing,
	"name,trace_id":            OrderSpanByNameTraceID,
	"trace_id,name":            OrderSpanByTraceIDName,
	"name,start_time":          OrderSpanByNameStartTime,
	"name,trace_id,start_time": OrderSpanByNameTraceIdStartTime,
	"start_time,trace_id,name": OrderSpanByStartTimeTraceIDName,
	"start_time,name,trace_id": OrderSpanByStartTimeNameTraceID,
}

OrderSpanByVariants is a map of string to OrderSpanBy. It is used to iterate over the possible values of OrderSpanBy. This map must be kept in sync with the OrderSpanBy enumeration.

Functions

This section is empty.

Types

type Config

type Config struct {
	Pool memory.Allocator

	// InitIndexSize sets the initial size of a dictionary index.
	InitIndexSize uint64
	// LimitIndexSize sets the maximum size of a dictionary index
	// before it is no longer encoded as a dictionary.
	LimitIndexSize uint64
	// Zstd enables the use of ZSTD compression for IPC messages.
	Zstd bool // Use IPC ZSTD compression

	// SchemaStats enables the collection of statistics about Arrow schemas.
	SchemaStats bool
	// RecordStats enables the collection of statistics about Arrow records.
	RecordStats bool
	// Display schema updates
	SchemaUpdates bool
	// Display producer statistics
	ProducerStats bool
	// Display compression ratio statistics
	CompressionRatioStats bool
	// DumpRecordRows specifies the number of rows to dump for each record.
	// If not defined or set to 0, no rows are dumped.
	DumpRecordRows map[string]int

	// OrderSpanBy specifies how to order spans in a batch.
	OrderSpanBy OrderSpanBy
	// OrderAttrs16By specifies how to order attributes in a batch
	// (with 16bits attribute ID).
	OrderAttrs16By OrderAttrs16By
	// OrderAttrs32By specifies how to order attributes in a batch
	// (with 32bits attribute ID).
	OrderAttrs32By OrderAttrs32By
}

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a Config with the following default values:

  • Pool: memory.NewGoAllocator()
  • InitIndexSize: math.MaxUint16
  • LimitIndexSize: math.MaxUint32
  • SchemaStats: false
  • Zstd: true

type Option

type Option func(*Config)

func WithAllocator

func WithAllocator(allocator memory.Allocator) Option

WithAllocator sets the allocator to use for the Producer.

func WithCompressionRatioStats added in v0.5.0

func WithCompressionRatioStats() Option

WithCompressionRatioStats enables the display of compression ratio statistics.

func WithDumpRecordRows added in v0.5.0

func WithDumpRecordRows(payloadType string, numRows int) Option

WithDumpRecordRows specifies the number of rows to dump for a specific payload type.

func WithNoDictionary

func WithNoDictionary() Option

WithNoDictionary sets the Producer to not use dictionary encoding.

func WithNoZstd

func WithNoZstd() Option

WithNoZstd sets the Producer to not use Zstd compression at the Arrow IPC level.

func WithOrderAttrs16By added in v0.5.0

func WithOrderAttrs16By(orderAttrs16By OrderAttrs16By) Option

WithOrderAttrs16By specifies how to order attributes in a batch (with 16bits attribute ID).

func WithOrderAttrs32By added in v0.5.0

func WithOrderAttrs32By(orderAttrs32By OrderAttrs32By) Option

WithOrderAttrs32By specifies how to order attributes in a batch (with 32bits attribute ID).

func WithOrderSpanBy added in v0.5.0

func WithOrderSpanBy(orderSpanBy OrderSpanBy) Option

WithOrderSpanBy specifies how to order spans in a batch.

func WithProducerStats added in v0.5.0

func WithProducerStats() Option

WithProducerStats enables the display of producer statistics.

func WithRecordStats added in v0.5.0

func WithRecordStats() Option

WithRecordStats enables the collection of statistics about Arrow records.

func WithSchemaStats added in v0.5.0

func WithSchemaStats() Option

WithSchemaStats enables the collection of statistics about Arrow schemas.

func WithSchemaUpdates added in v0.5.0

func WithSchemaUpdates() Option

WithSchemaUpdates enables the display of schema updates.

func WithUint16InitDictIndex

func WithUint16InitDictIndex() Option

WithUint16InitDictIndex sets the Producer to use an uint16 index for all dictionaries.

func WithUint16LimitDictIndex

func WithUint16LimitDictIndex() Option

WithUint16LimitDictIndex sets the Producer to fall back to non dictionary encoding if the dictionary size exceeds an uint16 index.

func WithUint32LimitDictIndex

func WithUint32LimitDictIndex() Option

WithUint32LimitDictIndex sets the Producer to fall back to non dictionary encoding if the dictionary size exceeds an uint32 index.

func WithUint32LinitDictIndex

func WithUint32LinitDictIndex() Option

WithUint32LinitDictIndex sets the Producer to use an uint32 index for all dictionaries.

func WithUint64InitDictIndex

func WithUint64InitDictIndex() Option

WithUint64InitDictIndex sets the Producer to use an uint64 index for all dictionaries.

func WithUint64LimitDictIndex

func WithUint64LimitDictIndex() Option

WithUint64LimitDictIndex sets the Producer to fall back to non dictionary encoding if the dictionary size exceeds an uint64 index.

func WithUint8InitDictIndex

func WithUint8InitDictIndex() Option

WithUint8InitDictIndex sets the Producer to use an uint8 index for all dictionaries.

func WithUint8LimitDictIndex

func WithUint8LimitDictIndex() Option

WithUint8LimitDictIndex sets the Producer to fall back to non dictionary encoding if the dictionary size exceeds an uint8 index.

func WithZstd

func WithZstd() Option

WithZstd sets the Producer to use Zstd compression at the Arrow IPC level.

type OrderAttrs16By added in v0.5.0

type OrderAttrs16By int8
const (
	OrderAttrs16ByNothing OrderAttrs16By = iota
	OrderAttrs16ByParentIdKeyValue
	OrderAttrs16ByTypeKeyParentIdValue
	OrderAttrs16ByTypeKeyValueParentId
)

Enumeration defining how to order attributes in a batch (with 16bits attribute ID).

type OrderAttrs32By added in v0.5.0

type OrderAttrs32By int8
const (
	OrderAttrs32ByNothing OrderAttrs32By = iota
	OrderAttrs32ByTypeParentIdKeyValue
	OrderAttrs32ByTypeKeyParentIdValue
	OrderAttrs32ByTypeKeyValueParentId
	OrderAttrs32ByKeyValueParentId
)

Enumeration defining how to order attributes in a batch (with 32bits attribute ID).

type OrderSpanBy added in v0.5.0

type OrderSpanBy int8
const (
	OrderSpanByNothing OrderSpanBy = iota
	OrderSpanByNameTraceID
	OrderSpanByTraceIDName
	OrderSpanByNameStartTime
	OrderSpanByNameTraceIdStartTime
	OrderSpanByStartTimeTraceIDName
	OrderSpanByStartTimeNameTraceID
)

Enumeration defining how to order spans in a batch.

Jump to

Keyboard shortcuts

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