Documentation
¶
Index ¶
- Constants
- Variables
- func MarshalError(e error) *string
- func MarshalRows(ctx *WriteContext, db, rp string, pt uint32) ([]byte, error)
- func NormalizeError(errStr *string) error
- func RegisterNewEngineFun(name string, fn NewEngineFun)
- func RegisteredEngines() []string
- type BaseMessage
- type ColumnKeys
- type CreateDataBaseRequest
- type CreateDataBaseResponse
- type DDLBasePlans
- type DDLCallback
- type DDLMessage
- type DeleteRequest
- type DeleteResponse
- type DeleteType
- type Engine
- type EngineOptions
- type ExactCardinalityResponse
- type ExecuteStatementMessage
- type GetShardSplitPointsRequest
- type GetShardSplitPointsResponse
- type KillQueryRequest
- type KillQueryResponse
- type MigratePtCallback
- type NetStorage
- func (s *NetStorage) Client() meta.MetaClient
- func (s *NetStorage) DeleteDatabase(node *meta2.DataNode, database string, pt uint32) error
- func (s *NetStorage) DeleteMeasurement(node *meta2.DataNode, db string, rp string, name string, shardIds []uint64) error
- func (s *NetStorage) DeleteRetentionPolicy(node *meta2.DataNode, db string, rp string, pt uint32) error
- func (s *NetStorage) DropShard(nodeID uint64, database, rpName string, dbPts []uint32, shardID uint64) error
- func (s *NetStorage) GetQueriesOnNode(nodeID uint64) ([]*QueryExeInfo, error)
- func (s *NetStorage) GetShardSplitPoints(node *meta2.DataNode, database string, pt uint32, shardId uint64, ...) ([]string, error)
- func (s *NetStorage) HandleDeleteReq(node *meta2.DataNode, req *DeleteRequest) error
- func (s *NetStorage) KillQueryOnNode(nodeID, queryID uint64) error
- func (s *NetStorage) MigratePt(nodeID uint64, data transport.Codec, cb transport.Callback) error
- func (s *NetStorage) SendQueryRequestOnNode(nodeID uint64, req SysCtrlRequest) (map[string]string, error)
- func (s *NetStorage) SendRaftMessages(nodeID uint64, database string, pt uint32, msgs raftpb.Message) error
- func (s *NetStorage) SendSegregateNodeCmds(nodeIDs []uint64, address []string) (int, error)
- func (s *NetStorage) SendSysCtrlOnNode(nodeID uint64, req SysCtrlRequest) (map[string]string, error)
- func (s *NetStorage) SeriesCardinality(nodeID uint64, db string, dbPts []uint32, measurements []string, ...) ([]meta2.MeasurementCardinalityInfo, error)
- func (s *NetStorage) SeriesExactCardinality(nodeID uint64, db string, dbPts []uint32, measurements []string, ...) (map[string]uint64, error)
- func (s *NetStorage) ShowSeries(nodeID uint64, db string, ptIDs []uint32, measurements []string, ...) ([]string, error)
- func (s *NetStorage) ShowTagKeys(nodeID uint64, db string, ptIDs []uint32, measurements []string, ...) ([]string, error)
- func (s *NetStorage) TagValues(nodeID uint64, db string, ptIDs []uint32, ...) (TablesTagSets, error)
- func (s *NetStorage) TagValuesCardinality(nodeID uint64, db string, ptIDs []uint32, ...) (map[string]uint64, error)
- func (s *NetStorage) TransferLeadership(database string, nodeId uint64, oldMasterPtId, newMasterPtId uint32) error
- func (s *NetStorage) WriteRows(ctx *WriteContext, nodeID uint64, pt uint32, database, rpName string, ...) error
- type NewEngineFun
- type PartialWriteError
- type PtRequest
- type PtResponse
- type QueryExeInfo
- type RaftMessage
- type RaftMessagesRequest
- type RaftMessagesResponse
- type RaftMsgCallback
- type RaftMsgMessage
- type Requester
- type RunStateType
- type SegregateNodeRequest
- type SegregateNodeResponse
- type SendRaftMessageToStorage
- type SeriesCardinalityRequest
- type SeriesCardinalityResponse
- type SeriesExactCardinalityRequest
- type SeriesExactCardinalityResponse
- type SeriesKeysRequest
- type SeriesKeysResponse
- type ShowQueriesRequest
- type ShowQueriesResponse
- type ShowTagKeysRequest
- type ShowTagKeysResponse
- type ShowTagValuesCardinalityRequest
- type ShowTagValuesCardinalityResponse
- type ShowTagValuesRequest
- type ShowTagValuesResponse
- func (r *ShowTagValuesResponse) Error() error
- func (r *ShowTagValuesResponse) GetTagValuesSlice() TablesTagSets
- func (r *ShowTagValuesResponse) MarshalBinary() ([]byte, error)
- func (r *ShowTagValuesResponse) SetTagValuesSlice(s TablesTagSets)
- func (r *ShowTagValuesResponse) UnmarshalBinary(buf []byte) error
- type Storage
- type StorageService
- type StreamVar
- type SysCtrlCallback
- type SysCtrlRequest
- func (s *SysCtrlRequest) Get(key string) (v string, ok bool)
- func (s *SysCtrlRequest) Instance() transport.Codec
- func (s *SysCtrlRequest) Marshal(buf []byte) ([]byte, error)
- func (s *SysCtrlRequest) Mod() string
- func (s *SysCtrlRequest) Param() map[string]string
- func (s *SysCtrlRequest) SetMod(m string)
- func (s *SysCtrlRequest) SetParam(m map[string]string)
- func (s *SysCtrlRequest) Size() int
- func (s *SysCtrlRequest) Unmarshal(buf []byte) error
- type SysCtrlResponse
- func (s *SysCtrlResponse) Error() error
- func (s *SysCtrlResponse) Instance() transport.Codec
- func (s *SysCtrlResponse) Marshal(buf []byte) ([]byte, error)
- func (s *SysCtrlResponse) Result() map[string]string
- func (s *SysCtrlResponse) SetErr(err string)
- func (s *SysCtrlResponse) SetResult(ret map[string]string)
- func (s *SysCtrlResponse) Size() int
- func (s *SysCtrlResponse) Unmarshal(buf []byte) error
- type TableColumnKeys
- type TableTagKeys
- type TableTagSets
- type TablesTagSets
- type TagKeys
- type TagSet
- type TagSets
- type TransferLeadershipRequest
- type TransferLeadershipResponse
- func (r *TransferLeadershipResponse) Error() error
- func (r *TransferLeadershipResponse) Instance() transport.Codec
- func (r *TransferLeadershipResponse) Marshal(buf []byte) ([]byte, error)
- func (r *TransferLeadershipResponse) Size() int
- func (r *TransferLeadershipResponse) Unmarshal(buf []byte) error
- type WriteContext
- type WritePointsCallback
- type WritePointsRequest
- type WritePointsResponse
- type WriteStreamPointsCallback
- type WriteStreamPointsRequest
- func (w *WriteStreamPointsRequest) Instance() transport.Codec
- func (w *WriteStreamPointsRequest) Marshal(buf []byte) ([]byte, error)
- func (w *WriteStreamPointsRequest) Points() []byte
- func (w *WriteStreamPointsRequest) Size() int
- func (w *WriteStreamPointsRequest) StreamVars() []*StreamVar
- func (w *WriteStreamPointsRequest) Unmarshal(buf []byte) error
- type WriteStreamPointsResponse
Constants ¶
View Source
const ( UnknownMessage uint8 = iota SeriesKeysRequestMessage SeriesKeysResponseMessage SeriesExactCardinalityRequestMessage SeriesExactCardinalityResponseMessage SeriesCardinalityRequestMessage SeriesCardinalityResponseMessage ShowTagValuesRequestMessage ShowTagValuesResponseMessage ShowTagValuesCardinalityRequestMessage ShowTagValuesCardinalityResponseMessage GetShardSplitPointsRequestMessage GetShardSplitPointsResponseMessage DeleteRequestMessage DeleteResponseMessage CreateDataBaseRequestMessage CreateDatabaseResponseMessage ShowQueriesRequestMessage ShowQueriesResponseMessage KillQueryRequestMessage KillQueryResponseMessage ShowTagKeysRequestMessage ShowTagKeysResponseMessage RaftMessagesRequestMessage RaftMessagesResponseMessage )
View Source
const ( ShowMeasurementsStatement = "ShowMeasurementsStatement" ShowTagKeysStatement = "ShowTagKeysStatement" ShowTagValuesStatement = "ShowTagValuesStatement" ShowSeriesCardinalityStatement = "ShowSeriesCardinalityStatement" ShowMeasurementCardinalityStatement = "ShowMeasurementCardinalityStatement" )
View Source
const (
PackageTypeFast = byte(2)
)
Variables ¶
View Source
var MessageBinaryCodec = make(map[uint8]func() codec.BinaryCodec, 20)
View Source
var MessageResponseTyp = make(map[uint8]uint8, 20)
Functions ¶
func MarshalError ¶ added in v1.0.0
func MarshalRows ¶ added in v1.1.0
func MarshalRows(ctx *WriteContext, db, rp string, pt uint32) ([]byte, error)
func NormalizeError ¶ added in v1.0.0
func RegisterNewEngineFun ¶
func RegisterNewEngineFun(name string, fn NewEngineFun)
func RegisteredEngines ¶
func RegisteredEngines() []string
Types ¶
type BaseMessage ¶
type BaseMessage struct { Typ uint8 Data codec.BinaryCodec }
func (*BaseMessage) Size ¶
func (bm *BaseMessage) Size() int
type ColumnKeys ¶
type ColumnKeys struct { Name string Keys []metaclient.FieldKey }
type CreateDataBaseRequest ¶
type CreateDataBaseRequest struct {
internal2.CreateDataBaseRequest
}
func (*CreateDataBaseRequest) MarshalBinary ¶
func (r *CreateDataBaseRequest) MarshalBinary() ([]byte, error)
func (*CreateDataBaseRequest) UnmarshalBinary ¶
func (r *CreateDataBaseRequest) UnmarshalBinary(buf []byte) error
type CreateDataBaseResponse ¶
type CreateDataBaseResponse struct {
internal2.CreateDataBaseResponse
}
func (*CreateDataBaseResponse) Error ¶
func (r *CreateDataBaseResponse) Error() error
func (*CreateDataBaseResponse) MarshalBinary ¶
func (r *CreateDataBaseResponse) MarshalBinary() ([]byte, error)
func (*CreateDataBaseResponse) UnmarshalBinary ¶
func (r *CreateDataBaseResponse) UnmarshalBinary(buf []byte) error
type DDLBasePlans ¶ added in v1.4.0
type DDLCallback ¶
type DDLCallback struct {
// contains filtered or unexported fields
}
func (*DDLCallback) GetCodec ¶
func (c *DDLCallback) GetCodec() transport.Codec
func (*DDLCallback) GetResponse ¶
func (c *DDLCallback) GetResponse() interface{}
func (*DDLCallback) Handle ¶
func (c *DDLCallback) Handle(data interface{}) error
type DDLMessage ¶
type DDLMessage struct {
BaseMessage
}
func NewDDLMessage ¶
func NewDDLMessage(typ uint8, data codec.BinaryCodec) *DDLMessage
func (*DDLMessage) Instance ¶
func (m *DDLMessage) Instance() transport.Codec
func (*DDLMessage) Unmarshal ¶
func (m *DDLMessage) Unmarshal(buf []byte) error
type DeleteRequest ¶
type DeleteRequest struct { Database string Rp string Measurement string ShardIds []uint64 Type DeleteType PtId uint32 }
func (*DeleteRequest) MarshalBinary ¶
func (ddr *DeleteRequest) MarshalBinary() ([]byte, error)
func (*DeleteRequest) UnmarshalBinary ¶
func (ddr *DeleteRequest) UnmarshalBinary(data []byte) error
type DeleteResponse ¶
type DeleteResponse struct {
Err error
}
func (*DeleteResponse) MarshalBinary ¶
func (dr *DeleteResponse) MarshalBinary() ([]byte, error)
func (*DeleteResponse) UnmarshalBinary ¶
func (dr *DeleteResponse) UnmarshalBinary(data []byte) error
type DeleteType ¶
type DeleteType int
const ( DatabaseDelete DeleteType = iota RetentionPolicyDelete MeasurementDelete )
type Engine ¶
type Engine interface { Open(durationInfos map[uint64]*meta.ShardDurationInfo, dbBriefInfos map[string]*meta.DatabaseBriefInfo, client metaclient.MetaClient) error Close() error ForceFlush() DeleteShard(db string, ptId uint32, shardID uint64) error DeleteIndex(db string, pt uint32, indexID uint64) error ClearIndexCache(db string, pt uint32, indexID uint64) error ExpiredShards(nilShardMap *map[uint64]*meta.ShardDurationInfo) []*meta.ShardIdentifier ExpiredIndexes(nilIndexMap *map[uint64]*meta.IndexDurationInfo) []*meta.IndexIdentifier ExpiredCacheIndexes() []*meta.IndexIdentifier FetchShardsNeedChangeStore() ([]*meta.ShardIdentifier, []*meta.ShardIdentifier) ChangeShardTierToWarm(db string, ptId uint32, shardID uint64) error CreateShard(db, rp string, ptId uint32, shardID uint64, timeRangeInfo *meta.ShardTimeRangeInfo, mstInfo *meta.MeasurementInfo) error WriteRows(db, rp string, ptId uint32, shardID uint64, points []influx.Row, binaryRows []byte, snp *raftlog.SnapShotter) error WriteRec(db, mst string, ptId uint32, shardID uint64, rec *record.Record, binaryRec []byte) error WriteToRaft(db, rp string, ptId uint32, tail []byte) error CreateDBPT(db string, pt uint32, enableTagArray bool) GetShardDownSampleLevel(db string, ptId uint32, shardID uint64) int GetShardSplitPoints(db string, ptId uint32, shardID uint64, idxes []int64) ([]string, error) DeleteDatabase(db string, ptId uint32) error DropRetentionPolicy(db string, rp string, ptId uint32) error DropMeasurement(db string, rp string, name string, shardIds []uint64) error TagKeys(db string, ptIDs []uint32, measurements [][]byte, condition influxql.Expr, tr influxql.TimeRange) ([]string, error) SeriesKeys(db string, ptIDs []uint32, measurements [][]byte, condition influxql.Expr, tr influxql.TimeRange) ([]string, error) SeriesCardinality(db string, ptIDs []uint32, measurements [][]byte, condition influxql.Expr, tr influxql.TimeRange) ([]meta.MeasurementCardinalityInfo, error) SeriesExactCardinality(db string, ptIDs []uint32, measurements [][]byte, condition influxql.Expr, tr influxql.TimeRange) (map[string]uint64, error) TagValues(db string, ptId []uint32, tagKeys map[string][][]byte, condition influxql.Expr, tr influxql.TimeRange) (TablesTagSets, error) TagValuesCardinality(db string, ptIDs []uint32, tagKeys map[string][][]byte, condition influxql.Expr, tr influxql.TimeRange) (map[string]uint64, error) DropSeries(database string, sources []influxql.Source, ptId []uint32, condition influxql.Expr) (int, error) DbPTRef(db string, ptId uint32) error DbPTUnref(db string, ptId uint32) CreateLogicalPlan(ctx context.Context, db string, ptId uint32, shardID []uint64, sources influxql.Sources, schema *executor.QuerySchema) (hybridqp.QueryNode, error) ScanWithSparseIndex(ctx context.Context, db string, ptId uint32, shardIDs []uint64, schema *executor.QuerySchema) (executor.ShardsFragments, error) GetIndexInfo(db string, ptId uint32, shardIDs uint64, schema *executor.QuerySchema) (*executor.AttachedIndexInfo, error) RowCount(db string, ptId uint32, shardIDs []uint64, schema *executor.QuerySchema) (int64, error) LogicalPlanCost(db string, ptId uint32, sources influxql.Sources, opt query.ProcessorOptions) (hybridqp.LogicalPlanCost, error) UpdateShardDurationInfo(info *meta.ShardDurationInfo, nilShardMap *map[uint64]*meta.ShardDurationInfo) error UpdateIndexDurationInfo(info *meta.IndexDurationInfo, nilIndexMap *map[uint64]*meta.IndexDurationInfo) error PreOffload(opId uint64, db string, ptId uint32) error RollbackPreOffload(opId uint64, db string, ptId uint32) error PreAssign(opId uint64, db string, ptId uint32, durationInfos map[uint64]*meta.ShardDurationInfo, dbBriefInfo *meta.DatabaseBriefInfo, client metaclient.MetaClient) error Offload(opId uint64, db string, ptId uint32) error Assign(opId uint64, nodeId uint64, db string, ptId uint32, ver uint64, durationInfos map[uint64]*meta.ShardDurationInfo, dbBriefInfo *meta.DatabaseBriefInfo, client metaclient.MetaClient, storage StorageService) error SysCtrl(req *SysCtrlRequest) (map[string]string, error) Statistics(buffer []byte) ([]byte, error) StatisticsOps() []opsStat.OpsStatistic GetShardDownSamplePolicyInfos(meta interface { UpdateShardDownSampleInfo(Ident *meta.ShardIdentifier) error }) ([]*meta.ShardDownSamplePolicyInfo, error) GetDownSamplePolicy(key string) *meta.StoreDownSamplePolicy StartDownSampleTask(info *meta.ShardDownSamplePolicyInfo, schema []hybridqp.Catalog, log *zap.Logger, meta interface { UpdateShardDownSampleInfo(Ident *meta.ShardIdentifier) error }) error UpdateDownSampleInfo(policies *meta.DownSamplePoliciesInfoWithDbRp) UpdateShardDownSampleInfo(infos *meta.ShardDownSampleUpdateInfos) CheckPtsRemovedDone() bool TransferLeadership(database string, nodeId uint64, oldMasterPtId, newMasterPtId uint32) error HierarchicalStorage(db string, ptId uint32, shardID uint64) bool RaftMessage CreateDDLBasePlans(planType hybridqp.DDLType, db string, ptIDs []uint32, tr *influxql.TimeRange) DDLBasePlans SetMetaClient(m metaclient.MetaClient) }
type EngineOptions ¶
type EngineOptions struct { Version string // Limits the concurrent number of TSM files that can be loaded at once. OpenLimiter limiter.Fixed // WriteColdDuration is the length of time at which the engine will snapshot the mutable WriteColdDuration time.Duration // ForceSnapShotDuration is the length of time at which the engine must snapshot the mutable ForceSnapShotDuration time.Duration // ShardMutableSizeLimit is the maximum size a shard's cache can reach before it starts rejecting writes. ShardMutableSizeLimit int64 // NodeMutableSizeLimit is the maximum size a node's cache can reach before it starts rejecting writes. NodeMutableSizeLimit int64 // MaxWriteHangTime is the maximum time to hang for data write to store if node mem of mem is not enough MaxWriteHangTime time.Duration // Enable read from mem data, include mutable and snapshot table, default value is true MemDataReadEnabled bool FullCompactColdDuration time.Duration MaxConcurrentCompactions int MaxFullCompactions int CompactThroughput int64 CompactThroughputBurst int64 CompactRecovery bool CsCompactionEnabled bool CsDetachedFlushEnabled bool ShardMoveLayoutSwitchEnabled bool SnapshotThroughput int64 SnapshotThroughputBurst int64 SnapshotTblNum int FragmentsNumPerFlush int BackgroundReadThroughput int // WalSyncInterval is the interval of wal file sync WalEnabled bool WalSyncInterval time.Duration WalReplayParallel bool WalReplayAsync bool WalReplayBatchSize int // Immutable config ReadPageSize string ReadMetaPageSize []string ReadMetaCacheLimit uint64 ReadDataCacheLimit uint64 EnableMmapRead bool CompactionMethod int // 0:auto, 1:stream, 2: non-stream OpenShardLimit int // lazy load shards LazyLoadShardEnable bool ThermalShardStartDuration time.Duration ThermalShardEndDuration time.Duration DownSampleWriteDrop bool MaxDownSampleTaskConcurrency int MaxSeriesPerDatabase int MaxRowsPerSegment int // for hierarchical storage SkipRegisterColdShard bool // for raftNode RaftEntrySyncInterval time.Duration }
func NewEngineOptions ¶
func NewEngineOptions() EngineOptions
type ExactCardinalityResponse ¶
type ExactCardinalityResponse struct {
internal2.ExactCardinalityResponse
}
func (*ExactCardinalityResponse) Error ¶
func (r *ExactCardinalityResponse) Error() error
func (*ExactCardinalityResponse) MarshalBinary ¶
func (r *ExactCardinalityResponse) MarshalBinary() ([]byte, error)
func (*ExactCardinalityResponse) UnmarshalBinary ¶
func (r *ExactCardinalityResponse) UnmarshalBinary(buf []byte) error
type ExecuteStatementMessage ¶
type GetShardSplitPointsRequest ¶
type GetShardSplitPointsRequest struct {
internal2.GetShardSplitPointsRequest
}
func (*GetShardSplitPointsRequest) Error ¶
func (r *GetShardSplitPointsRequest) Error() error
func (*GetShardSplitPointsRequest) MarshalBinary ¶
func (r *GetShardSplitPointsRequest) MarshalBinary() ([]byte, error)
func (*GetShardSplitPointsRequest) UnmarshalBinary ¶
func (r *GetShardSplitPointsRequest) UnmarshalBinary(buf []byte) error
type GetShardSplitPointsResponse ¶
type GetShardSplitPointsResponse struct {
internal2.GetShardSplitPointsResponse
}
func (*GetShardSplitPointsResponse) Error ¶
func (r *GetShardSplitPointsResponse) Error() error
func (*GetShardSplitPointsResponse) MarshalBinary ¶
func (r *GetShardSplitPointsResponse) MarshalBinary() ([]byte, error)
func (*GetShardSplitPointsResponse) UnmarshalBinary ¶
func (r *GetShardSplitPointsResponse) UnmarshalBinary(buf []byte) error
type KillQueryRequest ¶ added in v1.1.0
type KillQueryRequest struct {
internal2.KillQueryRequest
}
func (*KillQueryRequest) MarshalBinary ¶ added in v1.1.0
func (r *KillQueryRequest) MarshalBinary() ([]byte, error)
func (*KillQueryRequest) UnmarshalBinary ¶ added in v1.1.0
func (r *KillQueryRequest) UnmarshalBinary(buf []byte) error
type KillQueryResponse ¶ added in v1.1.0
type KillQueryResponse struct {
internal2.KillQueryResponse
}
func (*KillQueryResponse) Error ¶ added in v1.1.0
func (r *KillQueryResponse) Error() error
func (*KillQueryResponse) MarshalBinary ¶ added in v1.1.0
func (r *KillQueryResponse) MarshalBinary() ([]byte, error)
func (*KillQueryResponse) UnmarshalBinary ¶ added in v1.1.0
func (r *KillQueryResponse) UnmarshalBinary(buf []byte) error
type MigratePtCallback ¶ added in v1.0.0
type MigratePtCallback struct {
// contains filtered or unexported fields
}
func (*MigratePtCallback) CallFn ¶ added in v1.1.1
func (c *MigratePtCallback) CallFn(err error)
func (*MigratePtCallback) GetCodec ¶ added in v1.0.0
func (c *MigratePtCallback) GetCodec() transport.Codec
func (*MigratePtCallback) GetResponse ¶ added in v1.0.0
func (c *MigratePtCallback) GetResponse() interface{}
func (*MigratePtCallback) Handle ¶ added in v1.0.0
func (c *MigratePtCallback) Handle(data interface{}) error
func (*MigratePtCallback) SetCallbackFn ¶ added in v1.0.0
func (c *MigratePtCallback) SetCallbackFn(fn func(err error))
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 (*NetStorage) DeleteMeasurement ¶
func (*NetStorage) DeleteRetentionPolicy ¶
func (*NetStorage) GetQueriesOnNode ¶ added in v1.1.0
func (s *NetStorage) GetQueriesOnNode(nodeID uint64) ([]*QueryExeInfo, error)
func (*NetStorage) GetShardSplitPoints ¶
func (*NetStorage) HandleDeleteReq ¶
func (s *NetStorage) HandleDeleteReq(node *meta2.DataNode, req *DeleteRequest) error
func (*NetStorage) KillQueryOnNode ¶ added in v1.1.0
func (s *NetStorage) KillQueryOnNode(nodeID, queryID uint64) error
func (*NetStorage) SendQueryRequestOnNode ¶ added in v1.1.0
func (s *NetStorage) SendQueryRequestOnNode(nodeID uint64, req SysCtrlRequest) (map[string]string, error)
func (*NetStorage) SendRaftMessages ¶ added in v1.3.0
func (*NetStorage) SendSegregateNodeCmds ¶ added in v1.1.1
func (s *NetStorage) SendSegregateNodeCmds(nodeIDs []uint64, address []string) (int, error)
func (*NetStorage) SendSysCtrlOnNode ¶
func (s *NetStorage) SendSysCtrlOnNode(nodeID uint64, req SysCtrlRequest) (map[string]string, 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 (*NetStorage) ShowSeries ¶
func (*NetStorage) ShowTagKeys ¶ added in v1.2.0
func (*NetStorage) TagValuesCardinality ¶
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, rpName string, timeout time.Duration) error
type NewEngineFun ¶
type NewEngineFun func(dataPath, walPath string, options EngineOptions, ctx *metaclient.LoadCtx) (Engine, error)
func GetNewEngineFunction ¶
func GetNewEngineFunction(entType string) NewEngineFun
type PartialWriteError ¶
type PartialWriteError struct { Reason error Dropped int // A sorted slice of series keys that were dropped. DroppedKeys [][]byte }
PartialWriteError indicates a write request could only write a portion of the requested values.
func (PartialWriteError) Error ¶
func (e PartialWriteError) Error() string
type PtRequest ¶ added in v1.0.0
func NewPtRequest ¶ added in v1.0.0
func NewPtRequest() *PtRequest
type PtResponse ¶ added in v1.0.0
type PtResponse struct {
netdata.PtResponse
}
func NewPtResponse ¶ added in v1.0.0
func NewPtResponse() *PtResponse
func (*PtResponse) Error ¶ added in v1.0.0
func (r *PtResponse) Error() error
func (*PtResponse) Instance ¶ added in v1.0.0
func (r *PtResponse) Instance() transport.Codec
func (*PtResponse) Marshal ¶ added in v1.0.0
func (r *PtResponse) Marshal(buf []byte) ([]byte, error)
func (*PtResponse) Size ¶ added in v1.0.0
func (r *PtResponse) Size() int
func (*PtResponse) Unmarshal ¶ added in v1.0.0
func (r *PtResponse) Unmarshal(buf []byte) error
type QueryExeInfo ¶ added in v1.1.0
type RaftMessage ¶ added in v1.3.0
type RaftMessagesRequest ¶ added in v1.3.0
func (*RaftMessagesRequest) MarshalBinary ¶ added in v1.3.0
func (r *RaftMessagesRequest) MarshalBinary() ([]byte, error)
func (*RaftMessagesRequest) UnmarshalBinary ¶ added in v1.3.0
func (r *RaftMessagesRequest) UnmarshalBinary(data []byte) error
type RaftMessagesResponse ¶ added in v1.3.0
type RaftMessagesResponse struct {
internal2.RaftMessagesResponse
}
func (*RaftMessagesResponse) MarshalBinary ¶ added in v1.3.0
func (r *RaftMessagesResponse) MarshalBinary() ([]byte, error)
func (*RaftMessagesResponse) UnmarshalBinary ¶ added in v1.3.0
func (r *RaftMessagesResponse) UnmarshalBinary(buf []byte) error
type RaftMsgCallback ¶ added in v1.3.0
type RaftMsgCallback struct {
// contains filtered or unexported fields
}
func (*RaftMsgCallback) GetCodec ¶ added in v1.3.0
func (c *RaftMsgCallback) GetCodec() transport.Codec
func (*RaftMsgCallback) GetResponse ¶ added in v1.3.0
func (c *RaftMsgCallback) GetResponse() interface{}
func (*RaftMsgCallback) Handle ¶ added in v1.3.0
func (c *RaftMsgCallback) Handle(data interface{}) error
type RaftMsgMessage ¶ added in v1.3.0
type RaftMsgMessage struct {
BaseMessage
}
func NewRaftMsgMessage ¶ added in v1.3.0
func NewRaftMsgMessage(typ uint8, data codec.BinaryCodec) *RaftMsgMessage
func (*RaftMsgMessage) Instance ¶ added in v1.3.0
func (m *RaftMsgMessage) Instance() transport.Codec
func (*RaftMsgMessage) Unmarshal ¶ added in v1.3.0
func (m *RaftMsgMessage) Unmarshal(buf []byte) error
type Requester ¶
type Requester struct {
// contains filtered or unexported fields
}
func NewRequester ¶
func NewRequester(msgTyp uint8, data codec.BinaryCodec, mc meta.MetaClient) *Requester
type RunStateType ¶ added in v1.1.0
type RunStateType int32
const ( Unknown RunStateType = iota Running Killed )
type SegregateNodeRequest ¶ added in v1.1.1
type SegregateNodeRequest struct {
netdata.SegregateNodeRequest
}
func NewSegregateNodeRequest ¶ added in v1.1.1
func NewSegregateNodeRequest() *SegregateNodeRequest
func (*SegregateNodeRequest) Instance ¶ added in v1.1.1
func (r *SegregateNodeRequest) Instance() transport.Codec
func (*SegregateNodeRequest) Marshal ¶ added in v1.1.1
func (r *SegregateNodeRequest) Marshal(buf []byte) ([]byte, error)
func (*SegregateNodeRequest) Size ¶ added in v1.1.1
func (r *SegregateNodeRequest) Size() int
func (*SegregateNodeRequest) Unmarshal ¶ added in v1.1.1
func (r *SegregateNodeRequest) Unmarshal(buf []byte) error
type SegregateNodeResponse ¶ added in v1.1.1
type SegregateNodeResponse struct {
netdata.SegregateNodeResponse
}
func NewSegregateNodeResponse ¶ added in v1.1.1
func NewSegregateNodeResponse() *SegregateNodeResponse
func (*SegregateNodeResponse) Error ¶ added in v1.1.1
func (r *SegregateNodeResponse) Error() error
func (*SegregateNodeResponse) Instance ¶ added in v1.1.1
func (r *SegregateNodeResponse) Instance() transport.Codec
func (*SegregateNodeResponse) Marshal ¶ added in v1.1.1
func (r *SegregateNodeResponse) Marshal(buf []byte) ([]byte, error)
func (*SegregateNodeResponse) Size ¶ added in v1.1.1
func (r *SegregateNodeResponse) Size() int
func (*SegregateNodeResponse) Unmarshal ¶ added in v1.1.1
func (r *SegregateNodeResponse) Unmarshal(buf []byte) error
type SendRaftMessageToStorage ¶ added in v1.3.0
type SeriesCardinalityRequest ¶
type SeriesCardinalityRequest struct {
SeriesKeysRequest
}
type SeriesCardinalityResponse ¶
type SeriesCardinalityResponse struct {
meta.CardinalityResponse
}
type SeriesExactCardinalityRequest ¶
type SeriesExactCardinalityRequest struct {
SeriesKeysRequest
}
type SeriesExactCardinalityResponse ¶
type SeriesExactCardinalityResponse struct {
ExactCardinalityResponse
}
type SeriesKeysRequest ¶
type SeriesKeysRequest struct {
internal2.SeriesKeysRequest
}
func (*SeriesKeysRequest) MarshalBinary ¶
func (r *SeriesKeysRequest) MarshalBinary() ([]byte, error)
func (*SeriesKeysRequest) UnmarshalBinary ¶
func (r *SeriesKeysRequest) UnmarshalBinary(buf []byte) error
type SeriesKeysResponse ¶
type SeriesKeysResponse struct {
internal2.SeriesKeysResponse
}
func (*SeriesKeysResponse) Error ¶
func (r *SeriesKeysResponse) Error() error
func (*SeriesKeysResponse) MarshalBinary ¶
func (r *SeriesKeysResponse) MarshalBinary() ([]byte, error)
func (*SeriesKeysResponse) UnmarshalBinary ¶
func (r *SeriesKeysResponse) UnmarshalBinary(buf []byte) error
type ShowQueriesRequest ¶ added in v1.1.0
type ShowQueriesRequest struct { }
func (*ShowQueriesRequest) MarshalBinary ¶ added in v1.1.0
func (r *ShowQueriesRequest) MarshalBinary() ([]byte, error)
func (*ShowQueriesRequest) UnmarshalBinary ¶ added in v1.1.0
func (r *ShowQueriesRequest) UnmarshalBinary(buf []byte) error
type ShowQueriesResponse ¶ added in v1.1.0
type ShowQueriesResponse struct {
QueryExeInfos []*QueryExeInfo
}
func (*ShowQueriesResponse) MarshalBinary ¶ added in v1.1.0
func (r *ShowQueriesResponse) MarshalBinary() ([]byte, error)
func (*ShowQueriesResponse) UnmarshalBinary ¶ added in v1.1.0
func (r *ShowQueriesResponse) UnmarshalBinary(buf []byte) error
type ShowTagKeysRequest ¶ added in v1.2.0
type ShowTagKeysRequest struct {
internal2.ShowTagKeysRequest
}
func (*ShowTagKeysRequest) MarshalBinary ¶ added in v1.2.0
func (r *ShowTagKeysRequest) MarshalBinary() ([]byte, error)
func (*ShowTagKeysRequest) UnmarshalBinary ¶ added in v1.2.0
func (r *ShowTagKeysRequest) UnmarshalBinary(buf []byte) error
type ShowTagKeysResponse ¶ added in v1.2.0
type ShowTagKeysResponse struct {
internal2.ShowTagKeysResponse
}
func (*ShowTagKeysResponse) Error ¶ added in v1.2.0
func (r *ShowTagKeysResponse) Error() error
func (*ShowTagKeysResponse) MarshalBinary ¶ added in v1.2.0
func (r *ShowTagKeysResponse) MarshalBinary() ([]byte, error)
func (*ShowTagKeysResponse) UnmarshalBinary ¶ added in v1.2.0
func (r *ShowTagKeysResponse) UnmarshalBinary(buf []byte) error
type ShowTagValuesCardinalityRequest ¶
type ShowTagValuesCardinalityRequest struct {
ShowTagValuesRequest
}
type ShowTagValuesCardinalityResponse ¶
type ShowTagValuesCardinalityResponse struct {
ExactCardinalityResponse
}
type ShowTagValuesRequest ¶
type ShowTagValuesRequest struct {
internal2.ShowTagValuesRequest
}
func (*ShowTagValuesRequest) GetTagKeysBytes ¶
func (r *ShowTagValuesRequest) GetTagKeysBytes() map[string][][]byte
func (*ShowTagValuesRequest) MarshalBinary ¶
func (r *ShowTagValuesRequest) MarshalBinary() ([]byte, error)
func (*ShowTagValuesRequest) SetTagKeys ¶
func (r *ShowTagValuesRequest) SetTagKeys(tagKeys map[string]map[string]struct{})
func (*ShowTagValuesRequest) UnmarshalBinary ¶
func (r *ShowTagValuesRequest) UnmarshalBinary(buf []byte) error
type ShowTagValuesResponse ¶
type ShowTagValuesResponse struct {
internal2.ShowTagValuesResponse
}
func (*ShowTagValuesResponse) Error ¶
func (r *ShowTagValuesResponse) Error() error
func (*ShowTagValuesResponse) GetTagValuesSlice ¶
func (r *ShowTagValuesResponse) GetTagValuesSlice() TablesTagSets
func (*ShowTagValuesResponse) MarshalBinary ¶
func (r *ShowTagValuesResponse) MarshalBinary() ([]byte, error)
func (*ShowTagValuesResponse) SetTagValuesSlice ¶
func (r *ShowTagValuesResponse) SetTagValuesSlice(s TablesTagSets)
func (*ShowTagValuesResponse) UnmarshalBinary ¶
func (r *ShowTagValuesResponse) UnmarshalBinary(buf []byte) 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) (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) 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) SendQueryRequestOnNode(nodeID uint64, req SysCtrlRequest) (map[string]string, error) SendSysCtrlOnNode(nodID uint64, req SysCtrlRequest) (map[string]string, 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) ([]*QueryExeInfo, error) KillQueryOnNode(nodeID, queryID uint64) error SendSegregateNodeCmds(nodeIDs []uint64, address []string) (int, error) TransferLeadership(database string, nodeId uint64, oldMasterPtId, newMasterPtId uint32) error SendRaftMessageToStorage }
func NewNetStorage ¶
func NewNetStorage(mcli meta.MetaClient) Storage
type StorageService ¶ added in v1.3.0
type SysCtrlCallback ¶
type SysCtrlCallback struct {
// contains filtered or unexported fields
}
func (*SysCtrlCallback) GetCodec ¶
func (c *SysCtrlCallback) GetCodec() transport.Codec
func (*SysCtrlCallback) GetResponse ¶
func (c *SysCtrlCallback) GetResponse() interface{}
func (*SysCtrlCallback) Handle ¶
func (c *SysCtrlCallback) Handle(data interface{}) error
type SysCtrlRequest ¶
type SysCtrlRequest struct {
// contains filtered or unexported fields
}
func (*SysCtrlRequest) Instance ¶
func (s *SysCtrlRequest) Instance() transport.Codec
func (*SysCtrlRequest) Mod ¶
func (s *SysCtrlRequest) Mod() string
func (*SysCtrlRequest) Param ¶
func (s *SysCtrlRequest) Param() map[string]string
func (*SysCtrlRequest) SetMod ¶
func (s *SysCtrlRequest) SetMod(m string)
func (*SysCtrlRequest) SetParam ¶
func (s *SysCtrlRequest) SetParam(m map[string]string)
func (*SysCtrlRequest) Size ¶
func (s *SysCtrlRequest) Size() int
func (*SysCtrlRequest) Unmarshal ¶
func (s *SysCtrlRequest) Unmarshal(buf []byte) error
type SysCtrlResponse ¶
type SysCtrlResponse struct {
// contains filtered or unexported fields
}
func (*SysCtrlResponse) Error ¶
func (s *SysCtrlResponse) Error() error
func (*SysCtrlResponse) Instance ¶
func (s *SysCtrlResponse) Instance() transport.Codec
func (*SysCtrlResponse) Result ¶
func (s *SysCtrlResponse) Result() map[string]string
func (*SysCtrlResponse) SetErr ¶
func (s *SysCtrlResponse) SetErr(err string)
func (*SysCtrlResponse) SetResult ¶
func (s *SysCtrlResponse) SetResult(ret map[string]string)
func (*SysCtrlResponse) Size ¶
func (s *SysCtrlResponse) Size() int
func (*SysCtrlResponse) Unmarshal ¶
func (s *SysCtrlResponse) Unmarshal(buf []byte) error
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 TableTagSets ¶
type TablesTagSets ¶
type TablesTagSets []TableTagSets
func (TablesTagSets) Len ¶
func (a TablesTagSets) Len() int
func (TablesTagSets) Less ¶
func (a TablesTagSets) Less(i, j int) bool
func (TablesTagSets) Swap ¶
func (a TablesTagSets) Swap(i, j int)
type TransferLeadershipRequest ¶ added in v1.4.0
type TransferLeadershipRequest struct {
netdata.TransferLeadershipRequest
}
func NewTransferLeadershipRequest ¶ added in v1.4.0
func NewTransferLeadershipRequest() *TransferLeadershipRequest
func (*TransferLeadershipRequest) Instance ¶ added in v1.4.0
func (r *TransferLeadershipRequest) Instance() transport.Codec
func (*TransferLeadershipRequest) Marshal ¶ added in v1.4.0
func (r *TransferLeadershipRequest) Marshal(buf []byte) ([]byte, error)
func (*TransferLeadershipRequest) Size ¶ added in v1.4.0
func (r *TransferLeadershipRequest) Size() int
func (*TransferLeadershipRequest) Unmarshal ¶ added in v1.4.0
func (r *TransferLeadershipRequest) Unmarshal(buf []byte) error
type TransferLeadershipResponse ¶ added in v1.4.0
type TransferLeadershipResponse struct {
netdata.TransferLeadershipResponse
}
func NewTransferLeadershipResponse ¶ added in v1.4.0
func NewTransferLeadershipResponse() *TransferLeadershipResponse
func (*TransferLeadershipResponse) Error ¶ added in v1.4.0
func (r *TransferLeadershipResponse) Error() error
func (*TransferLeadershipResponse) Instance ¶ added in v1.4.0
func (r *TransferLeadershipResponse) Instance() transport.Codec
func (*TransferLeadershipResponse) Marshal ¶ added in v1.4.0
func (r *TransferLeadershipResponse) Marshal(buf []byte) ([]byte, error)
func (*TransferLeadershipResponse) Size ¶ added in v1.4.0
func (r *TransferLeadershipResponse) Size() int
func (*TransferLeadershipResponse) Unmarshal ¶ added in v1.4.0
func (r *TransferLeadershipResponse) Unmarshal(buf []byte) error
type WriteContext ¶ added in v1.1.0
type WritePointsCallback ¶
type WritePointsCallback struct {
// contains filtered or unexported fields
}
func (*WritePointsCallback) GetCodec ¶
func (c *WritePointsCallback) GetCodec() transport.Codec
func (*WritePointsCallback) Handle ¶
func (c *WritePointsCallback) Handle(data interface{}) error
type WritePointsRequest ¶
type WritePointsRequest struct {
// contains filtered or unexported fields
}
func NewWritePointsRequest ¶
func NewWritePointsRequest(points []byte) *WritePointsRequest
func (*WritePointsRequest) Instance ¶
func (r *WritePointsRequest) Instance() transport.Codec
func (*WritePointsRequest) Marshal ¶
func (r *WritePointsRequest) Marshal(buf []byte) ([]byte, error)
func (*WritePointsRequest) Points ¶
func (r *WritePointsRequest) Points() []byte
func (*WritePointsRequest) Size ¶
func (r *WritePointsRequest) Size() int
func (*WritePointsRequest) Unmarshal ¶
func (r *WritePointsRequest) Unmarshal(buf []byte) error
type WritePointsResponse ¶
func NewWritePointsResponse ¶
func NewWritePointsResponse(code uint8, errCode errno.Errno, message string) *WritePointsResponse
func (*WritePointsResponse) Instance ¶
func (r *WritePointsResponse) Instance() transport.Codec
func (*WritePointsResponse) Marshal ¶
func (r *WritePointsResponse) Marshal(buf []byte) ([]byte, error)
func (*WritePointsResponse) Size ¶
func (r *WritePointsResponse) Size() int
func (*WritePointsResponse) Unmarshal ¶
func (r *WritePointsResponse) Unmarshal(buf []byte) error
type WriteStreamPointsCallback ¶ added in v1.0.0
type WriteStreamPointsCallback struct {
// contains filtered or unexported fields
}
func (*WriteStreamPointsCallback) GetCodec ¶ added in v1.0.0
func (c *WriteStreamPointsCallback) GetCodec() transport.Codec
func (*WriteStreamPointsCallback) Handle ¶ added in v1.0.0
func (c *WriteStreamPointsCallback) Handle(data interface{}) error
type WriteStreamPointsRequest ¶ added in v1.0.0
type WriteStreamPointsRequest struct {
// contains filtered or unexported fields
}
func NewWriteStreamPointsRequest ¶ added in v1.0.0
func NewWriteStreamPointsRequest(points []byte, streamVar []*StreamVar) *WriteStreamPointsRequest
func (*WriteStreamPointsRequest) Instance ¶ added in v1.0.0
func (w *WriteStreamPointsRequest) Instance() transport.Codec
func (*WriteStreamPointsRequest) Marshal ¶ added in v1.0.0
func (w *WriteStreamPointsRequest) Marshal(buf []byte) ([]byte, error)
func (*WriteStreamPointsRequest) Points ¶ added in v1.0.0
func (w *WriteStreamPointsRequest) Points() []byte
func (*WriteStreamPointsRequest) Size ¶ added in v1.0.0
func (w *WriteStreamPointsRequest) Size() int
func (*WriteStreamPointsRequest) StreamVars ¶ added in v1.0.0
func (w *WriteStreamPointsRequest) StreamVars() []*StreamVar
func (*WriteStreamPointsRequest) Unmarshal ¶ added in v1.0.0
func (w *WriteStreamPointsRequest) Unmarshal(buf []byte) error
type WriteStreamPointsResponse ¶ added in v1.0.0
func NewWriteStreamPointsResponse ¶ added in v1.0.0
func NewWriteStreamPointsResponse(code uint8, errCode errno.Errno, message string) *WriteStreamPointsResponse
func (*WriteStreamPointsResponse) Instance ¶ added in v1.0.0
func (r *WriteStreamPointsResponse) Instance() transport.Codec
func (*WriteStreamPointsResponse) Marshal ¶ added in v1.0.0
func (r *WriteStreamPointsResponse) Marshal(buf []byte) ([]byte, error)
func (*WriteStreamPointsResponse) Size ¶ added in v1.0.0
func (r *WriteStreamPointsResponse) Size() int
func (*WriteStreamPointsResponse) Unmarshal ¶ added in v1.0.0
func (r *WriteStreamPointsResponse) Unmarshal(buf []byte) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.