mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
2.3 KiB
2.3 KiB
8. Data Service
8.1 Overview
8.2 Data Service API
type Client interface {
RegisterNode(req NodeInfo) (InitParams, error)
AssignSegmentID(req AssignSegIDRequest) (AssignSegIDResponse, error)
Flush(req FlushRequest) error
ShowSegments(req ShowSegmentRequest) (ShowSegmentResponse, error)
GetSegmentStates(req SegmentStatesRequest) (SegmentStatesResponse, error)
GetInsertBinlogPaths(req InsertBinlogPathRequest) (InsertBinlogPathsResponse, error)
GetInsertChannels(req InsertChannelRequest) ([]string, error)
GetTimeTickChannel() (string, error)
GetStatsChannel() (string, error)
}
- RegisterNode
type NodeInfo struct {}
type InitParams struct {}
- AssignSegmentID
type SegIDRequest struct {
Count uint32
ChannelID string
CollectionID UniqueID
PartitionID UniqueID
}
type AssignSegIDRequest struct {
PerChannelRequest []SegIDRequest
}
type SegIDAssignment struct {
SegID UniqueID
ChannelID string
Count uint32
CollectionID UniqueID
PartitionID UniqueID
ExpireTime Timestamp
}
type AssignSegIDResponse struct {
PerChannelResponse []SegIDAssignment
}
- Flush
type FlushRequest struct {
DbID UniqueID
CollectionID UniqueID
}
- ShowSegments
type ShowSegmentRequest struct {
CollectionID UniqueID
PartitionID UniqueID
}
type ShowSegmentResponse struct {
SegmentIDs []UniqueID
}
- GetSegmentStates
enum SegmentState {
NONE = 0;
NOT_EXIST = 1;
GROWING = 2;
SEALED = 3;
}
type SegmentStatesRequest struct {
SegmentID UniqueID
}
type SegmentStatesResponse struct {
State SegmentState
CreateTime Timestamp
SealedTime Timestamp
}
- GetInsertBinlogPaths
type InsertBinlogPathRequest struct {
SegmentID UniqueID
}
type InsertBinlogPathsResponse struct {
FieldIDToPaths map[int64][]string
}
- GetInsertChannels
type InsertChannelRequest struct {
DbID UniqueID
CollectionID UniqueID
}
8.2 Data Node API
type DataNode interface {
Start() error
Close() error
WatchDmChannels(channelIDs []string) error
WatchDdChannel(channelID string) error
SetTimeTickChannel(channelID string) error
SetStatsChannel(channelID string) error
Flush(req FlushRequest) error
}