data_service.proto 5.3 KB
Newer Older
1 2 3 4 5 6 7 8
syntax = "proto3";

package milvus.proto.data;

option go_package = "github.com/zilliztech/milvus-distributed/internal/proto/datapb";

import "common.proto";
import "internal.proto";
S
sunby 已提交
9
import "milvus.proto";
10 11 12


message RegisterNodeRequest {
13
  common.MsgBase base = 1;
14 15 16 17 18
  common.Address address = 2;
}

message RegisterNodeResponse {
  internal.InitParams init_params = 1;
S
sunby 已提交
19
  common.Status status = 2;
20 21 22 23
}


message SegIDRequest {
24
  uint32 count = 1;
S
sunby 已提交
25
  string channelName = 2;
26 27
  int64  collectionID = 3;
  int64 partitionID = 4;
28 29
  string coll_name = 5;// todo remove
  string partition_name = 6; // todo remove
30 31 32 33 34
}

message AssignSegIDRequest {
  int64 nodeID = 1;
  string peer_role = 2;
S
sunby 已提交
35
  repeated SegIDRequest segIDRequests = 3;
36 37 38 39 40
}


message SegIDAssignment {
  int64 segID = 1;
S
sunby 已提交
41
  string channelName = 2;
42 43 44 45 46
  uint32 count = 3;
  int64 collectionID = 4;
  int64 partitionID = 5;
  uint64 expire_time = 6;
  common.Status status = 7;
47 48
  string coll_name = 8;// todo remove
  string partition_name = 9;// todo remove
49 50 51 52
}

message AssignSegIDResponse {
  repeated SegIDAssignment segIDAssignments = 1;
S
sunby 已提交
53
  common.Status status = 2;
54 55 56
}

message FlushRequest {
57
  common.MsgBase base = 1;
58 59 60 61 62
  int64 dbID = 2;
  int64 collectionID = 4;
}

message ShowSegmentRequest {
63
  common.MsgBase base = 1;
64 65
  int64  collectionID = 2;
  int64  partitionID = 3;
S
sunby 已提交
66
  int64  dbID = 4;
67 68 69 70
}

message ShowSegmentResponse {
  repeated int64 segmentIDs = 1;
S
sunby 已提交
71
  common.Status status = 2;
72 73 74
}

message SegmentStatesRequest {
75
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
76 77 78 79 80
  repeated int64  segmentIDs = 2;
}

message SegmentStateInfo {
  int64 segmentID = 1;
Z
zhenshan.cao 已提交
81
  common.SegmentState state = 2;
Z
zhenshan.cao 已提交
82 83 84
  uint64 create_time = 3;
  uint64 sealed_time = 4;
  uint64 flushed_time = 5;
X
XuanYang-cn 已提交
85 86
  internal.MsgPosition start_position = 6;
  internal.MsgPosition end_position = 7;
Z
zhenshan.cao 已提交
87
  common.Status status = 8;
88 89
}

Z
zhenshan.cao 已提交
90 91 92 93 94 95 96 97 98 99
message SegmentInfoRequest {
  common.MsgBase base = 1;
  repeated int64  segmentIDs = 2;
}

message SegmentInfoResponse {
  common.Status status = 1;
  repeated SegmentInfo infos = 2;
}

100
message SegmentStatesResponse {
Z
zhenshan.cao 已提交
101 102
  common.Status status = 1;
  repeated SegmentStateInfo states = 2;
103 104 105
}

message InsertBinlogPathRequest {
106
  common.MsgBase base = 1;
107 108 109 110 111 112
  int64 segmentID = 2;
}

message InsertBinlogPathsResponse {
  repeated int64 fieldIDs = 1;
  repeated internal.StringList paths = 2;
S
sunby 已提交
113
  common.Status status = 3;
114 115 116 117
}


message InsertChannelRequest  {
118
  common.MsgBase base = 1;
119 120 121 122 123 124
  int64  dbID = 2;
  int64  collectionID = 3;
}


message WatchDmChannelRequest {
125
  common.MsgBase base = 1;
S
sunby 已提交
126
  repeated string channelNames = 2;
127 128 129 130
}


message FlushSegRequest {
131
  common.MsgBase base = 1;
132 133 134 135 136
  int64  dbID = 2;
  int64 collectionID = 3;
  repeated int64 segmentIDs = 4;
}

S
sunby 已提交
137
message SegmentInfo {
Z
zhenshan.cao 已提交
138 139 140
  int64 segmentID = 1;
  int64 collectionID = 2;
  int64 partitionID = 3;
S
sunby 已提交
141
  string insert_channel = 4;
Z
zhenshan.cao 已提交
142
  uint64 open_time = 5;
S
sunby 已提交
143 144
  uint64 sealed_time = 6;
  uint64 flushed_time = 7;
Z
zhenshan.cao 已提交
145 146
  int64 num_rows = 8;
  int64 mem_size = 9;
Z
zhenshan.cao 已提交
147
  common.SegmentState state = 10;
X
XuanYang-cn 已提交
148 149
  internal.MsgPosition start_position = 11;
  internal.MsgPosition end_position = 12;
S
sunby 已提交
150
}
151

Z
zhenshan.cao 已提交
152 153 154 155 156
message SegmentMsg{
  common.MsgBase base = 1;
  SegmentInfo segment = 2;
}

S
sunby 已提交
157 158
message CollectionStatsRequest{
  common.MsgBase base = 1;
159 160
  int64 dbID = 2;
  int64 collectionID = 3;
S
sunby 已提交
161 162 163 164 165 166 167 168 169
}

message CollectionStatsResponse {
  repeated common.KeyValuePair stats = 1;
  common.Status status = 2;
}

message PartitionStatsRequest{
  common.MsgBase base = 1;
170 171 172
  int64 dbID = 2;
  int64 collectionID = 3;
  int64 partitionID = 4;
S
sunby 已提交
173 174 175 176 177 178 179
}

message PartitionStatsResponse {
  repeated common.KeyValuePair stats = 1;
  common.Status status = 2;
}

X
XuanYang-cn 已提交
180
message FieldFlushMeta {
Z
zhenshan.cao 已提交
181 182
  int64 fieldID = 1;
  repeated string binlog_paths = 2;
X
XuanYang-cn 已提交
183 184 185
}

message SegmentFlushMeta{
Z
zhenshan.cao 已提交
186 187 188
  int64 segmentID = 1;
  bool is_flushed = 2;
  repeated FieldFlushMeta fields = 5;
X
XuanYang-cn 已提交
189 190 191
}

message DDLFlushMeta {
Z
zhenshan.cao 已提交
192 193
  int64 collectionID = 1;
  repeated string binlog_paths = 2;
X
XuanYang-cn 已提交
194 195
}

196 197 198 199 200 201 202 203 204 205 206
message CollectionCountRequest{
  common.MsgBase base = 1;
  int64 dbID = 2;
  int64 collectionID = 3;
}

message CollectionCountResponse{
  common.Status status = 1;
  int64 count = 2;
}

207 208
service DataService {

Z
zhenshan.cao 已提交
209 210
  rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) {}
  rpc Flush(FlushRequest) returns (common.Status) {}
211

Z
zhenshan.cao 已提交
212 213
  rpc AssignSegmentID(AssignSegIDRequest) returns (AssignSegIDResponse) {}
  rpc ShowSegments(ShowSegmentRequest) returns (ShowSegmentResponse) {}
214

Z
zhenshan.cao 已提交
215
  rpc GetSegmentInfo(SegmentInfoRequest) returns (SegmentInfoResponse) {}
Z
zhenshan.cao 已提交
216 217
  rpc GetSegmentStates(SegmentStatesRequest) returns (SegmentStatesResponse) {}
  rpc GetInsertBinlogPaths(InsertBinlogPathRequest) returns (InsertBinlogPathsResponse) {}
218

Z
zhenshan.cao 已提交
219 220 221
  rpc GetInsertChannels(InsertChannelRequest) returns (internal.StringList) {}
  rpc GetCollectionStatistics(CollectionStatsRequest) returns (CollectionStatsResponse) {}
  rpc GetPartitionStatistics(PartitionStatsRequest) returns (PartitionStatsResponse) {}
222

Z
zhenshan.cao 已提交
223 224 225
  rpc GetComponentStates(common.Empty) returns (internal.ComponentStates) {}
  rpc GetTimeTickChannel(common.Empty) returns(milvus.StringResponse) {}
  rpc GetStatisticsChannel(common.Empty) returns(milvus.StringResponse){}
N
neza2017 已提交
226

Z
zhenshan.cao 已提交
227
  rpc GetSegmentInfoChannel(common.Empty) returns (milvus.StringResponse){}
228
   rpc GetCount(CollectionCountRequest) returns (CollectionCountResponse){}
X
XuanYang-cn 已提交
229
}
X
XuanYang-cn 已提交
230 231 232 233 234 235

service DataNode {
  rpc GetComponentStates(common.Empty) returns (internal.ComponentStates) {}
  rpc WatchDmChannels(WatchDmChannelRequest) returns (common.Status) {}
  rpc FlushSegments(FlushSegRequest) returns(common.Status) {}
}