diff --git a/internal/proto/milvus.proto b/internal/proto/milvus.proto index ce996c858e24e54902f474156f5a66249c8c5c8b..a6a59961e5dc04c26b28a7f88c8f16471600340a 100644 --- a/internal/proto/milvus.proto +++ b/internal/proto/milvus.proto @@ -210,34 +210,62 @@ message GetCollectionStatisticsResponse { repeated common.KeyValuePair stats = 2; } - +/* +* This is for ShowCollectionsRequest type field. +*/ enum ShowType { + // Will return all colloections All = 0; + // Will return loaded collections with their inMemory_percentages InMemory = 1; } +/* +* List collections +*/ message ShowCollectionsRequest { - common.MsgBase base = 1; // must + // Not useful for now + common.MsgBase base = 1; + // Not useful for now string db_name = 2; + // Not useful for now uint64 time_stamp = 3; + // Decide return Loaded collections or All collections(Optional) ShowType type = 4; - repeated string collection_names = 5; // show collection in querynode, showType = InMemory + // When type is InMemory, will return these collection's inMemory_percentages.(Optional) + repeated string collection_names = 5; } +/* +* Return basic collection infos. +*/ message ShowCollectionsResponse { + // Contain error_code and reason common.Status status = 1; + // Collection name array repeated string collection_names = 2; + // Collection Id array repeated int64 collection_ids = 3; - repeated uint64 created_timestamps = 4; // hybrid timestamps - repeated uint64 created_utc_timestamps = 5; // physical timestamps - repeated int64 inMemory_percentages = 6; // load percentage on querynode + // Hybrid timestamps in milvus + repeated uint64 created_timestamps = 4; + // The utc timestamp calculated by created_timestamp + repeated uint64 created_utc_timestamps = 5; + // Load percentage on querynode when type is InMemory + repeated int64 inMemory_percentages = 6; } +/* +* Create partition in created collection. +*/ message CreatePartitionRequest { - common.MsgBase base = 1; // must + // Not useful for now + common.MsgBase base = 1; + // Not useful for now string db_name = 2; - string collection_name = 3; // must - string partition_name = 4; // must + // The collection name in milvus + string collection_name = 3; + // The partition name you want to create. + string partition_name = 4; } message DropPartitionRequest { diff --git a/internal/proto/milvuspb/milvus.pb.go b/internal/proto/milvuspb/milvus.pb.go index 7ec8e429d8f0354904ddc07fa65b21555f536c11..dc5bc7e9baab0dd4453e79613cddc66edf221749 100644 --- a/internal/proto/milvuspb/milvus.pb.go +++ b/internal/proto/milvuspb/milvus.pb.go @@ -26,10 +26,14 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +// +// This is for ShowCollectionsRequest type field. type ShowType int32 const ( - ShowType_All ShowType = 0 + // Will return all colloections + ShowType_All ShowType = 0 + // Will return loaded collections with their inMemory_percentages ShowType_InMemory ShowType = 1 ) @@ -961,15 +965,22 @@ func (m *GetCollectionStatisticsResponse) GetStats() []*commonpb.KeyValuePair { return nil } +// +// List collections type ShowCollectionsRequest struct { - Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` - TimeStamp uint64 `protobuf:"varint,3,opt,name=time_stamp,json=timeStamp,proto3" json:"time_stamp,omitempty"` - Type ShowType `protobuf:"varint,4,opt,name=type,proto3,enum=milvus.proto.milvus.ShowType" json:"type,omitempty"` - CollectionNames []string `protobuf:"bytes,5,rep,name=collection_names,json=collectionNames,proto3" json:"collection_names,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Not useful for now + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + // Not useful for now + DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` + // Not useful for now + TimeStamp uint64 `protobuf:"varint,3,opt,name=time_stamp,json=timeStamp,proto3" json:"time_stamp,omitempty"` + // Decide return Loaded collections or All collections(Optional) + Type ShowType `protobuf:"varint,4,opt,name=type,proto3,enum=milvus.proto.milvus.ShowType" json:"type,omitempty"` + // When type is InMemory, will return these collection's inMemory_percentages.(Optional) + CollectionNames []string `protobuf:"bytes,5,rep,name=collection_names,json=collectionNames,proto3" json:"collection_names,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ShowCollectionsRequest) Reset() { *m = ShowCollectionsRequest{} } @@ -1032,16 +1043,24 @@ func (m *ShowCollectionsRequest) GetCollectionNames() []string { return nil } +// +// Return basic collection infos. type ShowCollectionsResponse struct { - Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - CollectionNames []string `protobuf:"bytes,2,rep,name=collection_names,json=collectionNames,proto3" json:"collection_names,omitempty"` - CollectionIds []int64 `protobuf:"varint,3,rep,packed,name=collection_ids,json=collectionIds,proto3" json:"collection_ids,omitempty"` - CreatedTimestamps []uint64 `protobuf:"varint,4,rep,packed,name=created_timestamps,json=createdTimestamps,proto3" json:"created_timestamps,omitempty"` - CreatedUtcTimestamps []uint64 `protobuf:"varint,5,rep,packed,name=created_utc_timestamps,json=createdUtcTimestamps,proto3" json:"created_utc_timestamps,omitempty"` - InMemoryPercentages []int64 `protobuf:"varint,6,rep,packed,name=inMemory_percentages,json=inMemoryPercentages,proto3" json:"inMemory_percentages,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Contain error_code and reason + Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + // Collection name array + CollectionNames []string `protobuf:"bytes,2,rep,name=collection_names,json=collectionNames,proto3" json:"collection_names,omitempty"` + // Collection Id array + CollectionIds []int64 `protobuf:"varint,3,rep,packed,name=collection_ids,json=collectionIds,proto3" json:"collection_ids,omitempty"` + // Hybrid timestamps in milvus + CreatedTimestamps []uint64 `protobuf:"varint,4,rep,packed,name=created_timestamps,json=createdTimestamps,proto3" json:"created_timestamps,omitempty"` + // The utc timestamp calculated by created_timestamp + CreatedUtcTimestamps []uint64 `protobuf:"varint,5,rep,packed,name=created_utc_timestamps,json=createdUtcTimestamps,proto3" json:"created_utc_timestamps,omitempty"` + // Load percentage on querynode when type is InMemory + InMemoryPercentages []int64 `protobuf:"varint,6,rep,packed,name=inMemory_percentages,json=inMemoryPercentages,proto3" json:"inMemory_percentages,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ShowCollectionsResponse) Reset() { *m = ShowCollectionsResponse{} } @@ -1111,14 +1130,20 @@ func (m *ShowCollectionsResponse) GetInMemoryPercentages() []int64 { return nil } +// +// Create partition in created collection. type CreatePartitionRequest struct { - Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` - CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` - PartitionName string `protobuf:"bytes,4,opt,name=partition_name,json=partitionName,proto3" json:"partition_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Not useful for now + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + // Not useful for now + DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` + // The collection name in milvus + CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` + // The partition name you want to create. + PartitionName string `protobuf:"bytes,4,opt,name=partition_name,json=partitionName,proto3" json:"partition_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CreatePartitionRequest) Reset() { *m = CreatePartitionRequest{} }