2021-01-14 14:24:14 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package milvus.proto.data;
|
|
|
|
|
|
|
|
option go_package = "github.com/zilliztech/milvus-distributed/internal/proto/datapb";
|
|
|
|
|
|
|
|
import "common.proto";
|
|
|
|
import "internal.proto";
|
2021-01-22 11:07:07 +08:00
|
|
|
import "milvus.proto";
|
2021-01-14 14:24:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
message RegisterNodeRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 14:24:14 +08:00
|
|
|
common.Address address = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message RegisterNodeResponse {
|
|
|
|
internal.InitParams init_params = 1;
|
2021-01-22 11:07:07 +08:00
|
|
|
common.Status status = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message SegIDRequest {
|
2021-01-18 19:32:08 +08:00
|
|
|
uint32 count = 1;
|
2021-01-19 12:10:49 +08:00
|
|
|
string channelName = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
int64 collectionID = 3;
|
|
|
|
int64 partitionID = 4;
|
2021-01-18 19:32:08 +08:00
|
|
|
string coll_name = 5;// todo remove
|
|
|
|
string partition_name = 6; // todo remove
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message AssignSegIDRequest {
|
|
|
|
int64 nodeID = 1;
|
|
|
|
string peer_role = 2;
|
2021-01-22 11:07:07 +08:00
|
|
|
repeated SegIDRequest segIDRequests = 3;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message SegIDAssignment {
|
|
|
|
int64 segID = 1;
|
2021-01-19 12:10:49 +08:00
|
|
|
string channelName = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
uint32 count = 3;
|
|
|
|
int64 collectionID = 4;
|
|
|
|
int64 partitionID = 5;
|
|
|
|
uint64 expire_time = 6;
|
|
|
|
common.Status status = 7;
|
2021-01-18 19:32:08 +08:00
|
|
|
string coll_name = 8;// todo remove
|
|
|
|
string partition_name = 9;// todo remove
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message AssignSegIDResponse {
|
|
|
|
repeated SegIDAssignment segIDAssignments = 1;
|
2021-01-19 12:10:49 +08:00
|
|
|
common.Status status = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message FlushRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 14:24:14 +08:00
|
|
|
int64 dbID = 2;
|
|
|
|
int64 collectionID = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ShowSegmentRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 14:24:14 +08:00
|
|
|
int64 collectionID = 2;
|
|
|
|
int64 partitionID = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ShowSegmentResponse {
|
|
|
|
repeated int64 segmentIDs = 1;
|
2021-01-22 11:07:07 +08:00
|
|
|
common.Status status = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
enum SegmentState {
|
|
|
|
SegmentNone = 0;
|
|
|
|
SegmentNotExist = 1;
|
|
|
|
SegmentGrowing = 2;
|
|
|
|
SegmentSealed = 3;
|
2021-01-22 11:07:07 +08:00
|
|
|
SegmentFlushed = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message SegmentStatesRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 14:24:14 +08:00
|
|
|
int64 segmentID = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SegmentStatesResponse {
|
|
|
|
SegmentState state = 1;
|
|
|
|
uint64 create_time = 2;
|
|
|
|
uint64 sealed_time = 3;
|
2021-01-22 11:07:07 +08:00
|
|
|
uint64 flushed_time = 4;
|
|
|
|
repeated internal.MsgPosition start_positions = 5;
|
|
|
|
repeated internal.MsgPosition end_positions = 6;
|
|
|
|
common.Status status = 7;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message InsertBinlogPathRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 14:24:14 +08:00
|
|
|
int64 segmentID = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message InsertBinlogPathsResponse {
|
|
|
|
repeated int64 fieldIDs = 1;
|
|
|
|
repeated internal.StringList paths = 2;
|
2021-01-22 11:07:07 +08:00
|
|
|
common.Status status = 3;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message InsertChannelRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 14:24:14 +08:00
|
|
|
int64 dbID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message WatchDmChannelRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-19 12:10:49 +08:00
|
|
|
repeated string channelNames = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message FlushSegRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 14:24:14 +08:00
|
|
|
int64 dbID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
repeated int64 segmentIDs = 4;
|
|
|
|
}
|
|
|
|
|
2021-01-15 17:09:41 +08:00
|
|
|
message SegmentInfo {
|
|
|
|
int64 segmentID=1;
|
|
|
|
int64 collectionID =2;
|
|
|
|
int64 partitionID=3;
|
|
|
|
repeated string insert_channels = 4;
|
|
|
|
uint64 open_time=5;
|
2021-01-22 11:07:07 +08:00
|
|
|
uint64 sealed_time = 6;
|
|
|
|
uint64 flushed_time = 7;
|
|
|
|
int64 num_rows=8;
|
|
|
|
int64 mem_size=9;
|
|
|
|
SegmentState state = 10;
|
2021-01-25 15:17:17 +08:00
|
|
|
repeated internal.MsgPosition start_position = 11;
|
|
|
|
repeated internal.MsgPosition end_position = 12;
|
2021-01-15 17:09:41 +08:00
|
|
|
}
|
2021-01-14 14:24:14 +08:00
|
|
|
|
2021-01-20 09:36:50 +08:00
|
|
|
message SegmentMsg{
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
SegmentInfo segment = 2;
|
|
|
|
}
|
|
|
|
|
2021-01-22 11:07:07 +08:00
|
|
|
message CollectionStatsRequest{
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
string db_name = 2;
|
|
|
|
string collection_name = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CollectionStatsResponse {
|
|
|
|
repeated common.KeyValuePair stats = 1;
|
|
|
|
common.Status status = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PartitionStatsRequest{
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
string db_name = 2;
|
|
|
|
string collection_name = 3;
|
|
|
|
string partition_name = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PartitionStatsResponse {
|
|
|
|
repeated common.KeyValuePair stats = 1;
|
|
|
|
common.Status status = 2;
|
|
|
|
}
|
|
|
|
|
2021-01-22 09:36:40 +08:00
|
|
|
message FieldFlushMeta {
|
|
|
|
int64 fieldID = 1;
|
|
|
|
repeated string binlog_paths = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SegmentFlushMeta{
|
|
|
|
int64 segmentID = 1;
|
|
|
|
bool is_flushed = 2;
|
|
|
|
repeated FieldFlushMeta fields = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DDLFlushMeta {
|
|
|
|
int64 collectionID = 1;
|
|
|
|
repeated string binlog_paths = 2;
|
|
|
|
}
|
|
|
|
|
2021-01-14 14:24:14 +08:00
|
|
|
service DataService {
|
|
|
|
|
|
|
|
rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) {}
|
|
|
|
rpc Flush(FlushRequest) returns (common.Status) {}
|
|
|
|
|
|
|
|
rpc AssignSegmentID(AssignSegIDRequest) returns (AssignSegIDResponse) {}
|
|
|
|
rpc ShowSegments(ShowSegmentRequest) returns (ShowSegmentResponse) {}
|
|
|
|
|
|
|
|
rpc GetSegmentStates(SegmentStatesRequest) returns (SegmentStatesResponse) {}
|
|
|
|
rpc GetInsertBinlogPaths(InsertBinlogPathRequest) returns (InsertBinlogPathsResponse) {}
|
|
|
|
|
|
|
|
rpc GetInsertChannels(InsertChannelRequest) returns (internal.StringList) {}
|
2021-01-22 11:07:07 +08:00
|
|
|
rpc GetCollectionStatistics(CollectionStatsRequest) returns (CollectionStatsResponse) {}
|
|
|
|
rpc GetPartitionStatistics(PartitionStatsRequest) returns (PartitionStatsResponse) {}
|
2021-01-14 14:24:14 +08:00
|
|
|
|
2021-01-22 11:07:07 +08:00
|
|
|
rpc GetComponentStates(common.Empty) returns (internal.ComponentStates) {}
|
|
|
|
rpc GetTimeTickChannel(common.Empty) returns(milvus.StringResponse) {}
|
|
|
|
rpc GetStatisticsChannel(common.Empty) returns(milvus.StringResponse){}
|
2021-01-25 15:17:17 +08:00
|
|
|
|
|
|
|
rpc GetSegmentInfoChannel(common.Empty) returns (milvus.StringResponse){}
|
2021-01-22 09:36:40 +08:00
|
|
|
}
|
2021-01-24 21:20:11 +08:00
|
|
|
|
|
|
|
service DataNode {
|
|
|
|
rpc GetComponentStates(common.Empty) returns (internal.ComponentStates) {}
|
|
|
|
rpc WatchDmChannels(WatchDmChannelRequest) returns (common.Status) {}
|
|
|
|
rpc FlushSegments(FlushSegRequest) returns(common.Status) {}
|
|
|
|
}
|