storage

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaClient added in v1.1.0

type MetaClient interface {
	GetShardRangeInfo(db string, rp string, shardID uint64) (*meta.ShardTimeRangeInfo, error)
	GetMeasurementInfoStore(dbName string, rpName string, mstName string) (*meta.MeasurementInfo, error)
	GetReplicaInfo(db string, pt uint32) *message.ReplicaInfo
}

type Service

type Service interface {
	Open() error
	Close() error
}

Service represents a service attached to the server.

type SlaveStorage added in v1.1.0

type SlaveStorage interface {
	WriteRows(ctx *netstorage.WriteContext, nodeID uint64, pt uint32, database, rpName string, timeout time.Duration) error
}

type Storage

type Storage struct {
	MetaClient MetaClient

	Services []Service

	WriteLimit limiter.Fixed
	// contains filtered or unexported fields
}

func OpenStorage

func OpenStorage(path string, node *metaclient.Node, cli *metaclient.Client, conf *config.TSStore) (*Storage, error)

func (*Storage) Assign added in v1.0.0

func (s *Storage) Assign(opId uint64, ptInfo *meta.DbPtInfo) error

func (*Storage) CheckPtsRemovedDone added in v1.1.1

func (s *Storage) CheckPtsRemovedDone() error

The check is performed every 500 ms. The check times out after 5s.

func (*Storage) CreateLogicPlan

func (s *Storage) CreateLogicPlan(ctx context.Context, db string, ptId uint32, shardID uint64, sources influxql.Sources, schema hybridqp.Catalog) (hybridqp.QueryNode, error)

func (*Storage) ExecuteDelete

func (s *Storage) ExecuteDelete(req *netstorage.DeleteRequest) error

func (*Storage) GetConnId added in v1.1.0

func (s *Storage) GetConnId() uint64

func (*Storage) GetEngine

func (s *Storage) GetEngine() netstorage.Engine

func (*Storage) GetIndexInfo added in v1.2.0

func (s *Storage) GetIndexInfo(db string, ptId uint32, shardID uint64, schema hybridqp.Catalog) (interface{}, error)

func (*Storage) GetPath

func (s *Storage) GetPath() string

func (*Storage) GetShardDownSampleLevel added in v1.0.0

func (s *Storage) GetShardDownSampleLevel(db string, ptId uint32, shardID uint64) int

func (*Storage) GetShardSplitPoints

func (s *Storage) GetShardSplitPoints(db string, pt uint32, shardID uint64, idxes []int64) ([]string, error)

func (*Storage) MustClose

func (s *Storage) MustClose()

func (*Storage) Offload added in v1.0.0

func (s *Storage) Offload(opId uint64, ptInfo *meta.DbPtInfo) error

func (*Storage) PreAssign added in v1.0.0

func (s *Storage) PreAssign(opId uint64, ptInfo *meta.DbPtInfo) error

func (*Storage) PreOffload added in v1.0.0

func (s *Storage) PreOffload(opId uint64, ptInfo *meta.DbPtInfo) error

func (*Storage) RefEngineDbPt

func (s *Storage) RefEngineDbPt(db string, ptId uint32) error

func (*Storage) ReportLoad

func (s *Storage) ReportLoad()

func (*Storage) RollbackPreOffload added in v1.0.0

func (s *Storage) RollbackPreOffload(opId uint64, ptInfo *meta.DbPtInfo) error

func (*Storage) RowCount added in v1.1.0

func (s *Storage) RowCount(db string, ptId uint32, shardIDS []uint64, schema hybridqp.Catalog) (int64, error)

func (*Storage) ScanWithSparseIndex added in v1.1.0

func (s *Storage) ScanWithSparseIndex(ctx context.Context, db string, ptId uint32, shardIDS []uint64, schema hybridqp.Catalog) (hybridqp.IShardsFragments, error)

func (*Storage) SendSysCtrlOnNode

func (s *Storage) SendSysCtrlOnNode(req *netstorage.SysCtrlRequest) (map[string]string, error)

func (*Storage) SeriesCardinality

func (s *Storage) SeriesCardinality(db string, ptIDs []uint32, measurements []string, condition influxql.Expr, tr influxql.TimeRange) ([]meta.MeasurementCardinalityInfo, error)

func (*Storage) SeriesExactCardinality

func (s *Storage) SeriesExactCardinality(db string, ptIDs []uint32, measurements []string, condition influxql.Expr, tr influxql.TimeRange) (map[string]uint64, error)

func (*Storage) SeriesKeys

func (s *Storage) SeriesKeys(db string, ptIDs []uint32, measurements []string, condition influxql.Expr, tr influxql.TimeRange) ([]string, error)

func (*Storage) SetEngine added in v1.1.0

func (s *Storage) SetEngine(engine netstorage.Engine)

func (*Storage) TagKeys added in v1.2.0

func (s *Storage) TagKeys(db string, ptIDs []uint32, measurements []string, condition influxql.Expr, tr influxql.TimeRange) ([]string, error)

func (*Storage) TagValues

func (s *Storage) TagValues(db string, ptIDs []uint32, tagKeys map[string][][]byte, condition influxql.Expr, tr influxql.TimeRange) (netstorage.TablesTagSets, error)

func (*Storage) TagValuesCardinality

func (s *Storage) TagValuesCardinality(db string, ptIDs []uint32, tagKeys map[string][][]byte, condition influxql.Expr, tr influxql.TimeRange) (map[string]uint64, error)

func (*Storage) UnrefEngineDbPt

func (s *Storage) UnrefEngineDbPt(db string, ptId uint32)

func (*Storage) Write added in v1.1.0

func (s *Storage) Write(db, rp, mst string, ptId uint32, shardID uint64, writeData func() error) error

func (*Storage) WriteRec added in v1.1.0

func (s *Storage) WriteRec(db, rp, mst string, ptId uint32, shardID uint64, rec *record.Record, binaryRec []byte) error

func (*Storage) WriteRows

func (s *Storage) WriteRows(db, rp string, ptId uint32, shardID uint64, rows []influx.Row, binaryRows []byte) error

type StoreEngine

type StoreEngine interface {
	RowCount(db string, ptId uint32, shardIDS []uint64, schema hybridqp.Catalog) (int64, error)
	RefEngineDbPt(string, uint32) error
	UnrefEngineDbPt(string, uint32)
	ExecuteDelete(*netstorage.DeleteRequest) error
	GetShardSplitPoints(string, uint32, uint64, []int64) ([]string, error)
	SeriesCardinality(string, []uint32, []string, influxql.Expr, influxql.TimeRange) ([]meta.MeasurementCardinalityInfo, error)
	SeriesExactCardinality(string, []uint32, []string, influxql.Expr, influxql.TimeRange) (map[string]uint64, error)
	TagKeys(string, []uint32, []string, influxql.Expr, influxql.TimeRange) ([]string, error)
	SeriesKeys(string, []uint32, []string, influxql.Expr, influxql.TimeRange) ([]string, error)
	TagValues(string, []uint32, map[string][][]byte, influxql.Expr, influxql.TimeRange) (netstorage.TablesTagSets, error)
	TagValuesCardinality(string, []uint32, map[string][][]byte, influxql.Expr, influxql.TimeRange) (map[string]uint64, error)
	SendSysCtrlOnNode(*netstorage.SysCtrlRequest) (map[string]string, error)
	GetShardDownSampleLevel(db string, ptId uint32, shardID uint64) int
	PreOffload(uint64, *meta.DbPtInfo) error
	RollbackPreOffload(uint64, *meta.DbPtInfo) error
	PreAssign(uint64, *meta.DbPtInfo) error
	Offload(uint64, *meta.DbPtInfo) error
	Assign(uint64, *meta.DbPtInfo) error
	GetConnId() uint64
	CheckPtsRemovedDone() error
}

Jump to

Keyboard shortcuts

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