Documentation
¶
Index ¶
- Variables
- type BinaryStore
- type Element
- func (*Element) Descriptor() ([]byte, []int)
- func (m *Element) GetTimestamp() int64
- func (m *Element) GetValue() float64
- func (m *Element) Marshal() (dAtA []byte, err error)
- func (m *Element) MarshalTo(dAtA []byte) (int, error)
- func (m *Element) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Element) ProtoMessage()
- func (m *Element) Reset()
- func (m *Element) Size() (n int)
- func (m *Element) String() string
- func (m *Element) Unmarshal(dAtA []byte) error
- func (m *Element) XXX_DiscardUnknown()
- func (m *Element) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Element) XXX_Merge(src proto.Message)
- func (m *Element) XXX_Size() int
- func (m *Element) XXX_Unmarshal(b []byte) error
- type Elements
- func (*Elements) Descriptor() ([]byte, []int)
- func (m *Elements) GetData() []Element
- func (m *Elements) Marshal() (dAtA []byte, err error)
- func (m *Elements) MarshalTo(dAtA []byte) (int, error)
- func (m *Elements) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Elements) ProtoMessage()
- func (m *Elements) Reset()
- func (m *Elements) Size() (n int)
- func (m *Elements) String() string
- func (m *Elements) Unmarshal(dAtA []byte) error
- func (m *Elements) XXX_DiscardUnknown()
- func (m *Elements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Elements) XXX_Merge(src proto.Message)
- func (m *Elements) XXX_Size() int
- func (m *Elements) XXX_Unmarshal(b []byte) error
- type GobStore
- type Index
- type ParquetStore
- type ProtoStore
- type Store
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BinaryStore ¶
type BinaryStore struct {
// contains filtered or unexported fields
}
BinaryStore is an implementation of Store that serializes input time series into binary representation by calculating deltas of timestamps and values and placing them one after another.
type Element ¶
type Element struct { Timestamp int64 `protobuf:"varint,1,req,name=timestamp" json:"timestamp"` Value float64 `protobuf:"fixed64,2,req,name=value" json:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func GenerateData ¶
GenerateData is a simple function for creating datasets that are used in stores benchmarking.
func (*Element) Descriptor ¶
func (*Element) GetTimestamp ¶
func (*Element) MarshalToSizedBuffer ¶
func (*Element) ProtoMessage ¶
func (*Element) ProtoMessage()
func (*Element) XXX_DiscardUnknown ¶
func (m *Element) XXX_DiscardUnknown()
func (*Element) XXX_Marshal ¶
func (*Element) XXX_Unmarshal ¶
type Elements ¶
type Elements struct { Data []Element `protobuf:"bytes,1,rep,name=data" json:"data"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Elements) Descriptor ¶
func (*Elements) MarshalToSizedBuffer ¶
func (*Elements) ProtoMessage ¶
func (*Elements) ProtoMessage()
func (*Elements) XXX_DiscardUnknown ¶
func (m *Elements) XXX_DiscardUnknown()
func (*Elements) XXX_Marshal ¶
func (*Elements) XXX_Unmarshal ¶
type GobStore ¶
type GobStore struct {
// contains filtered or unexported fields
}
GobStore is an implementation of Store that serializes data parts into gob binary form.
type Index ¶
Index is data structure that implements indexing logic for a time series database.
ID - name of the sensor. StartTime - Unix timestamp of the first entry in the index. BlockInterval - time interval for blocks generation. Store - backend storage that is responsible for data serialization and deserialization. Blocks - is a slice of index blocks. Slices were chosen instead of trees in part1.
type ParquetStore ¶
type ParquetStore struct {
// contains filtered or unexported fields
}
ParquetStore is an implementation of Store that serializes data parts into Parquet binary form.
type ProtoStore ¶
type ProtoStore struct {
// contains filtered or unexported fields
}
ProtoStore is an implementation of Store that serializes data parts into Protobuf binary form.
type Store ¶
type Store interface { Insert(dataParts []Elements) ([]data.Block, error) Read(blockIds []int, blockSizes []int, blockNums []int, offset int64) (Elements, error) }
Store is the inferface that describes a block storage for time series data.
Insert loads slice of data parts, each of which is represented as Elements, to the storage and if successful returns a slice of index blocks.
Read uses meta-information about data blocks to extract data from the store.