netstorage

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PackageTypeFast = byte(2)
)

Variables

This section is empty.

Functions

func MarshalRows added in v1.1.0

func MarshalRows(ctx *WriteContext, db, rp string, pt uint32) ([]byte, error)

func PingNode added in v1.5.0

func PingNode(nodeID uint64, address string, timeout time.Duration) error

Types

type ColumnKeys

type ColumnKeys struct {
	Name string
	Keys []metaclient.FieldKey
}

type NetStorage

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

func (*NetStorage) Client added in v1.3.0

func (s *NetStorage) Client() meta.MetaClient

func (*NetStorage) DeleteDatabase

func (s *NetStorage) DeleteDatabase(node *meta2.DataNode, database string, pt uint32) error

func (*NetStorage) DeleteMeasurement

func (s *NetStorage) DeleteMeasurement(node *meta2.DataNode, db string, rp string, name string, shardIds []uint64) error

func (*NetStorage) DeleteRetentionPolicy

func (s *NetStorage) DeleteRetentionPolicy(node *meta2.DataNode, db string, rp string, pt uint32) error

func (*NetStorage) DropSeries added in v1.5.0

func (s *NetStorage) DropSeries(nodeID uint64, db string, ptIDs []uint32, measurements []string, condition influxql.Expr) error

func (*NetStorage) DropShard

func (s *NetStorage) DropShard(nodeID uint64, database, rpName string, dbPts []uint32, shardID uint64) error

func (*NetStorage) GetQueriesOnNode added in v1.1.0

func (s *NetStorage) GetQueriesOnNode(nodeID uint64) ([]*msgservice.QueryExeInfo, error)

func (*NetStorage) GetShardSplitPoints

func (s *NetStorage) GetShardSplitPoints(node *meta2.DataNode, database string, pt uint32,
	shardId uint64, idxes []int64) ([]string, error)

func (*NetStorage) KillQueryOnNode added in v1.1.0

func (s *NetStorage) KillQueryOnNode(nodeID, queryID uint64) error

func (*NetStorage) MigratePt added in v1.0.0

func (s *NetStorage) MigratePt(nodeID uint64, data transport.Codec, cb transport.Callback) error

func (*NetStorage) SendClearEvents added in v1.5.0

func (s *NetStorage) SendClearEvents(nodeId uint64, data transport.Codec) error

func (*NetStorage) SendSegregateNodeCmds added in v1.1.1

func (s *NetStorage) SendSegregateNodeCmds(nodeIDs []uint64, address []string) (int, error)

func (*NetStorage) SeriesCardinality

func (s *NetStorage) SeriesCardinality(nodeID uint64, db string, dbPts []uint32, measurements []string, condition influxql.Expr) ([]meta2.MeasurementCardinalityInfo, error)

func (*NetStorage) SeriesExactCardinality

func (s *NetStorage) SeriesExactCardinality(nodeID uint64, db string, dbPts []uint32, measurements []string, condition influxql.Expr) (map[string]uint64, error)

func (*NetStorage) ShowLastIndex added in v1.5.0

func (s *NetStorage) ShowLastIndex(nodeId uint64, database string, ptIds []uint32) ([]meta2.DbPtLastIndexInfo, error)

func (*NetStorage) ShowSeries

func (s *NetStorage) ShowSeries(nodeID uint64, db string, ptIDs []uint32, measurements []string, condition influxql.Expr, exact bool) ([]string, error)

func (*NetStorage) ShowTagKeys added in v1.2.0

func (s *NetStorage) ShowTagKeys(nodeID uint64, db string, ptIDs []uint32, measurements []string, condition influxql.Expr) ([]string, error)

func (*NetStorage) TagValues

func (s *NetStorage) TagValues(nodeID uint64, db string, ptIDs []uint32, tagKeys map[string]map[string]struct{}, cond influxql.Expr, limit int, exact bool) (influxql.TablesTagSets, error)

func (*NetStorage) TagValuesCardinality

func (s *NetStorage) TagValuesCardinality(nodeID uint64, db string, ptIDs []uint32,
	tagKeys map[string]map[string]struct{}, cond influxql.Expr) (map[string]uint64, error)

func (*NetStorage) TransferLeadership added in v1.4.0

func (s *NetStorage) TransferLeadership(database string, nodeId uint64, oldMasterPtId, newMasterPtId uint32) error

func (*NetStorage) WriteRows

func (s *NetStorage) WriteRows(ctx *WriteContext, nodeID uint64, pt uint32, database, rp string, timeout time.Duration) error

type Storage

type Storage interface {
	WriteRows(ctx *WriteContext, nodeID uint64, pt uint32, database, rpName string, timeout time.Duration) error
	DropShard(nodeID uint64, database, rpName string, dbPts []uint32, shardID uint64) error

	TagValues(nodeID uint64, db string, ptIDs []uint32, tagKeys map[string]map[string]struct{}, cond influxql.Expr, limit int, exact bool) (influxql.TablesTagSets, error)
	TagValuesCardinality(nodeID uint64, db string, ptIDs []uint32, tagKeys map[string]map[string]struct{}, cond influxql.Expr) (map[string]uint64, error)

	ShowTagKeys(nodeID uint64, db string, ptId []uint32, measurements []string, condition influxql.Expr) ([]string, error)

	ShowSeries(nodeID uint64, db string, ptId []uint32, measurements []string, condition influxql.Expr, exact bool) ([]string, error)
	DropSeries(nodeID uint64, db string, ptId []uint32, measurements []string, condition influxql.Expr) error

	SeriesCardinality(nodeID uint64, db string, dbPts []uint32, measurements []string, condition influxql.Expr) ([]meta2.MeasurementCardinalityInfo, error)
	SeriesExactCardinality(nodeID uint64, db string, dbPts []uint32, measurements []string, condition influxql.Expr) (map[string]uint64, error)

	GetShardSplitPoints(node *meta2.DataNode, database string, pt uint32, shardId uint64, idxes []int64) ([]string, error)
	DeleteDatabase(node *meta2.DataNode, database string, pt uint32) error
	DeleteRetentionPolicy(node *meta2.DataNode, db string, rp string, pt uint32) error
	DeleteMeasurement(node *meta2.DataNode, db string, rp string, name string, shardIds []uint64) error
	MigratePt(nodeID uint64, data transport.Codec, cb transport.Callback) error

	GetQueriesOnNode(nodeID uint64) ([]*msgservice.QueryExeInfo, error)
	KillQueryOnNode(nodeID, queryID uint64) error
	SendSegregateNodeCmds(nodeIDs []uint64, address []string) (int, error)

	TransferLeadership(database string, nodeId uint64, oldMasterPtId, newMasterPtId uint32) error
	SendClearEvents(nodeId uint64, data transport.Codec) error

	ShowLastIndex(nodeId uint64, database string, ptIds []uint32) ([]meta2.DbPtLastIndexInfo, error)
}

func NewNetStorage

func NewNetStorage(mcli meta.MetaClient) Storage

type TableColumnKeys

type TableColumnKeys []ColumnKeys

func (TableColumnKeys) Len

func (a TableColumnKeys) Len() int

func (TableColumnKeys) Less

func (a TableColumnKeys) Less(i, j int) bool

func (TableColumnKeys) Swap

func (a TableColumnKeys) Swap(i, j int)

type TableTagKeys

type TableTagKeys []TagKeys

func (TableTagKeys) Len

func (a TableTagKeys) Len() int

func (TableTagKeys) Less

func (a TableTagKeys) Less(i, j int) bool

func (TableTagKeys) Swap

func (a TableTagKeys) Swap(i, j int)

type TagKeys

type TagKeys struct {
	Name string
	Keys []string
}

type WriteContext added in v1.1.0

type WriteContext struct {
	Rows         []influx.Row
	Shard        *meta2.ShardInfo
	Buf          []byte
	StreamShards []uint64
}

Jump to

Keyboard shortcuts

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