manager

package
v0.0.0-...-bbf0bf7 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateIndex

func CreateIndex[T indexer.ValidType](m *IndexManager, columnName string, indexType indexer.IndexType) error

CreateIndex is needed to be designed this way to avoid many complications in type casting and generics

Types

type IndexManager

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

func NewIndexManager

func NewIndexManager(dir string) *IndexManager

func ReadIndexFile

func ReadIndexFile(dir string) (*IndexManager, error)

func (*IndexManager) Add

func (m *IndexManager) Add(columnName string, id string, value interface{}) bool

func (*IndexManager) PersistToDisk

func (m *IndexManager) PersistToDisk(segmentID, partitionStart, partitionEnd string) error

func (*IndexManager) QueryIndex

func (m *IndexManager) QueryIndex(columnName string, value interface{}) []uint32

func (*IndexManager) UnmarshalJSON

func (m *IndexManager) UnmarshalJSON(data []byte) error

type SegmentManager

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

func NewSegmentManager

func NewSegmentManager(tableName, baseDir string, interval time.Duration) (*SegmentManager, error)

func (*SegmentManager) AppendData

func (s *SegmentManager) AppendData(event map[string]interface{}, datetimeFieldName string, granularityUnit time.Duration) (string, error)

AppendData appends to the apache arrow record the incoming data. It returns the EventID if everything is successful

func (*SegmentManager) Create

func (s *SegmentManager) Create(schema *arrow.Schema) error

func (*SegmentManager) Flush

func (s *SegmentManager) Flush() error

type StarTreeIndexManager

type StarTreeIndexManager[T startreeindex.ValidTypes] struct {
	// contains filtered or unexported fields
}

func NewStarTreeIndexManager

func NewStarTreeIndexManager[T startreeindex.ValidTypes](dir string) *StarTreeIndexManager[T]

func (*StarTreeIndexManager[T]) ProcessEvent

func (s *StarTreeIndexManager[T]) ProcessEvent(event map[string]interface{}, dimensions []string) error

type TableManager

type TableManager struct {
	Table          *entities.Table
	SegmentManager *SegmentManager
	IndexManager   *IndexManager
	// contains filtered or unexported fields
}

func NewTableManager

func NewTableManager(table *entities.Table, indexes map[indexer.IndexType][]string) (*TableManager, error)

func (*TableManager) CreateNewSegment

func (t *TableManager) CreateNewSegment() error

func (*TableManager) FlushSegment

func (t *TableManager) FlushSegment() error

FlushSegment first persist on disk the current segment secondly, it compresses the segment to save space and lastly it reset the memory object so that it can start over

func (*TableManager) InsertData

func (t *TableManager) InsertData(data []byte) error

Jump to

Keyboard shortcuts

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