mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
Update data service docs (#5924)
Signed-off-by: sunby <bingyi.sun@zilliz.com>
This commit is contained in:
parent
441300140d
commit
36fd713a68
@ -11,13 +11,13 @@
|
||||
#### 8.2 Data Service Interface
|
||||
|
||||
```go
|
||||
type DataService interface {
|
||||
type DataCoord interface {
|
||||
Component
|
||||
TimeTickProvider
|
||||
|
||||
RegisterNode(ctx context.Context, req *datapb.RegisterNodeRequest) (*datapb.RegisterNodeResponse, error)
|
||||
Flush(ctx context.Context, req *datapb.FlushRequest) (*commonpb.Status, error)
|
||||
|
||||
RegisterNode(ctx context.Context, req *datapb.RegisterNodeRequest) (*datapb.RegisterNodeResponse, error)
|
||||
AssignSegmentID(ctx context.Context, req *datapb.AssignSegmentIDRequest) (*datapb.AssignSegmentIDResponse, error)
|
||||
ShowSegments(ctx context.Context, req *datapb.ShowSegmentsRequest) (*datapb.ShowSegmentsResponse, error)
|
||||
GetSegmentStates(ctx context.Context, req *datapb.GetSegmentStatesRequest) (*datapb.GetSegmentStatesResponse, error)
|
||||
@ -27,6 +27,8 @@ type DataService interface {
|
||||
GetCollectionStatistics(ctx context.Context, req *datapb.GetCollectionStatisticsRequest) (*datapb.GetCollectionStatisticsResponse, error)
|
||||
GetPartitionStatistics(ctx context.Context, req *datapb.GetPartitionStatisticsRequest) (*datapb.GetPartitionStatisticsResponse, error)
|
||||
GetSegmentInfo(ctx context.Context, req *datapb.GetSegmentInfoRequest) (*datapb.GetSegmentInfoResponse, error)
|
||||
GetRecoveryInfo(ctx context.Context, req *datapb.GetRecoveryInfoRequest) (*datapb.GetRecoveryInfoResponse, error)
|
||||
SaveBinlogPaths(ctx context.Context, req *datapb.SaveBinlogPathsRequest) (*commonpb.Status, error)
|
||||
}
|
||||
```
|
||||
|
||||
@ -78,9 +80,9 @@ type SegmentIDRequest struct {
|
||||
}
|
||||
|
||||
type AssignSegmentIDRequest struct {
|
||||
NodeID int64
|
||||
PeerRole string
|
||||
SegIDRequests []*SegmentIDRequest
|
||||
NodeID int64
|
||||
PeerRole string
|
||||
SegmentIDRequests []*SegmentIDRequest
|
||||
}
|
||||
|
||||
type SegIDAssignment struct {
|
||||
@ -121,8 +123,8 @@ type ShowSegmentsResponse struct {
|
||||
|
||||
```go
|
||||
type GetSegmentStatesRequest struct {
|
||||
Base *commonpb.MsgBase
|
||||
SegmentID UniqueID
|
||||
Base *commonpb.MsgBase
|
||||
SegmentIDs []int64
|
||||
}
|
||||
|
||||
type SegmentState int32
|
||||
@ -133,14 +135,12 @@ const (
|
||||
SegmentState_Growing SegmentState = 2
|
||||
SegmentState_Sealed SegmentState = 3
|
||||
SegmentState_Flushed SegmentState = 4
|
||||
SegmentState_Flushing SegmentState = 5
|
||||
)
|
||||
|
||||
type SegmentStateInfo struct {
|
||||
SegmentID UniqueID
|
||||
State commonpb.SegmentState
|
||||
CreateTime uint64
|
||||
SealedTime uint64
|
||||
FlushedTime uint64
|
||||
StartPosition *internalpb.MsgPosition
|
||||
EndPosition *internalpb.MsgPosition
|
||||
Status *commonpb.Status
|
||||
@ -217,18 +217,16 @@ type GetSegmentInfoRequest struct{
|
||||
}
|
||||
|
||||
type SegmentInfo struct {
|
||||
SegmentID UniqueID
|
||||
CollectionID UniqueID
|
||||
PartitionID UniqueID
|
||||
InsertChannel string
|
||||
OpenTime Timestamp
|
||||
SealedTime Timestamp
|
||||
FlushedTime Timestamp
|
||||
NumRows int64
|
||||
MemSize int64
|
||||
State SegmentState
|
||||
StartPosition []*internalpb.MsgPosition
|
||||
EndPosition []*internalpb.MsgPosition
|
||||
ID int64
|
||||
CollectionID int64
|
||||
PartitionID int64
|
||||
InsertChannel string
|
||||
NumOfRows int64
|
||||
State commonpb.SegmentState
|
||||
DmlPosition *internalpb.MsgPosition
|
||||
MaxRowNum int64
|
||||
LastExpireTime uint64
|
||||
StartPosition *internalpb.MsgPosition
|
||||
}
|
||||
|
||||
type GetSegmentInfoResponse struct{
|
||||
@ -237,6 +235,53 @@ type GetSegmentInfoResponse struct{
|
||||
}
|
||||
```
|
||||
|
||||
* *GetRecoveryInfo*
|
||||
|
||||
```go
|
||||
type GetRecoveryInfoRequest struct {
|
||||
Base *commonpb.MsgBase
|
||||
CollectionID int64
|
||||
PartitionID int64
|
||||
}
|
||||
|
||||
|
||||
type VchannelInfo struct {
|
||||
CollectionID int64
|
||||
ChannelName string
|
||||
SeekPosition *internalpb.MsgPosition
|
||||
UnflushedSegments []*SegmentInfo
|
||||
FlushedSegments []int64
|
||||
}
|
||||
|
||||
type SegmentBinlogs struct {
|
||||
SegmentID int64
|
||||
FieldBinlogs []*FieldBinlog
|
||||
}
|
||||
|
||||
type GetRecoveryInfoResponse struct {
|
||||
Status *commonpb.Status
|
||||
Channels []*VchannelInfo
|
||||
Binlogs []*SegmentBinlogs
|
||||
}
|
||||
```
|
||||
|
||||
* *SaveBinlogPaths*
|
||||
```go
|
||||
type SegmentStartPosition struct {
|
||||
StartPosition *internalpb.MsgPosition
|
||||
SegmentID int64
|
||||
}
|
||||
|
||||
type SaveBinlogPathsRequest struct {
|
||||
Base *commonpb.MsgBase
|
||||
SegmentID int64
|
||||
CollectionID int64
|
||||
Field2BinlogPaths []*ID2PathList
|
||||
CheckPoints []*CheckPoint
|
||||
StartPositions []*SegmentStartPosition
|
||||
Flushed bool
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user