Documentation ¶
Index ¶
- func CreateIndex[T indexer.ValidType](m *IndexManager, columnName string, indexType indexer.IndexType) error
- type IndexManager
- func (m *IndexManager) Add(columnName string, id string, value interface{}) bool
- func (m *IndexManager) PersistToDisk(segmentID, partitionStart, partitionEnd string) error
- func (m *IndexManager) QueryIndex(columnName string, value interface{}) []uint32
- func (m *IndexManager) UnmarshalJSON(data []byte) error
- type SegmentManager
- type StarTreeIndexManager
- type TableManager
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) 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 (*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
Click to show internal directories.
Click to hide internal directories.