mirror of https://github.com/milvus-io/milvus.git
parent
1dad3ddaad
commit
4cf6e079bc
3
Makefile
3
Makefile
|
@ -1,3 +0,0 @@
|
|||
master-proto-gen:
|
||||
protoc --go_out=plugins=grpc,paths=source_relative:. pkg/master/grpc/master/master.proto
|
||||
protoc --go_out=plugins=grpc,paths=source_relative:. pkg/master/grpc/message/message.proto
|
74
conf/conf.go
74
conf/conf.go
|
@ -1,74 +0,0 @@
|
|||
package conf
|
||||
|
||||
import (
|
||||
"github.com/czs007/suvlim/storage/pkg/types"
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
// yaml.MapSlice
|
||||
|
||||
type MasterConfig struct {
|
||||
Address string
|
||||
Port int32
|
||||
}
|
||||
|
||||
type EtcdConfig struct {
|
||||
Address string
|
||||
Port int32
|
||||
Rootpath string
|
||||
Segthreshold int64
|
||||
}
|
||||
|
||||
type TimeSyncConfig struct {
|
||||
Interval int32
|
||||
}
|
||||
|
||||
type StorageConfig struct {
|
||||
Driver types.DriverType
|
||||
Address string
|
||||
Port int32
|
||||
Accesskey string
|
||||
Secretkey string
|
||||
}
|
||||
|
||||
type PulsarConfig struct {
|
||||
Address string
|
||||
Port int32
|
||||
}
|
||||
|
||||
//type ProxyConfig struct {
|
||||
// Timezone string
|
||||
// Address string
|
||||
// Port int32
|
||||
//}
|
||||
|
||||
type ServerConfig struct {
|
||||
Master MasterConfig
|
||||
Etcd EtcdConfig
|
||||
Timesync TimeSyncConfig
|
||||
Storage StorageConfig
|
||||
Pulsar PulsarConfig
|
||||
//Proxy ProxyConfig
|
||||
}
|
||||
|
||||
var Config ServerConfig
|
||||
|
||||
func init() {
|
||||
load_config()
|
||||
}
|
||||
|
||||
func load_config() {
|
||||
//var config ServerConfig
|
||||
filename := "conf/config.yaml"
|
||||
source, err := ioutil.ReadFile(filename)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = yaml.Unmarshal(source, &Config)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
//fmt.Printf("Result: %v\n", Config)
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
package conf
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
fmt.Printf("Result: %v\n", Config)
|
||||
}
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
# or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
master:
|
||||
address: localhost
|
||||
port: 6000
|
||||
|
||||
etcd:
|
||||
address: localhost
|
||||
port: 0
|
||||
rootpath: a
|
||||
segthreshold: 10000
|
||||
|
||||
timesync:
|
||||
interval: 10
|
||||
|
||||
storage:
|
||||
driver: MinIO
|
||||
address: localhost
|
||||
port: 0
|
||||
accesskey: ab
|
||||
secretkey: dd
|
||||
|
||||
pulsar:
|
||||
address: 0.0.0.0
|
||||
port: 6650
|
||||
|
||||
proxy:
|
||||
timezone: UTC+8
|
||||
|
||||
network:
|
||||
address: 0.0.0.0
|
||||
port: 19530
|
||||
|
||||
logs:
|
||||
level: debug
|
||||
trace.enable: true
|
||||
path: /tmp/logs
|
||||
max_log_file_size: 1024MB
|
||||
log_rotate_num: 0
|
||||
|
||||
storage:
|
||||
path: /var/lib/milvus
|
||||
auto_flush_interval: 1
|
|
@ -0,0 +1,188 @@
|
|||
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
# or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
version: 0.5
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Cluster Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# enable | If running with Mishards, set true, otherwise false. | Boolean | false |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# role | Milvus deployment role: rw / ro | Role | rw |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
cluster:
|
||||
enable: false
|
||||
role: rw
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# General Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# timezone | Use UTC-x or UTC+x to specify a time zone. | Timezone | UTC+8 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# meta_uri | URI for metadata storage, using SQLite (for single server | URI | sqlite://:@:/ |
|
||||
# | Milvus) or MySQL (for distributed cluster Milvus). | | |
|
||||
# | Format: dialect://username:password@host:port/database | | |
|
||||
# | Keep 'dialect://:@:/', 'dialect' can be either 'sqlite' or | | |
|
||||
# | 'mysql', replace other texts with real values. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
general:
|
||||
timezone: UTC+8
|
||||
meta_uri: sqlite://:@:/
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Network Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# bind.address | IP address that Milvus server monitors. | IP | 0.0.0.0 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# bind.port | Port that Milvus server monitors. Port range (1024, 65535) | Integer | 19530 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# http.enable | Enable HTTP server or not. | Boolean | true |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# http.port | Port that Milvus HTTP server monitors. | Integer | 19121 |
|
||||
# | Port range (1024, 65535) | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
network:
|
||||
bind.address: 0.0.0.0
|
||||
bind.port: 19530
|
||||
http.enable: true
|
||||
http.port: 19121
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Storage Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# path | Path used to save meta data, vector data and index data. | Path | /var/lib/milvus |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# auto_flush_interval | The interval, in seconds, at which Milvus automatically | Integer | 1 (s) |
|
||||
# | flushes data to disk. | | |
|
||||
# | 0 means disable the regular flush. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
storage:
|
||||
path: @MILVUS_DB_PATH@
|
||||
auto_flush_interval: 1
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# WAL Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# enable | Whether to enable write-ahead logging (WAL) in Milvus. | Boolean | true |
|
||||
# | If WAL is enabled, Milvus writes all data changes to log | | |
|
||||
# | files in advance before implementing data changes. WAL | | |
|
||||
# | ensures the atomicity and durability for Milvus operations.| | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# recovery_error_ignore| Whether to ignore logs with errors that happens during WAL | Boolean | false |
|
||||
# | recovery. If true, when Milvus restarts for recovery and | | |
|
||||
# | there are errors in WAL log files, log files with errors | | |
|
||||
# | are ignored. If false, Milvus does not restart when there | | |
|
||||
# | are errors in WAL log files. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# buffer_size | Sum total of the read buffer and the write buffer in Bytes.| String | 256MB |
|
||||
# | buffer_size must be in range [64MB, 4096MB]. | | |
|
||||
# | If the value you specified is out of range, Milvus | | |
|
||||
# | automatically uses the boundary value closest to the | | |
|
||||
# | specified value. It is recommended you set buffer_size to | | |
|
||||
# | a value greater than the inserted data size of a single | | |
|
||||
# | insert operation for better performance. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# path | Location of WAL log files. | String | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
wal:
|
||||
enable: true
|
||||
recovery_error_ignore: false
|
||||
buffer_size: 256MB
|
||||
path: @MILVUS_DB_PATH@/wal
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Cache Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# cache_size | The size of CPU memory used for caching data for faster | String | 4GB |
|
||||
# | query. The sum of 'cache_size' and 'insert_buffer_size' | | |
|
||||
# | must be less than system memory size. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# insert_buffer_size | Buffer size used for data insertion. | String | 1GB |
|
||||
# | The sum of 'insert_buffer_size' and 'cache_size' | | |
|
||||
# | must be less than system memory size. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# preload_collection | A comma-separated list of collection names that need to | StringList | |
|
||||
# | be pre-loaded when Milvus server starts up. | | |
|
||||
# | '*' means preload all existing tables (single-quote or | | |
|
||||
# | double-quote required). | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
cache:
|
||||
cache_size: 4GB
|
||||
insert_buffer_size: 1GB
|
||||
preload_collection:
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# GPU Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# enable | Use GPU devices or not. | Boolean | false |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# cache_size | The size of GPU memory per card used for cache. | String | 1GB |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# gpu_search_threshold | A Milvus performance tuning parameter. This value will be | Integer | 1000 |
|
||||
# | compared with 'nq' to decide if the search computation will| | |
|
||||
# | be executed on GPUs only. | | |
|
||||
# | If nq >= gpu_search_threshold, the search computation will | | |
|
||||
# | be executed on GPUs only; | | |
|
||||
# | if nq < gpu_search_threshold, the search computation will | | |
|
||||
# | be executed on both CPUs and GPUs. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# search_devices | The list of GPU devices used for search computation. | DeviceList | gpu0 |
|
||||
# | Must be in format gpux. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# build_index_devices | The list of GPU devices used for index building. | DeviceList | gpu0 |
|
||||
# | Must be in format gpux. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
gpu:
|
||||
enable: @GPU_ENABLE@
|
||||
cache_size: 1GB
|
||||
gpu_search_threshold: 1000
|
||||
search_devices:
|
||||
- gpu0
|
||||
build_index_devices:
|
||||
- gpu0
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Logs Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# level | Log level in Milvus. Must be one of debug, info, warning, | String | debug |
|
||||
# | error, fatal | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# trace.enable | Whether to enable trace level logging in Milvus. | Boolean | true |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# path | Absolute path to the folder holding the log files. | String | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# max_log_file_size | The maximum size of each log file, size range | String | 1024MB |
|
||||
# | [512MB, 4096MB]. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# log_rotate_num | The maximum number of log files that Milvus keeps for each | Integer | 0 |
|
||||
# | logging level, num range [0, 1024], 0 means unlimited. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
logs:
|
||||
level: debug
|
||||
trace.enable: true
|
||||
path: @MILVUS_DB_PATH@/logs
|
||||
max_log_file_size: 1024MB
|
||||
log_rotate_num: 0
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Metric Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# enable | Enable monitoring function or not. | Boolean | false |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# address | Pushgateway address | IP | 127.0.0.1 +
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# port | Pushgateway port, port range (1024, 65535) | Integer | 9091 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
metric:
|
||||
enable: false
|
||||
address: 127.0.0.1
|
||||
port: 9091
|
||||
|
|
@ -0,0 +1 @@
|
|||
driver="S3"
|
|
@ -17,27 +17,19 @@ DeleteSegment(CSegmentBase segment);
|
|||
|
||||
int
|
||||
Insert(CSegmentBase c_segment,
|
||||
long int reserved_offset,
|
||||
signed long int size,
|
||||
const long* primary_keys,
|
||||
const unsigned long* primary_keys,
|
||||
const unsigned long* timestamps,
|
||||
void* raw_data,
|
||||
int sizeof_per_row,
|
||||
signed long int count);
|
||||
|
||||
long int
|
||||
PreInsert(CSegmentBase c_segment, long int size);
|
||||
|
||||
int
|
||||
Delete(CSegmentBase c_segment,
|
||||
long int reserved_offset,
|
||||
long size,
|
||||
const long* primary_keys,
|
||||
const unsigned long* primary_keys,
|
||||
const unsigned long* timestamps);
|
||||
|
||||
long int
|
||||
PreDelete(CSegmentBase c_segment, long int size);
|
||||
|
||||
int
|
||||
Search(CSegmentBase c_segment,
|
||||
void* fake_query,
|
||||
|
@ -61,6 +53,24 @@ GetRowCount(CSegmentBase c_segment);
|
|||
long int
|
||||
GetDeletedCount(CSegmentBase c_segment);
|
||||
|
||||
unsigned long
|
||||
GetTimeBegin(CSegmentBase c_segment);
|
||||
|
||||
void
|
||||
SetTimeBegin(CSegmentBase c_segment, unsigned long time_begin);
|
||||
|
||||
unsigned long
|
||||
GetTimeEnd(CSegmentBase c_segment);
|
||||
|
||||
void
|
||||
SetTimeEnd(CSegmentBase c_segment, unsigned long time_end);
|
||||
|
||||
unsigned long
|
||||
GetSegmentId(CSegmentBase c_segment);
|
||||
|
||||
void
|
||||
SetSegmentId(CSegmentBase c_segment, unsigned long segment_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -2,15 +2,15 @@ set(DOG_SEGMENT_FILES
|
|||
SegmentNaive.cpp
|
||||
IndexMeta.cpp
|
||||
ConcurrentVector.cpp
|
||||
Collection.cpp
|
||||
Partition.cpp
|
||||
collection_c.cpp
|
||||
partition_c.cpp
|
||||
segment_c.cpp
|
||||
# Collection.cpp
|
||||
# Partition.cpp
|
||||
# collection_c.cpp
|
||||
# partition_c.cpp
|
||||
# segment_c.cpp
|
||||
)
|
||||
add_library(milvus_dog_segment SHARED
|
||||
${DOG_SEGMENT_FILES}
|
||||
)
|
||||
${DOG_SEGMENT_FILES}
|
||||
)
|
||||
#add_dependencies( segment sqlite mysqlpp )
|
||||
|
||||
target_link_libraries(milvus_dog_segment tbb milvus_utils pthread)
|
||||
|
|
|
@ -3,20 +3,12 @@
|
|||
namespace milvus::dog_segment {
|
||||
|
||||
Collection::Collection(std::string &collection_name, std::string &schema):
|
||||
collection_name_(collection_name), schema_json_(schema) {
|
||||
parse();
|
||||
}
|
||||
collection_name_(collection_name), schema_json_(schema){}
|
||||
|
||||
void
|
||||
Collection::set_index() {}
|
||||
|
||||
void
|
||||
Collection::parse() {
|
||||
auto schema = std::make_shared<Schema>();
|
||||
schema->AddField("fakevec", DataType::VECTOR_FLOAT, 16);
|
||||
schema->AddField("age", DataType::INT32);
|
||||
schema_ = schema;
|
||||
}
|
||||
Collection::parse() {}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,37 +1,51 @@
|
|||
#pragma once
|
||||
|
||||
#include "dog_segment/Partition.h"
|
||||
#include "SegmentDefs.h"
|
||||
|
||||
namespace milvus::dog_segment {
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
class Collection {
|
||||
class Partition {
|
||||
public:
|
||||
explicit Collection(std::string &collection_name, std::string &schema);
|
||||
|
||||
// TODO: set index
|
||||
void set_index();
|
||||
|
||||
// TODO: config to schema
|
||||
void parse();
|
||||
|
||||
public:
|
||||
SchemaPtr& get_schema() {
|
||||
return schema_;
|
||||
}
|
||||
|
||||
std::string& get_collection_name() {
|
||||
return collection_name_;
|
||||
const std::deque<SegmentBasePtr>& segments() const {
|
||||
return segments_;
|
||||
}
|
||||
|
||||
private:
|
||||
// TODO: add Index ptr
|
||||
// IndexPtr index_ = nullptr;
|
||||
std::string collection_name_;
|
||||
std::string schema_json_;
|
||||
SchemaPtr schema_;
|
||||
std::string name_;
|
||||
std::deque<SegmentBasePtr> segments_;
|
||||
};
|
||||
|
||||
using CollectionPtr = std::unique_ptr<Collection>;
|
||||
using PartitionPtr = std::shard_ptr<Partition>;
|
||||
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
class Collection {
|
||||
public:
|
||||
explicit Collection(std::string name): name_(name){}
|
||||
|
||||
// TODO: set index
|
||||
set_index() {}
|
||||
|
||||
set_schema(std::string config) {
|
||||
// TODO: config to schema
|
||||
schema_ = null;
|
||||
}
|
||||
|
||||
public:
|
||||
// std::vector<int64_t> Insert() {
|
||||
// for (auto partition: partitions_) {
|
||||
// for (auto segment: partition.segments()) {
|
||||
// if (segment.Status == Status.open) {
|
||||
// segment.Insert()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
private:
|
||||
// TODO: Index ptr
|
||||
IndexPtr index_ = nullptr;
|
||||
std::string name_;
|
||||
SchemaPtr schema_;
|
||||
std::vector<PartitionPtr> partitions_;
|
||||
};
|
||||
|
|
|
@ -115,7 +115,7 @@ class ConcurrentVector : public VectorBase {
|
|||
|
||||
void
|
||||
set_data_raw(ssize_t element_offset, void* source, ssize_t element_count) override {
|
||||
set_data(element_offset, static_cast<const Type*>(source), element_count);
|
||||
set_data(element_count, static_cast<const Type*>(source), element_count);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -45,7 +45,7 @@ class SegmentBase {
|
|||
|
||||
// query contains metadata of
|
||||
virtual Status
|
||||
Query(query::QueryPtr query, Timestamp timestamp, QueryResult& results) = 0;
|
||||
Query(const query::QueryPtr& query, Timestamp timestamp, QueryResult& results) = 0;
|
||||
|
||||
// // THIS FUNCTION IS REMOVED
|
||||
// virtual Status
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <assert.h>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "utils/Types.h"
|
||||
// #include "knowhere/index/Index.h"
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
#include <dog_segment/SegmentNaive.h>
|
||||
#include <random>
|
||||
|
||||
#include <algorithm>
|
||||
#include <numeric>
|
||||
#include <thread>
|
||||
#include <queue>
|
||||
|
||||
namespace milvus::dog_segment {
|
||||
int
|
||||
|
@ -24,7 +23,7 @@ SegmentNaive::Record::Record(const Schema& schema) : uids_(1), timestamps_(1) {
|
|||
entity_vec_.emplace_back(std::make_shared<ConcurrentVector<float>>(field.get_dim()));
|
||||
} else {
|
||||
assert(field.get_data_type() == DataType::INT32);
|
||||
entity_vec_.emplace_back(std::make_shared<ConcurrentVector<int32_t, true>>());
|
||||
entity_vec_.emplace_back(std::make_shared<ConcurrentVector<int32_t, false>>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,75 +36,7 @@ SegmentNaive::PreInsert(int64_t size) {
|
|||
|
||||
int64_t
|
||||
SegmentNaive::PreDelete(int64_t size) {
|
||||
auto reserved_begin = deleted_record_.reserved.fetch_add(size);
|
||||
return reserved_begin;
|
||||
}
|
||||
|
||||
auto SegmentNaive::get_deleted_bitmap(int64_t del_barrier, Timestamp query_timestamp, int64_t insert_barrier) -> std::shared_ptr<DeletedRecord::TmpBitmap> {
|
||||
auto old = deleted_record_.get_lru_entry();
|
||||
if(old->del_barrier == del_barrier) {
|
||||
return old;
|
||||
}
|
||||
auto current = std::make_shared<DeletedRecord::TmpBitmap>(*old);
|
||||
auto& vec = current->bitmap;
|
||||
|
||||
if(del_barrier < old->del_barrier) {
|
||||
for(auto del_index = del_barrier; del_index < old->del_barrier; ++del_index) {
|
||||
// get uid in delete logs
|
||||
auto uid = deleted_record_.uids_[del_index];
|
||||
// map uid to corrensponding offsets, select the max one, which should be the target
|
||||
// the max one should be closest to query_timestamp, so the delete log should refer to it
|
||||
int64_t the_offset = -1;
|
||||
auto [iter_b, iter_e] = uid2offset_.equal_range(uid);
|
||||
for(auto iter = iter_b; iter != iter_e; ++iter) {
|
||||
auto offset = iter->second;
|
||||
if(record_.timestamps_[offset] < query_timestamp) {
|
||||
assert(offset < vec.size());
|
||||
the_offset = std::max(the_offset, offset);
|
||||
}
|
||||
}
|
||||
// if not found, skip
|
||||
if(the_offset == -1) {
|
||||
continue;
|
||||
}
|
||||
// otherwise, clear the flag
|
||||
vec[the_offset] = false;
|
||||
}
|
||||
return current;
|
||||
} else {
|
||||
vec.resize(insert_barrier);
|
||||
for(auto del_index = old->del_barrier; del_index < del_barrier; ++del_index) {
|
||||
// get uid in delete logs
|
||||
auto uid = deleted_record_.uids_[del_index];
|
||||
// map uid to corrensponding offsets, select the max one, which should be the target
|
||||
// the max one should be closest to query_timestamp, so the delete log should refer to it
|
||||
int64_t the_offset = -1;
|
||||
auto [iter_b, iter_e] = uid2offset_.equal_range(uid);
|
||||
for(auto iter = iter_b; iter != iter_e; ++iter) {
|
||||
auto offset = iter->second;
|
||||
if(offset >= insert_barrier){
|
||||
continue;
|
||||
}
|
||||
if(offset >= vec.size()) {
|
||||
continue;
|
||||
}
|
||||
if(record_.timestamps_[offset] < query_timestamp) {
|
||||
assert(offset < vec.size());
|
||||
the_offset = std::max(the_offset, offset);
|
||||
}
|
||||
}
|
||||
|
||||
// if not found, skip
|
||||
if(the_offset == -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// otherwise, set the flag
|
||||
vec[the_offset] = true;
|
||||
}
|
||||
this->deleted_record_.insert_lru_entry(current);
|
||||
}
|
||||
return current;
|
||||
throw std::runtime_error("unimplemented");
|
||||
}
|
||||
|
||||
Status
|
||||
|
@ -156,13 +87,7 @@ SegmentNaive::Insert(int64_t reserved_begin, int64_t size, const int64_t* uids_r
|
|||
record_.entity_vec_[fid]->set_data_raw(reserved_begin, entities[fid].data(), size);
|
||||
}
|
||||
|
||||
for(int i = 0; i < uids.size(); ++i) {
|
||||
auto uid = uids[i];
|
||||
// NOTE: this must be the last step, cannot be put above
|
||||
uid2offset_.insert(std::make_pair(uid, reserved_begin + i));
|
||||
}
|
||||
|
||||
record_.ack_responder_.AddSegment(reserved_begin, reserved_begin + size);
|
||||
record_.ack_responder_.AddSegment(reserved_begin, size);
|
||||
return Status::OK();
|
||||
|
||||
// std::thread go(executor, std::move(uids), std::move(timestamps), std::move(entities));
|
||||
|
@ -197,26 +122,8 @@ SegmentNaive::Insert(int64_t reserved_begin, int64_t size, const int64_t* uids_r
|
|||
}
|
||||
|
||||
Status
|
||||
SegmentNaive::Delete(int64_t reserved_begin, int64_t size, const int64_t* uids_raw, const Timestamp* timestamps_raw) {
|
||||
std::vector<std::tuple<Timestamp, idx_t>> ordering;
|
||||
ordering.resize(size);
|
||||
// #pragma omp parallel for
|
||||
for (int i = 0; i < size; ++i) {
|
||||
ordering[i] = std::make_tuple(timestamps_raw[i], uids_raw[i]);
|
||||
}
|
||||
std::sort(ordering.begin(), ordering.end());
|
||||
std::vector<idx_t> uids(size);
|
||||
std::vector<Timestamp> timestamps(size);
|
||||
// #pragma omp parallel for
|
||||
for (int index = 0; index < size; ++index) {
|
||||
auto [t, uid] = ordering[index];
|
||||
timestamps[index] = t;
|
||||
uids[index] = uid;
|
||||
}
|
||||
deleted_record_.timestamps_.set_data(reserved_begin, timestamps.data(), size);
|
||||
deleted_record_.uids_.set_data(reserved_begin, uids.data(), size);
|
||||
deleted_record_.ack_responder_.AddSegment(reserved_begin, reserved_begin + size);
|
||||
return Status::OK();
|
||||
SegmentNaive::Delete(int64_t reserved_offset, int64_t size, const int64_t* primary_keys, const Timestamp* timestamps) {
|
||||
throw std::runtime_error("unimplemented");
|
||||
// for (int i = 0; i < size; ++i) {
|
||||
// auto key = primary_keys[i];
|
||||
// auto time = timestamps[i];
|
||||
|
@ -263,123 +170,49 @@ SegmentNaive::QueryImpl(const query::QueryPtr& query, Timestamp timestamp, Query
|
|||
// return Status::OK();
|
||||
}
|
||||
|
||||
template<typename RecordType>
|
||||
int64_t get_barrier(const RecordType& record, Timestamp timestamp) {
|
||||
auto& vec = record.timestamps_;
|
||||
int64_t beg = 0;
|
||||
int64_t end = record.ack_responder_.GetAck();
|
||||
while (beg < end) {
|
||||
auto mid = (beg + end) / 2;
|
||||
if (vec[mid] < timestamp) {
|
||||
beg = mid + 1;
|
||||
} else {
|
||||
end = mid;
|
||||
}
|
||||
}
|
||||
return beg;
|
||||
}
|
||||
|
||||
Status
|
||||
SegmentNaive::Query(query::QueryPtr query_info, Timestamp timestamp, QueryResult& result) {
|
||||
SegmentNaive::Query(const query::QueryPtr& query, Timestamp timestamp, QueryResult& result) {
|
||||
// TODO: enable delete
|
||||
// TODO: enable index
|
||||
|
||||
if(query_info == nullptr) {
|
||||
query_info = std::make_shared<query::Query>();
|
||||
query_info->field_name = "fakevec";
|
||||
query_info->topK = 10;
|
||||
query_info->num_queries = 1;
|
||||
|
||||
auto dim = schema_->operator[]("fakevec").get_dim();
|
||||
std::default_random_engine e(42);
|
||||
std::uniform_real_distribution<> dis(0.0, 1.0);
|
||||
query_info->query_raw_data.resize(query_info->num_queries * dim);
|
||||
for(auto& x: query_info->query_raw_data) {
|
||||
x = dis(e);
|
||||
}
|
||||
}
|
||||
|
||||
auto& field = schema_->operator[](query_info->field_name);
|
||||
auto& field = schema_->operator[](0);
|
||||
assert(field.get_name() == "fakevec");
|
||||
assert(field.get_data_type() == DataType::VECTOR_FLOAT);
|
||||
|
||||
auto dim = field.get_dim();
|
||||
auto topK = query_info->topK;
|
||||
auto num_queries = query_info->num_queries;
|
||||
assert(query == nullptr);
|
||||
int64_t barrier = [&]
|
||||
{
|
||||
auto& vec = record_.timestamps_;
|
||||
int64_t beg = 0;
|
||||
int64_t end = record_.ack_responder_.GetAck();
|
||||
while (beg < end) {
|
||||
auto mid = (beg + end) / 2;
|
||||
if (vec[mid] < timestamp) {
|
||||
end = mid + 1;
|
||||
} else {
|
||||
beg = mid;
|
||||
}
|
||||
|
||||
auto barrier = get_barrier(record_, timestamp);
|
||||
auto del_barrier = get_barrier(deleted_record_, timestamp);
|
||||
auto bitmap_holder = get_deleted_bitmap(del_barrier, timestamp, barrier);
|
||||
|
||||
if (!bitmap_holder) {
|
||||
throw std::runtime_error("fuck");
|
||||
}
|
||||
|
||||
auto bitmap = &bitmap_holder->bitmap;
|
||||
|
||||
if(topK > barrier) {
|
||||
topK = barrier;
|
||||
}
|
||||
|
||||
auto get_L2_distance = [dim](const float* a, const float* b) {
|
||||
float L2_distance = 0;
|
||||
for(auto i = 0; i < dim; ++i) {
|
||||
auto d = a[i] - b[i];
|
||||
L2_distance += d * d;
|
||||
}
|
||||
return L2_distance;
|
||||
};
|
||||
|
||||
std::vector<std::priority_queue<std::pair<float, int>>> records(num_queries);
|
||||
return beg;
|
||||
}();
|
||||
// search until barriers
|
||||
// TODO: optimize
|
||||
auto vec_ptr = std::static_pointer_cast<ConcurrentVector<float>>(record_.entity_vec_[0]);
|
||||
for(int64_t i = 0; i < barrier; ++i) {
|
||||
if(i < bitmap->size() && bitmap->at(i)) {
|
||||
continue;
|
||||
}
|
||||
auto element = vec_ptr->get_element(i);
|
||||
for(auto query_id = 0; query_id < num_queries; ++query_id) {
|
||||
auto query_blob = query_info->query_raw_data.data() + query_id * dim;
|
||||
auto dis = get_L2_distance(query_blob, element);
|
||||
auto& record = records[query_id];
|
||||
if(record.size() < topK) {
|
||||
record.emplace(dis, i);
|
||||
} else if(record.top().first > dis) {
|
||||
record.emplace(dis, i);
|
||||
record.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
result.num_queries_ = num_queries;
|
||||
result.topK_ = topK;
|
||||
auto row_num = topK * num_queries;
|
||||
result.row_num_ = topK * num_queries;
|
||||
|
||||
result.result_ids_.resize(row_num);
|
||||
result.result_distances_.resize(row_num);
|
||||
|
||||
for(int q_id = 0; q_id < num_queries; ++q_id) {
|
||||
// reverse
|
||||
for(int i = 0; i < topK; ++i) {
|
||||
auto dst_id = topK - 1 - i + q_id * topK;
|
||||
auto [dis, offset] = records[q_id].top();
|
||||
records[q_id].pop();
|
||||
result.result_ids_[dst_id] = record_.uids_[offset];
|
||||
result.result_distances_[dst_id] = dis;
|
||||
}
|
||||
// auto element =
|
||||
throw std::runtime_error("unimplemented");
|
||||
}
|
||||
|
||||
return Status::OK();
|
||||
// find end of binary
|
||||
// throw std::runtime_error("unimplemented");
|
||||
// auto record_ptr = GetMutableRecord();
|
||||
// if (record_ptr) {
|
||||
// return QueryImpl(*record_ptr, query, timestamp, result);
|
||||
// } else {
|
||||
// assert(ready_immutable_);
|
||||
// return QueryImpl(*record_immutable_, query, timestamp, result);
|
||||
// }
|
||||
// find end of binary
|
||||
// throw std::runtime_error("unimplemented");
|
||||
// auto record_ptr = GetMutableRecord();
|
||||
// if (record_ptr) {
|
||||
// return QueryImpl(*record_ptr, query, timestamp, result);
|
||||
// } else {
|
||||
// assert(ready_immutable_);
|
||||
// return QueryImpl(*record_immutable_, query, timestamp, result);
|
||||
// }
|
||||
}
|
||||
|
||||
Status
|
||||
|
|
|
@ -58,7 +58,7 @@ class SegmentNaive : public SegmentBase {
|
|||
|
||||
// query contains metadata of
|
||||
Status
|
||||
Query(query::QueryPtr query_info, Timestamp timestamp, QueryResult& results) override;
|
||||
Query(const query::QueryPtr& query, Timestamp timestamp, QueryResult& results) override;
|
||||
|
||||
// stop receive insert requests
|
||||
// will move data to immutable vector or something
|
||||
|
@ -105,40 +105,6 @@ class SegmentNaive : public SegmentBase {
|
|||
Record(const Schema& schema);
|
||||
};
|
||||
|
||||
tbb::concurrent_unordered_multimap<idx_t, int64_t> uid2offset_;
|
||||
|
||||
struct DeletedRecord {
|
||||
std::atomic<int64_t> reserved = 0;
|
||||
AckResponder ack_responder_;
|
||||
ConcurrentVector<Timestamp, true> timestamps_;
|
||||
ConcurrentVector<idx_t, true> uids_;
|
||||
struct TmpBitmap {
|
||||
// Just for query
|
||||
int64_t del_barrier = 0;
|
||||
std::vector<char> bitmap;
|
||||
|
||||
|
||||
};
|
||||
std::shared_ptr<TmpBitmap> lru_;
|
||||
std::shared_mutex shared_mutex_;
|
||||
|
||||
DeletedRecord(): lru_(std::make_shared<TmpBitmap>()) {}
|
||||
auto get_lru_entry() {
|
||||
std::shared_lock lck(shared_mutex_);
|
||||
return lru_;
|
||||
}
|
||||
void insert_lru_entry(std::shared_ptr<TmpBitmap> new_entry) {
|
||||
std::lock_guard lck(shared_mutex_);
|
||||
if(new_entry->del_barrier <= lru_->del_barrier) {
|
||||
// DO NOTHING
|
||||
return;
|
||||
}
|
||||
lru_ = std::move(new_entry);
|
||||
}
|
||||
};
|
||||
|
||||
std::shared_ptr<DeletedRecord::TmpBitmap> get_deleted_bitmap(int64_t del_barrier, Timestamp query_timestamp, int64_t insert_barrier);
|
||||
|
||||
Status
|
||||
QueryImpl(const query::QueryPtr& query, Timestamp timestamp, QueryResult& results);
|
||||
|
||||
|
@ -168,7 +134,7 @@ class SegmentNaive : public SegmentBase {
|
|||
IndexMetaPtr index_meta_;
|
||||
std::atomic<SegmentState> state_ = SegmentState::Open;
|
||||
Record record_;
|
||||
DeletedRecord deleted_record_;
|
||||
|
||||
// tbb::concurrent_unordered_map<uint64_t, int> internal_indexes_;
|
||||
// std::shared_ptr<MutableRecord> record_mutable_;
|
||||
// // to determined that if immutable data if available
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
package main
|
||||
|
||||
/*
|
||||
|
||||
#cgo CFLAGS: -I./
|
||||
|
||||
#cgo LDFLAGS: -L/home/sheep/workspace/milvus/sheep/suvlim/core/cmake-build-debug/src/dog_segment -lmilvus_dog_segment -Wl,-rpath=/home/sheep/workspace/milvus/sheep/suvlim/core/cmake-build-debug/src/dog_segment
|
||||
|
||||
#include "cwrap.h"
|
||||
|
||||
*/
|
||||
import "C"
|
||||
import (
|
||||
"fmt"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func testInsert() {
|
||||
const DIM = 4
|
||||
const N = 3
|
||||
|
||||
var ids = [N]uint64{1, 2, 3}
|
||||
var timestamps = [N]uint64{0, 0, 0}
|
||||
|
||||
var vec = [DIM]float32{1.1, 2.2, 3.3, 4.4}
|
||||
var rawData []int8
|
||||
|
||||
for i := 0; i <= N; i++ {
|
||||
for _, ele := range vec {
|
||||
rawData=append(rawData, int8(ele))
|
||||
}
|
||||
rawData=append(rawData, int8(i))
|
||||
}
|
||||
|
||||
var segment = C.SegmentBaseInit()
|
||||
fmt.Println(segment)
|
||||
|
||||
const sizeofPerRow = 4 + DIM * 4
|
||||
var res = C.Insert(segment, N, (*C.ulong)(&ids[0]), (*C.ulong)(×tamps[0]), unsafe.Pointer(&rawData[0]), C.int(sizeofPerRow), C.long(N))
|
||||
fmt.Println(res)
|
||||
}
|
||||
|
||||
func main() {
|
||||
fmt.Println("Test milvus segment base:")
|
||||
testInsert()
|
||||
}
|
|
@ -9,8 +9,7 @@ CSegmentBase
|
|||
NewSegment(CPartition partition, unsigned long segment_id) {
|
||||
auto p = (milvus::dog_segment::Partition*)partition;
|
||||
|
||||
// TODO: remove hard code null index ptr
|
||||
auto segment = milvus::dog_segment::CreateSegment(p->get_schema(), nullptr);
|
||||
auto segment = milvus::dog_segment::CreateSegment(p->get_schema());
|
||||
|
||||
// TODO: delete print
|
||||
std::cout << "create segment " << segment_id << std::endl;
|
||||
|
@ -46,9 +45,6 @@ Insert(CSegmentBase c_segment,
|
|||
dataChunk.count = count;
|
||||
|
||||
auto res = segment->Insert(reserved_offset, size, primary_keys, timestamps, dataChunk);
|
||||
|
||||
// TODO: delete print
|
||||
std::cout << "do segment insert, sizeof_per_row = " << sizeof_per_row << std::endl;
|
||||
return res.code();
|
||||
}
|
||||
|
||||
|
|
|
@ -121,14 +121,9 @@ namespace query {
|
|||
// std::set<std::string> index_fields;
|
||||
// std::unordered_map<std::string, std::string> metric_types;
|
||||
// };
|
||||
|
||||
struct Query{
|
||||
int64_t num_queries; //
|
||||
int topK; // topK of queries
|
||||
std::string field_name; // must be fakevec, whose data_type must be VEC_FLOAT(DIM)
|
||||
std::vector<float> query_raw_data; // must be size of num_queries * DIM
|
||||
// TODO
|
||||
};
|
||||
|
||||
using QueryPtr = std::shared_ptr<Query>;
|
||||
|
||||
} // namespace query
|
||||
|
|
|
@ -137,10 +137,8 @@ struct AttrsData {
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
struct QueryResult {
|
||||
uint64_t row_num_; // row_num_ = topK * num_queries_
|
||||
uint64_t topK_;
|
||||
uint64_t num_queries_; // currently must be 1
|
||||
engine::ResultIds result_ids_; // top1, top2, ..;
|
||||
uint64_t row_num_;
|
||||
engine::ResultIds result_ids_;
|
||||
engine::ResultDistances result_distances_;
|
||||
// engine::DataChunkPtr data_chunk_;
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@ find_package(GTest REQUIRED)
|
|||
set(MILVUS_TEST_FILES
|
||||
test_naive.cpp
|
||||
# test_dog_segment.cpp
|
||||
test_c_api.cpp
|
||||
# test_c_api.cpp
|
||||
)
|
||||
add_executable(all_tests
|
||||
${MILVUS_TEST_FILES}
|
||||
|
|
|
@ -49,7 +49,7 @@ TEST(CApiTest, InsertTest) {
|
|||
|
||||
std::vector<char> raw_data;
|
||||
std::vector<uint64_t> timestamps;
|
||||
std::vector<int64_t> uids;
|
||||
std::vector<uint64_t> uids;
|
||||
int N = 10000;
|
||||
std::default_random_engine e(67);
|
||||
for(int i = 0; i < N; ++i) {
|
||||
|
@ -67,9 +67,7 @@ TEST(CApiTest, InsertTest) {
|
|||
|
||||
auto line_sizeof = (sizeof(int) + sizeof(float) * 16);
|
||||
|
||||
auto offset = PreInsert(segment, N);
|
||||
|
||||
auto res = Insert(segment, offset, N, uids.data(), timestamps.data(), raw_data.data(), (int)line_sizeof, N);
|
||||
auto res = Insert(segment, N, uids.data(), timestamps.data(), raw_data.data(), (int)line_sizeof, N);
|
||||
|
||||
assert(res == 0);
|
||||
|
||||
|
@ -87,12 +85,10 @@ TEST(CApiTest, DeleteTest) {
|
|||
auto partition = NewPartition(collection, partition_name);
|
||||
auto segment = NewSegment(partition, 0);
|
||||
|
||||
long delete_primary_keys[] = {100000, 100001, 100002};
|
||||
unsigned long delete_primary_keys[] = {100000, 100001, 100002};
|
||||
unsigned long delete_timestamps[] = {0, 0, 0};
|
||||
|
||||
auto offset = PreDelete(segment, 3);
|
||||
|
||||
auto del_res = Delete(segment, offset, 3, delete_primary_keys, delete_timestamps);
|
||||
auto del_res = Delete(segment, 1, delete_primary_keys, delete_timestamps);
|
||||
assert(del_res == 0);
|
||||
|
||||
DeleteCollection(collection);
|
||||
|
@ -101,7 +97,6 @@ TEST(CApiTest, DeleteTest) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
TEST(CApiTest, SearchTest) {
|
||||
auto collection_name = "collection0";
|
||||
auto schema_tmp_conf = "null_schema";
|
||||
|
@ -112,7 +107,7 @@ TEST(CApiTest, SearchTest) {
|
|||
|
||||
std::vector<char> raw_data;
|
||||
std::vector<uint64_t> timestamps;
|
||||
std::vector<int64_t> uids;
|
||||
std::vector<uint64_t> uids;
|
||||
int N = 10000;
|
||||
std::default_random_engine e(67);
|
||||
for(int i = 0; i < N; ++i) {
|
||||
|
@ -130,15 +125,14 @@ TEST(CApiTest, SearchTest) {
|
|||
|
||||
auto line_sizeof = (sizeof(int) + sizeof(float) * 16);
|
||||
|
||||
auto offset = PreInsert(segment, N);
|
||||
|
||||
auto ins_res = Insert(segment, offset, N, uids.data(), timestamps.data(), raw_data.data(), (int)line_sizeof, N);
|
||||
auto ins_res = Insert(segment, N, uids.data(), timestamps.data(), raw_data.data(), (int)line_sizeof, N);
|
||||
assert(ins_res == 0);
|
||||
|
||||
long result_ids[10];
|
||||
float result_distances[10];
|
||||
auto sea_res = Search(segment, nullptr, 0, result_ids, result_distances);
|
||||
long result_ids;
|
||||
float result_distances;
|
||||
auto sea_res = Search(segment, nullptr, 0, &result_ids, &result_distances);
|
||||
assert(sea_res == 0);
|
||||
assert(result_ids == 104490);
|
||||
|
||||
DeleteCollection(collection);
|
||||
DeletePartition(partition);
|
||||
|
@ -180,87 +174,43 @@ TEST(CApiTest, CloseTest) {
|
|||
}
|
||||
|
||||
|
||||
TEST(CApiTest, GetRowCountTest) {
|
||||
auto collection_name = "collection0";
|
||||
auto schema_tmp_conf = "null_schema";
|
||||
auto collection = NewCollection(collection_name, schema_tmp_conf);
|
||||
auto partition_name = "partition0";
|
||||
auto partition = NewPartition(collection, partition_name);
|
||||
auto segment = NewSegment(partition, 0);
|
||||
|
||||
auto generate_data(int N) {
|
||||
std::vector<char> raw_data;
|
||||
std::vector<uint64_t> timestamps;
|
||||
std::vector<int64_t> uids;
|
||||
std::default_random_engine er(42);
|
||||
std::uniform_real_distribution<> distribution(0.0, 1.0);
|
||||
std::default_random_engine ei(42);
|
||||
for(int i = 0; i < N; ++i) {
|
||||
uids.push_back(10 * N + i);
|
||||
timestamps.push_back(0);
|
||||
// append vec
|
||||
float vec[16];
|
||||
for(auto &x: vec) {
|
||||
x = distribution(er);
|
||||
}
|
||||
raw_data.insert(raw_data.end(), (const char*)std::begin(vec), (const char*)std::end(vec));
|
||||
int age = ei() % 100;
|
||||
raw_data.insert(raw_data.end(), (const char*)&age, ((const char*)&age) + sizeof(age));
|
||||
std::vector<char> raw_data;
|
||||
std::vector<uint64_t> timestamps;
|
||||
std::vector<uint64_t> uids;
|
||||
int N = 10000;
|
||||
std::default_random_engine e(67);
|
||||
for(int i = 0; i < N; ++i) {
|
||||
uids.push_back(100000 + i);
|
||||
timestamps.push_back(0);
|
||||
// append vec
|
||||
float vec[16];
|
||||
for(auto &x: vec) {
|
||||
x = e() % 2000 * 0.001 - 1.0;
|
||||
}
|
||||
return std::make_tuple(raw_data, timestamps, uids);
|
||||
}
|
||||
raw_data.insert(raw_data.end(), (const char*)std::begin(vec), (const char*)std::end(vec));
|
||||
int age = e() % 100;
|
||||
raw_data.insert(raw_data.end(), (const char*)&age, ((const char*)&age) + sizeof(age));
|
||||
}
|
||||
|
||||
auto line_sizeof = (sizeof(int) + sizeof(float) * 16);
|
||||
|
||||
TEST(CApiTest, TestQuery) {
|
||||
auto collection_name = "collection0";
|
||||
auto schema_tmp_conf = "null_schema";
|
||||
auto collection = NewCollection(collection_name, schema_tmp_conf);
|
||||
auto partition_name = "partition0";
|
||||
auto partition = NewPartition(collection, partition_name);
|
||||
auto segment = NewSegment(partition, 0);
|
||||
auto res = Insert(segment, N, uids.data(), timestamps.data(), raw_data.data(), (int)line_sizeof, N);
|
||||
assert(res == 0);
|
||||
|
||||
auto row_count = GetRowCount(segment);
|
||||
assert(row_count == N);
|
||||
|
||||
int N = 1000 * 1000;
|
||||
auto [raw_data, timestamps, uids] = generate_data(N);
|
||||
auto line_sizeof = (sizeof(int) + sizeof(float) * 16);
|
||||
auto offset = PreInsert(segment, N);
|
||||
auto res = Insert(segment, offset, N, uids.data(), timestamps.data(), raw_data.data(), (int)line_sizeof, N);
|
||||
assert(res == 0);
|
||||
|
||||
auto row_count = GetRowCount(segment);
|
||||
assert(row_count == N);
|
||||
|
||||
std::vector<long> result_ids(10);
|
||||
std::vector<float> result_distances(10);
|
||||
auto sea_res = Search(segment, nullptr, 1, result_ids.data(), result_distances.data());
|
||||
|
||||
ASSERT_EQ(sea_res, 0);
|
||||
ASSERT_EQ(result_ids[0], 10 * N);
|
||||
ASSERT_EQ(result_distances[0], 0);
|
||||
|
||||
std::vector<uint64_t> del_ts(N/2, 100);
|
||||
auto pre_off = PreDelete(segment, N / 2);
|
||||
Delete(segment, pre_off, N / 2, uids.data(), del_ts.data());
|
||||
|
||||
|
||||
std::vector<long> result_ids2(10);
|
||||
std::vector<float> result_distances2(10);
|
||||
sea_res = Search(segment, nullptr, 104, result_ids2.data(), result_distances2.data());
|
||||
|
||||
for(auto x: result_ids2) {
|
||||
ASSERT_GE(x, 10 * N + N / 2);
|
||||
ASSERT_LT(x, 10 * N + N);
|
||||
}
|
||||
|
||||
auto iter = 0;
|
||||
for(int i = 0; i < result_ids.size(); ++i) {
|
||||
auto uid = result_ids[i];
|
||||
auto dis = result_distances[i];
|
||||
if(uid >= 10 * N + N / 2) {
|
||||
auto uid2 = result_ids2[iter];
|
||||
auto dis2 = result_distances2[iter];
|
||||
ASSERT_EQ(uid, uid2);
|
||||
ASSERT_EQ(dis, dis2);
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
|
||||
DeleteCollection(collection);
|
||||
DeletePartition(partition);
|
||||
DeleteSegment(segment);
|
||||
DeleteCollection(collection);
|
||||
DeletePartition(partition);
|
||||
DeleteSegment(segment);
|
||||
}
|
||||
|
||||
TEST(CApiTest, GetDeletedCountTest) {
|
||||
|
@ -271,12 +221,10 @@ TEST(CApiTest, GetDeletedCountTest) {
|
|||
auto partition = NewPartition(collection, partition_name);
|
||||
auto segment = NewSegment(partition, 0);
|
||||
|
||||
long delete_primary_keys[] = {100000, 100001, 100002};
|
||||
unsigned long delete_primary_keys[] = {100000, 100001, 100002};
|
||||
unsigned long delete_timestamps[] = {0, 0, 0};
|
||||
|
||||
auto offset = PreDelete(segment, 3);
|
||||
|
||||
auto del_res = Delete(segment, offset, 3, delete_primary_keys, delete_timestamps);
|
||||
auto del_res = Delete(segment, 1, delete_primary_keys, delete_timestamps);
|
||||
assert(del_res == 0);
|
||||
|
||||
// TODO: assert(deleted_count == len(delete_primary_keys))
|
||||
|
@ -288,27 +236,45 @@ TEST(CApiTest, GetDeletedCountTest) {
|
|||
DeleteSegment(segment);
|
||||
}
|
||||
|
||||
TEST(CApiTest, TimeGetterAndSetterTest) {
|
||||
auto collection_name = "collection0";
|
||||
auto schema_tmp_conf = "null_schema";
|
||||
auto collection = NewCollection(collection_name, schema_tmp_conf);
|
||||
auto partition_name = "partition0";
|
||||
auto partition = NewPartition(collection, partition_name);
|
||||
auto segment = NewSegment(partition, 0);
|
||||
|
||||
TEST(CApiTest, GetRowCountTest) {
|
||||
auto collection_name = "collection0";
|
||||
auto schema_tmp_conf = "null_schema";
|
||||
auto collection = NewCollection(collection_name, schema_tmp_conf);
|
||||
auto partition_name = "partition0";
|
||||
auto partition = NewPartition(collection, partition_name);
|
||||
auto segment = NewSegment(partition, 0);
|
||||
uint64_t TIME_BEGIN = 100;
|
||||
uint64_t TIME_END = 200;
|
||||
|
||||
SetTimeBegin(segment, TIME_BEGIN);
|
||||
auto time_begin = GetTimeBegin(segment);
|
||||
assert(time_begin == TIME_BEGIN);
|
||||
|
||||
SetTimeEnd(segment, TIME_END);
|
||||
auto time_end = GetTimeEnd(segment);
|
||||
assert(time_end == TIME_END);
|
||||
|
||||
DeleteCollection(collection);
|
||||
DeletePartition(partition);
|
||||
DeleteSegment(segment);
|
||||
}
|
||||
|
||||
|
||||
int N = 10000;
|
||||
auto [raw_data, timestamps, uids] = generate_data(N);
|
||||
auto line_sizeof = (sizeof(int) + sizeof(float) * 16);
|
||||
auto offset = PreInsert(segment, N);
|
||||
auto res = Insert(segment, offset, N, uids.data(), timestamps.data(), raw_data.data(), (int)line_sizeof, N);
|
||||
assert(res == 0);
|
||||
TEST(CApiTest, SegmentIDTest) {
|
||||
auto collection_name = "collection0";
|
||||
auto schema_tmp_conf = "null_schema";
|
||||
auto collection = NewCollection(collection_name, schema_tmp_conf);
|
||||
auto partition_name = "partition0";
|
||||
auto partition = NewPartition(collection, partition_name);
|
||||
auto segment = NewSegment(partition, 0);
|
||||
|
||||
auto row_count = GetRowCount(segment);
|
||||
assert(row_count == N);
|
||||
uint64_t SEGMENT_ID = 1;
|
||||
SetSegmentId(segment, SEGMENT_ID);
|
||||
auto segment_id = GetSegmentId(segment);
|
||||
assert(segment_id == SEGMENT_ID);
|
||||
|
||||
DeleteCollection(collection);
|
||||
DeletePartition(partition);
|
||||
DeleteSegment(segment);
|
||||
}
|
||||
DeleteCollection(collection);
|
||||
DeletePartition(partition);
|
||||
DeleteSegment(segment);
|
||||
}
|
||||
|
|
5
go.mod
5
go.mod
|
@ -13,7 +13,6 @@ require (
|
|||
github.com/danieljoos/wincred v1.1.0 // indirect
|
||||
github.com/docker/go-units v0.4.0
|
||||
github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect
|
||||
github.com/frankban/quicktest v1.10.2 // indirect
|
||||
github.com/gogo/protobuf v1.3.1
|
||||
github.com/golang/protobuf v1.4.2
|
||||
github.com/google/btree v1.0.0
|
||||
|
@ -36,13 +35,13 @@ require (
|
|||
go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738
|
||||
go.uber.org/zap v1.15.0
|
||||
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a // indirect
|
||||
golang.org/x/net v0.0.0-20200904194848-62affa334b73 // indirect
|
||||
golang.org/x/net v0.0.0-20200904194848-62affa334b73
|
||||
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 // indirect
|
||||
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f // indirect
|
||||
google.golang.org/grpc v1.31.0
|
||||
google.golang.org/grpc/examples v0.0.0-20200828165940-d8ef479ab79a // indirect
|
||||
google.golang.org/protobuf v1.25.0 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0
|
||||
gopkg.in/yaml.v2 v2.3.0
|
||||
sigs.k8s.io/yaml v1.2.0 // indirect
|
||||
)
|
||||
|
||||
|
|
22
go.sum
22
go.sum
|
@ -127,7 +127,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
|
|||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA=
|
||||
github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0=
|
||||
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
|
||||
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
|
@ -145,7 +144,6 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB
|
|||
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o=
|
||||
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM=
|
||||
github.com/envoyproxy/data-plane-api v0.0.0-20200904023242-f4d8a28107ca h1:EvL1gA7uyPU2JVN93HbQwYOXyUjUJKYGStDN8eKD/Ss=
|
||||
github.com/envoyproxy/data-plane-api v0.0.0-20200909004014-2bb47b2b6fb0 h1:0edaQ8F7kgXmqz/tFjjl5rW/nAKUZ5Zg0Rv5vKiE6+U=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
|
@ -153,11 +151,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
|
|||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
|
||||
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
|
||||
github.com/frankban/quicktest v1.10.2 h1:19ARM85nVi4xH7xPXuc5eM/udya5ieh7b/Sv+d844Tk=
|
||||
github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s=
|
||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
|
@ -225,8 +220,6 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
|||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
|
||||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
|
||||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
|
@ -249,7 +242,6 @@ github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51
|
|||
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/mux v1.7.0 h1:tOSd0UKHQd6urX6ApfOn4XdBMY6Sh1MfxV3kmaazO+U=
|
||||
github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw=
|
||||
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
|
||||
|
@ -331,12 +323,9 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB
|
|||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
|
||||
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
|
||||
|
@ -383,9 +372,7 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE
|
|||
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
|
||||
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
|
||||
|
@ -394,12 +381,10 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
|
|||
github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
|
||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA=
|
||||
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
||||
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
|
||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
|
||||
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
|
||||
|
@ -412,7 +397,6 @@ github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxS
|
|||
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
|
||||
github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
|
||||
github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
|
||||
github.com/ozonru/etcd v3.3.20-grpc1.27-origmodule+incompatible h1:CAG0PUvo1fen+ZEfxKJjFIc8GuuN5RuaBuCAuaP2Hno=
|
||||
github.com/ozonru/etcd v3.3.20-grpc1.27-origmodule+incompatible/go.mod h1:iIubILNIN6Jq9h8uiSLrN9L1tuj3iSSFwz3R61skm/A=
|
||||
github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
|
||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
|
@ -506,7 +490,6 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykE
|
|||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs=
|
||||
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
|
||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
|
||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||
|
@ -517,14 +500,12 @@ github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2
|
|||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4=
|
||||
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
|
||||
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
|
||||
github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
|
||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
|
@ -794,7 +775,6 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc
|
|||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200806022845-90696ccdc692 h1:fsn47thVa7Ar/TMyXYlZgOoT7M4+kRpb+KpSAqRQx1w=
|
||||
golang.org/x/tools v0.0.0-20200806022845-90696ccdc692/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d h1:W07d4xkoAUSNOkOzdzXCdFGxT7o2rW4q8M34tB2i//k=
|
||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
|
@ -897,7 +877,6 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
|
|||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
|
@ -923,7 +902,6 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|||
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
|
|
@ -0,0 +1,235 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: master.proto
|
||||
|
||||
//option go_package = "github.com/czs007/suvilm/pkg/master/grpc";
|
||||
|
||||
package masterpb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type CreateCollectionRequest struct {
|
||||
CollectionName string `protobuf:"bytes,1,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CreateCollectionRequest) Reset() { *m = CreateCollectionRequest{} }
|
||||
func (m *CreateCollectionRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateCollectionRequest) ProtoMessage() {}
|
||||
func (*CreateCollectionRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f9c348dec43a6705, []int{0}
|
||||
}
|
||||
|
||||
func (m *CreateCollectionRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CreateCollectionRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CreateCollectionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CreateCollectionRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CreateCollectionRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CreateCollectionRequest.Merge(m, src)
|
||||
}
|
||||
func (m *CreateCollectionRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_CreateCollectionRequest.Size(m)
|
||||
}
|
||||
func (m *CreateCollectionRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CreateCollectionRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CreateCollectionRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *CreateCollectionRequest) GetCollectionName() string {
|
||||
if m != nil {
|
||||
return m.CollectionName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreateCollectionResponse struct {
|
||||
CollectionName string `protobuf:"bytes,1,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"`
|
||||
CollectionId uint64 `protobuf:"varint,2,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
|
||||
SegmentIds []uint64 `protobuf:"varint,3,rep,packed,name=segment_ids,json=segmentIds,proto3" json:"segment_ids,omitempty"`
|
||||
PartitionTags []string `protobuf:"bytes,4,rep,name=partition_tags,json=partitionTags,proto3" json:"partition_tags,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CreateCollectionResponse) Reset() { *m = CreateCollectionResponse{} }
|
||||
func (m *CreateCollectionResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateCollectionResponse) ProtoMessage() {}
|
||||
func (*CreateCollectionResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f9c348dec43a6705, []int{1}
|
||||
}
|
||||
|
||||
func (m *CreateCollectionResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CreateCollectionResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CreateCollectionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CreateCollectionResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CreateCollectionResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CreateCollectionResponse.Merge(m, src)
|
||||
}
|
||||
func (m *CreateCollectionResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_CreateCollectionResponse.Size(m)
|
||||
}
|
||||
func (m *CreateCollectionResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CreateCollectionResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CreateCollectionResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *CreateCollectionResponse) GetCollectionName() string {
|
||||
if m != nil {
|
||||
return m.CollectionName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateCollectionResponse) GetCollectionId() uint64 {
|
||||
if m != nil {
|
||||
return m.CollectionId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CreateCollectionResponse) GetSegmentIds() []uint64 {
|
||||
if m != nil {
|
||||
return m.SegmentIds
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CreateCollectionResponse) GetPartitionTags() []string {
|
||||
if m != nil {
|
||||
return m.PartitionTags
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*CreateCollectionRequest)(nil), "masterpb.CreateCollectionRequest")
|
||||
proto.RegisterType((*CreateCollectionResponse)(nil), "masterpb.CreateCollectionResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("master.proto", fileDescriptor_f9c348dec43a6705) }
|
||||
|
||||
var fileDescriptor_f9c348dec43a6705 = []byte{
|
||||
// 225 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xcf, 0x4a, 0x03, 0x31,
|
||||
0x10, 0x87, 0x5d, 0x77, 0x29, 0x76, 0x6c, 0xab, 0xe4, 0x62, 0xf0, 0xe2, 0x1a, 0x11, 0x73, 0xda,
|
||||
0x83, 0xbe, 0x81, 0x3d, 0xf5, 0xa0, 0x87, 0xe0, 0xcd, 0x43, 0x49, 0x9b, 0x61, 0x09, 0x34, 0x7f,
|
||||
0xcc, 0x8c, 0xef, 0xe5, 0x23, 0x0a, 0x5b, 0x6d, 0x45, 0x51, 0x3c, 0xe6, 0xe3, 0xc7, 0x47, 0xe6,
|
||||
0x83, 0x49, 0xb0, 0xc4, 0x58, 0xba, 0x5c, 0x12, 0x27, 0x71, 0xb4, 0x7d, 0xe5, 0x95, 0xba, 0x87,
|
||||
0xb3, 0x79, 0x41, 0xcb, 0x38, 0x4f, 0x9b, 0x0d, 0xae, 0xd9, 0xa7, 0x68, 0xf0, 0xe5, 0x15, 0x89,
|
||||
0xc5, 0x0d, 0x9c, 0xac, 0x77, 0x70, 0x19, 0x6d, 0x40, 0x59, 0xb5, 0x95, 0x1e, 0x9b, 0xd9, 0x1e,
|
||||
0x3f, 0xda, 0x80, 0xea, 0xad, 0x02, 0xf9, 0x53, 0x42, 0x39, 0x45, 0xc2, 0x7f, 0x5b, 0xc4, 0x15,
|
||||
0x4c, 0xbf, 0x0c, 0xbd, 0x93, 0x87, 0x6d, 0xa5, 0x1b, 0x33, 0xd9, 0xc3, 0x85, 0x13, 0x17, 0x70,
|
||||
0x4c, 0xd8, 0x07, 0x8c, 0xbc, 0xf4, 0x8e, 0x64, 0xdd, 0xd6, 0xba, 0x31, 0xf0, 0x81, 0x16, 0x8e,
|
||||
0xc4, 0x35, 0xcc, 0xb2, 0x2d, 0xec, 0x07, 0x09, 0xdb, 0x9e, 0x64, 0xd3, 0xd6, 0x7a, 0x6c, 0xa6,
|
||||
0x3b, 0xfa, 0x64, 0x7b, 0xba, 0x45, 0x18, 0x3d, 0x0c, 0x09, 0xc4, 0x33, 0x9c, 0x7e, 0xff, 0xbb,
|
||||
0xb8, 0xec, 0x3e, 0xfb, 0x74, 0xbf, 0xc4, 0x39, 0x57, 0x7f, 0x4d, 0xb6, 0xa7, 0xab, 0x83, 0xd5,
|
||||
0x68, 0xc8, 0x7d, 0xf7, 0x1e, 0x00, 0x00, 0xff, 0xff, 0x0d, 0xb6, 0xf8, 0x4e, 0x7e, 0x01, 0x00,
|
||||
0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// MasterClient is the client API for Master service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type MasterClient interface {
|
||||
CreateCollection(ctx context.Context, in *CreateCollectionRequest, opts ...grpc.CallOption) (*CreateCollectionResponse, error)
|
||||
}
|
||||
|
||||
type masterClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewMasterClient(cc *grpc.ClientConn) MasterClient {
|
||||
return &masterClient{cc}
|
||||
}
|
||||
|
||||
func (c *masterClient) CreateCollection(ctx context.Context, in *CreateCollectionRequest, opts ...grpc.CallOption) (*CreateCollectionResponse, error) {
|
||||
out := new(CreateCollectionResponse)
|
||||
err := c.cc.Invoke(ctx, "/masterpb.Master/CreateCollection", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MasterServer is the server API for Master service.
|
||||
type MasterServer interface {
|
||||
CreateCollection(context.Context, *CreateCollectionRequest) (*CreateCollectionResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedMasterServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedMasterServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedMasterServer) CreateCollection(ctx context.Context, req *CreateCollectionRequest) (*CreateCollectionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateCollection not implemented")
|
||||
}
|
||||
|
||||
func RegisterMasterServer(s *grpc.Server, srv MasterServer) {
|
||||
s.RegisterService(&_Master_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _Master_CreateCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateCollectionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MasterServer).CreateCollection(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/masterpb.Master/CreateCollection",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MasterServer).CreateCollection(ctx, req.(*CreateCollectionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Master_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "masterpb.Master",
|
||||
HandlerType: (*MasterServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateCollection",
|
||||
Handler: _Master_CreateCollection_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "master.proto",
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
syntax = "proto3";
|
||||
|
||||
//option go_package = "github.com/czs007/suvilm/pkg/master/grpc";
|
||||
package masterpb;
|
||||
|
||||
service Master {
|
||||
rpc CreateCollection (CreateCollectionRequest) returns (CreateCollectionResponse) {}
|
||||
}
|
||||
|
||||
|
||||
message CreateCollectionRequest {
|
||||
string collection_name = 1;
|
||||
}
|
||||
|
||||
message CreateCollectionResponse {
|
||||
string collection_name = 1;
|
||||
uint64 collection_id = 2;
|
||||
repeated uint64 segment_ids = 3;
|
||||
repeated string partition_tags = 4;
|
||||
}
|
|
@ -1,369 +0,0 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: pkg/master/grpc/master/master.proto
|
||||
|
||||
package master
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
message "github.com/czs007/suvlim/pkg/master/grpc/message"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Collection struct {
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Schema *message.Schema `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"`
|
||||
CreateTime uint64 `protobuf:"varint,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
|
||||
SegmentIds []uint64 `protobuf:"varint,5,rep,packed,name=segment_ids,json=segmentIds,proto3" json:"segment_ids,omitempty"`
|
||||
PartitionTags []string `protobuf:"bytes,6,rep,name=partition_tags,json=partitionTags,proto3" json:"partition_tags,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Collection) Reset() { *m = Collection{} }
|
||||
func (m *Collection) String() string { return proto.CompactTextString(m) }
|
||||
func (*Collection) ProtoMessage() {}
|
||||
func (*Collection) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_64c7f42561e95429, []int{0}
|
||||
}
|
||||
|
||||
func (m *Collection) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Collection.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Collection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Collection.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Collection) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Collection.Merge(m, src)
|
||||
}
|
||||
func (m *Collection) XXX_Size() int {
|
||||
return xxx_messageInfo_Collection.Size(m)
|
||||
}
|
||||
func (m *Collection) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Collection.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Collection proto.InternalMessageInfo
|
||||
|
||||
func (m *Collection) GetId() uint64 {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Collection) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Collection) GetSchema() *message.Schema {
|
||||
if m != nil {
|
||||
return m.Schema
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Collection) GetCreateTime() uint64 {
|
||||
if m != nil {
|
||||
return m.CreateTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Collection) GetSegmentIds() []uint64 {
|
||||
if m != nil {
|
||||
return m.SegmentIds
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Collection) GetPartitionTags() []string {
|
||||
if m != nil {
|
||||
return m.PartitionTags
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Segment struct {
|
||||
SegmentId uint64 `protobuf:"varint,1,opt,name=segment_id,json=segmentId,proto3" json:"segment_id,omitempty"`
|
||||
CollectionId uint64 `protobuf:"varint,2,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
|
||||
PartitionTag string `protobuf:"bytes,3,opt,name=partition_tag,json=partitionTag,proto3" json:"partition_tag,omitempty"`
|
||||
ChannelStart int32 `protobuf:"varint,4,opt,name=channel_start,json=channelStart,proto3" json:"channel_start,omitempty"`
|
||||
ChannelEnd int32 `protobuf:"varint,5,opt,name=channel_end,json=channelEnd,proto3" json:"channel_end,omitempty"`
|
||||
OpenTimestamp uint64 `protobuf:"varint,6,opt,name=open_timestamp,json=openTimestamp,proto3" json:"open_timestamp,omitempty"`
|
||||
CloseTimestamp uint64 `protobuf:"varint,7,opt,name=close_timestamp,json=closeTimestamp,proto3" json:"close_timestamp,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Segment) Reset() { *m = Segment{} }
|
||||
func (m *Segment) String() string { return proto.CompactTextString(m) }
|
||||
func (*Segment) ProtoMessage() {}
|
||||
func (*Segment) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_64c7f42561e95429, []int{1}
|
||||
}
|
||||
|
||||
func (m *Segment) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Segment.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Segment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Segment.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Segment) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Segment.Merge(m, src)
|
||||
}
|
||||
func (m *Segment) XXX_Size() int {
|
||||
return xxx_messageInfo_Segment.Size(m)
|
||||
}
|
||||
func (m *Segment) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Segment.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Segment proto.InternalMessageInfo
|
||||
|
||||
func (m *Segment) GetSegmentId() uint64 {
|
||||
if m != nil {
|
||||
return m.SegmentId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Segment) GetCollectionId() uint64 {
|
||||
if m != nil {
|
||||
return m.CollectionId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Segment) GetPartitionTag() string {
|
||||
if m != nil {
|
||||
return m.PartitionTag
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Segment) GetChannelStart() int32 {
|
||||
if m != nil {
|
||||
return m.ChannelStart
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Segment) GetChannelEnd() int32 {
|
||||
if m != nil {
|
||||
return m.ChannelEnd
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Segment) GetOpenTimestamp() uint64 {
|
||||
if m != nil {
|
||||
return m.OpenTimestamp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Segment) GetCloseTimestamp() uint64 {
|
||||
if m != nil {
|
||||
return m.CloseTimestamp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SegmentStat struct {
|
||||
SegmentId uint64 `protobuf:"varint,1,opt,name=segment_id,json=segmentId,proto3" json:"segment_id,omitempty"`
|
||||
MemorySize uint64 `protobuf:"varint,2,opt,name=memory_size,json=memorySize,proto3" json:"memory_size,omitempty"`
|
||||
MemoryRate float32 `protobuf:"fixed32,3,opt,name=memory_rate,json=memoryRate,proto3" json:"memory_rate,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SegmentStat) Reset() { *m = SegmentStat{} }
|
||||
func (m *SegmentStat) String() string { return proto.CompactTextString(m) }
|
||||
func (*SegmentStat) ProtoMessage() {}
|
||||
func (*SegmentStat) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_64c7f42561e95429, []int{2}
|
||||
}
|
||||
|
||||
func (m *SegmentStat) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SegmentStat.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SegmentStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SegmentStat.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SegmentStat) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SegmentStat.Merge(m, src)
|
||||
}
|
||||
func (m *SegmentStat) XXX_Size() int {
|
||||
return xxx_messageInfo_SegmentStat.Size(m)
|
||||
}
|
||||
func (m *SegmentStat) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SegmentStat.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SegmentStat proto.InternalMessageInfo
|
||||
|
||||
func (m *SegmentStat) GetSegmentId() uint64 {
|
||||
if m != nil {
|
||||
return m.SegmentId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *SegmentStat) GetMemorySize() uint64 {
|
||||
if m != nil {
|
||||
return m.MemorySize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *SegmentStat) GetMemoryRate() float32 {
|
||||
if m != nil {
|
||||
return m.MemoryRate
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Collection)(nil), "masterpb.Collection")
|
||||
proto.RegisterType((*Segment)(nil), "masterpb.Segment")
|
||||
proto.RegisterType((*SegmentStat)(nil), "masterpb.SegmentStat")
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("pkg/master/grpc/master/master.proto", fileDescriptor_64c7f42561e95429)
|
||||
}
|
||||
|
||||
var fileDescriptor_64c7f42561e95429 = []byte{
|
||||
// 447 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0xc6, 0x89, 0x93, 0xb8, 0x64, 0xf2, 0x07, 0xb4, 0x70, 0xb0, 0x2a, 0xa1, 0x5a, 0xa9, 0x2a,
|
||||
0x22, 0x21, 0xd9, 0xa5, 0x1c, 0x38, 0x22, 0x51, 0x71, 0xe8, 0xa1, 0x17, 0x3b, 0x27, 0x2e, 0xd6,
|
||||
0xc6, 0x1e, 0x39, 0x2b, 0xbc, 0xeb, 0x95, 0x77, 0x52, 0x89, 0x3c, 0x01, 0x4f, 0xc6, 0x73, 0x21,
|
||||
0x8f, 0x9d, 0x34, 0x05, 0xa4, 0x9e, 0x76, 0xfd, 0xf9, 0xb7, 0x33, 0x3b, 0xdf, 0x7e, 0x70, 0x69,
|
||||
0x7f, 0x94, 0xb1, 0x96, 0x8e, 0xb0, 0x89, 0xcb, 0xc6, 0xe6, 0x87, 0x7d, 0xb7, 0x44, 0xb6, 0xa9,
|
||||
0xa9, 0x16, 0x2f, 0xbb, 0x2f, 0xbb, 0x39, 0xbf, 0xfa, 0x07, 0x47, 0xe7, 0x64, 0x89, 0x87, 0xb5,
|
||||
0x3b, 0xb0, 0xfc, 0x3d, 0x00, 0xb8, 0xad, 0xab, 0x0a, 0x73, 0x52, 0xb5, 0x11, 0x0b, 0xf0, 0x54,
|
||||
0x11, 0x0c, 0xc2, 0xc1, 0x6a, 0x94, 0x78, 0xaa, 0x10, 0x02, 0x46, 0x46, 0x6a, 0x0c, 0xbc, 0x70,
|
||||
0xb0, 0x9a, 0x24, 0xbc, 0x17, 0x1f, 0xc0, 0x77, 0xf9, 0x16, 0xb5, 0x0c, 0x86, 0xe1, 0x60, 0x35,
|
||||
0xbd, 0x79, 0x13, 0x69, 0x55, 0x3d, 0xec, 0x5c, 0xd4, 0xb6, 0x89, 0x52, 0xfe, 0x95, 0xf4, 0x88,
|
||||
0xb8, 0x80, 0x69, 0xde, 0xa0, 0x24, 0xcc, 0x48, 0x69, 0x0c, 0x46, 0x5c, 0x19, 0x3a, 0x69, 0xad,
|
||||
0x34, 0xb6, 0x80, 0xc3, 0x52, 0xa3, 0xa1, 0x4c, 0x15, 0x2e, 0x18, 0x87, 0xc3, 0x16, 0xe8, 0xa5,
|
||||
0xbb, 0xc2, 0x89, 0x2b, 0x58, 0x58, 0xd9, 0x90, 0x6a, 0xef, 0x97, 0x91, 0x2c, 0x5d, 0xe0, 0x87,
|
||||
0xc3, 0xd5, 0x24, 0x99, 0x1f, 0xd5, 0xb5, 0x2c, 0xdd, 0xf2, 0x97, 0x07, 0x67, 0x69, 0x77, 0x4a,
|
||||
0xbc, 0x03, 0x78, 0xac, 0xd9, 0x4f, 0x33, 0x39, 0x96, 0x14, 0x97, 0x30, 0xcf, 0x8f, 0x23, 0xb7,
|
||||
0x84, 0xc7, 0xc4, 0xec, 0x51, 0xec, 0xa0, 0x27, 0x6d, 0x79, 0xd8, 0x49, 0x32, 0x3b, 0xed, 0xca,
|
||||
0x95, 0xb6, 0xd2, 0x18, 0xac, 0x32, 0x47, 0xb2, 0x21, 0x9e, 0x6f, 0x9c, 0xcc, 0x7a, 0x31, 0x6d,
|
||||
0x35, 0xb6, 0xa0, 0x87, 0xd0, 0x14, 0xc1, 0x98, 0x11, 0xe8, 0xa5, 0x6f, 0xa6, 0x68, 0x27, 0xac,
|
||||
0x2d, 0x1a, 0x76, 0xc8, 0x91, 0xd4, 0x36, 0xf0, 0xf9, 0x42, 0xf3, 0x56, 0x5d, 0x1f, 0x44, 0xf1,
|
||||
0x1e, 0x5e, 0xe5, 0x55, 0xed, 0xf0, 0x84, 0x3b, 0x63, 0x6e, 0xc1, 0xf2, 0x11, 0x5c, 0x1a, 0x98,
|
||||
0xf6, 0x4e, 0xa4, 0x24, 0x9f, 0x75, 0xe3, 0x02, 0xa6, 0x1a, 0x75, 0xdd, 0xfc, 0xcc, 0x9c, 0xda,
|
||||
0x63, 0xef, 0x05, 0x74, 0x52, 0xaa, 0xf6, 0x78, 0x02, 0x34, 0x92, 0x90, 0x7d, 0xf0, 0x0e, 0x40,
|
||||
0x22, 0x09, 0x6f, 0xee, 0xc0, 0xbf, 0xe7, 0xa0, 0x89, 0x2f, 0xf0, 0xfa, 0x96, 0x9f, 0xf6, 0x24,
|
||||
0x52, 0x6f, 0x9f, 0xc4, 0xe3, 0x5e, 0x5a, 0xab, 0x4c, 0x79, 0xfe, 0x57, 0x68, 0x48, 0xd2, 0xce,
|
||||
0x2d, 0x5f, 0x7c, 0xfd, 0xf8, 0x3d, 0x2e, 0x15, 0x6d, 0x77, 0x9b, 0x28, 0xaf, 0x75, 0x9c, 0xef,
|
||||
0xdd, 0xf5, 0xf5, 0xe7, 0xd8, 0xed, 0x1e, 0x2a, 0xa5, 0xe3, 0xff, 0xe7, 0x7f, 0xe3, 0x73, 0x90,
|
||||
0x3f, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x1d, 0xf9, 0x37, 0x20, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// MasterClient is the client API for Master service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type MasterClient interface {
|
||||
CreateCollection(ctx context.Context, in *message.Mapping, opts ...grpc.CallOption) (*message.Status, error)
|
||||
}
|
||||
|
||||
type masterClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewMasterClient(cc *grpc.ClientConn) MasterClient {
|
||||
return &masterClient{cc}
|
||||
}
|
||||
|
||||
func (c *masterClient) CreateCollection(ctx context.Context, in *message.Mapping, opts ...grpc.CallOption) (*message.Status, error) {
|
||||
out := new(message.Status)
|
||||
err := c.cc.Invoke(ctx, "/masterpb.Master/CreateCollection", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MasterServer is the server API for Master service.
|
||||
type MasterServer interface {
|
||||
CreateCollection(context.Context, *message.Mapping) (*message.Status, error)
|
||||
}
|
||||
|
||||
// UnimplementedMasterServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedMasterServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedMasterServer) CreateCollection(ctx context.Context, req *message.Mapping) (*message.Status, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateCollection not implemented")
|
||||
}
|
||||
|
||||
func RegisterMasterServer(s *grpc.Server, srv MasterServer) {
|
||||
s.RegisterService(&_Master_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _Master_CreateCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(message.Mapping)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MasterServer).CreateCollection(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/masterpb.Master/CreateCollection",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MasterServer).CreateCollection(ctx, req.(*message.Mapping))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Master_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "masterpb.Master",
|
||||
HandlerType: (*MasterServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateCollection",
|
||||
Handler: _Master_CreateCollection_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "pkg/master/grpc/master/master.proto",
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package masterpb;
|
||||
|
||||
option go_package="github.com/czs007/suvlim/pkg/master/grpc/master";
|
||||
|
||||
import "pkg/master/grpc/message/message.proto";
|
||||
|
||||
message Collection {
|
||||
uint64 id=1;
|
||||
string name=2;
|
||||
milvus.grpc.Schema schema=3;
|
||||
uint64 create_time=4;
|
||||
repeated uint64 segment_ids=5;
|
||||
repeated string partition_tags=6;
|
||||
}
|
||||
|
||||
message Segment {
|
||||
uint64 segment_id=1;
|
||||
uint64 collection_id =2;
|
||||
string partition_tag=3;
|
||||
int32 channel_start=4;
|
||||
int32 channel_end=5;
|
||||
uint64 open_timestamp=6;
|
||||
uint64 close_timestamp=7;
|
||||
}
|
||||
|
||||
message SegmentStat {
|
||||
uint64 segment_id=1;
|
||||
uint64 memory_size=2;
|
||||
float memory_rate=3;
|
||||
}
|
||||
|
||||
service Master {
|
||||
rpc CreateCollection(milvus.grpc.Mapping) returns (milvus.grpc.Status){}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,715 +0,0 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package milvus.grpc;
|
||||
option go_package="github.com/czs007/suvlim/pkg/master/grpc/message";
|
||||
|
||||
enum ErrorCode {
|
||||
SUCCESS = 0;
|
||||
UNEXPECTED_ERROR = 1;
|
||||
CONNECT_FAILED = 2;
|
||||
PERMISSION_DENIED = 3;
|
||||
COLLECTION_NOT_EXISTS = 4;
|
||||
ILLEGAL_ARGUMENT = 5;
|
||||
ILLEGAL_DIMENSION = 7;
|
||||
ILLEGAL_INDEX_TYPE = 8;
|
||||
ILLEGAL_COLLECTION_NAME = 9;
|
||||
ILLEGAL_TOPK = 10;
|
||||
ILLEGAL_ROWRECORD = 11;
|
||||
ILLEGAL_VECTOR_ID = 12;
|
||||
ILLEGAL_SEARCH_RESULT = 13;
|
||||
FILE_NOT_FOUND = 14;
|
||||
META_FAILED = 15;
|
||||
CACHE_FAILED = 16;
|
||||
CANNOT_CREATE_FOLDER = 17;
|
||||
CANNOT_CREATE_FILE = 18;
|
||||
CANNOT_DELETE_FOLDER = 19;
|
||||
CANNOT_DELETE_FILE = 20;
|
||||
BUILD_INDEX_ERROR = 21;
|
||||
ILLEGAL_NLIST = 22;
|
||||
ILLEGAL_METRIC_TYPE = 23;
|
||||
OUT_OF_MEMORY = 24;
|
||||
}
|
||||
|
||||
message Status {
|
||||
ErrorCode error_code = 1;
|
||||
string reason = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Field data type
|
||||
*/
|
||||
enum DataType {
|
||||
NONE = 0;
|
||||
BOOL = 1;
|
||||
INT8 = 2;
|
||||
INT16 = 3;
|
||||
INT32 = 4;
|
||||
INT64 = 5;
|
||||
|
||||
FLOAT = 10;
|
||||
DOUBLE = 11;
|
||||
|
||||
STRING = 20;
|
||||
|
||||
VECTOR_BINARY = 100;
|
||||
VECTOR_FLOAT = 101;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief General usage
|
||||
*/
|
||||
message KeyValuePair {
|
||||
string key = 1;
|
||||
string value = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Collection name
|
||||
*/
|
||||
message CollectionName {
|
||||
string collection_name = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Collection name list
|
||||
*/
|
||||
message CollectionNameList {
|
||||
Status status = 1;
|
||||
repeated string collection_names = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Field name
|
||||
*/
|
||||
message FieldName {
|
||||
string collection_name = 1;
|
||||
string field_name = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Collection mapping
|
||||
* @extra_params: key-value pair for extra parameters of the collection
|
||||
* typically usage:
|
||||
* extra_params["params"] = {segment_row_count: 1000000, auto_id: true}
|
||||
* Note:
|
||||
* the segment_row_count specify segment row count limit for merging
|
||||
* the auto_id = true means entity id is auto-generated by milvus
|
||||
*/
|
||||
message Mapping {
|
||||
Status status = 1;
|
||||
string collection_name = 2;
|
||||
Schema schema = 3;
|
||||
repeated KeyValuePair extra_params = 4;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Collection mapping list
|
||||
*/
|
||||
message MappingList {
|
||||
Status status = 1;
|
||||
repeated Mapping mapping_list = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Parameters of partition
|
||||
*/
|
||||
message PartitionParam {
|
||||
string collection_name = 1;
|
||||
string tag = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Partition list
|
||||
*/
|
||||
message PartitionList {
|
||||
Status status = 1;
|
||||
repeated string partition_tag_array = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Vector row record
|
||||
*/
|
||||
message VectorRowRecord {
|
||||
repeated float float_data = 1; //float vector data
|
||||
bytes binary_data = 2; //binary vector data
|
||||
}
|
||||
|
||||
message EntityIds {
|
||||
Status status = 1;
|
||||
repeated int64 entity_id_array = 2;
|
||||
}
|
||||
|
||||
message VectorRecord {
|
||||
repeated VectorRowRecord records = 1;
|
||||
}
|
||||
|
||||
message VectorParam {
|
||||
string json = 1;
|
||||
VectorRecord row_record = 2;
|
||||
}
|
||||
|
||||
//////////////////////////row schema and data///////////////////////////////////
|
||||
/**
|
||||
* @brief schema
|
||||
*/
|
||||
message FieldMeta {
|
||||
string field_name = 1;
|
||||
DataType type = 2;
|
||||
int64 dim = 3;
|
||||
}
|
||||
|
||||
message Schema {
|
||||
repeated FieldMeta field_metas = 1;
|
||||
}
|
||||
|
||||
message RowData {
|
||||
bytes blob = 1;
|
||||
}
|
||||
|
||||
//////////////////////suvlim-proxy///////////////////////////////////
|
||||
message InsertParam {
|
||||
string collection_name = 1;
|
||||
Schema schema = 2;
|
||||
repeated RowData rows_data = 3;
|
||||
repeated int64 entity_id_array = 4; //optional
|
||||
string partition_tag = 5;
|
||||
repeated KeyValuePair extra_params = 6;
|
||||
}
|
||||
|
||||
message SearchParam {
|
||||
string collection_name = 1;
|
||||
repeated VectorParam vector_param = 2;
|
||||
string dsl = 3; //optional
|
||||
repeated string partition_tag = 4; //why
|
||||
repeated KeyValuePair extra_params = 5;
|
||||
}
|
||||
|
||||
message SearchInSegmentParam {
|
||||
repeated string file_id_array = 1;
|
||||
SearchParam search_param = 2;
|
||||
}
|
||||
|
||||
message Entities {
|
||||
Status status = 1;
|
||||
repeated int64 ids = 2;
|
||||
repeated bool valid_row = 3;
|
||||
repeated RowData rows_data = 4;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////milvus-server///////////////////////////
|
||||
/**
|
||||
* @brief Query result
|
||||
*/
|
||||
message QueryResult {
|
||||
Status status = 1;
|
||||
Entities entities = 2;
|
||||
int64 row_num = 3;
|
||||
repeated float scores = 4;
|
||||
repeated float distances = 5;
|
||||
repeated KeyValuePair extra_params = 6;
|
||||
int64 query_id = 7;
|
||||
int64 client_id = 8;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Server string Reply
|
||||
*/
|
||||
message StringReply {
|
||||
Status status = 1;
|
||||
string string_reply = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Server bool Reply
|
||||
*/
|
||||
message BoolReply {
|
||||
Status status = 1;
|
||||
bool bool_reply = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return collection row count
|
||||
*/
|
||||
message CollectionRowCount {
|
||||
Status status = 1;
|
||||
int64 collection_row_count = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Server command parameters
|
||||
*/
|
||||
message Command {
|
||||
string cmd = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Index params
|
||||
* @collection_name: target collection
|
||||
* @field_name: target field
|
||||
* @index_name: a name for index provided by user, unique within this field
|
||||
* @extra_params: index parameters in json format
|
||||
* for vector field:
|
||||
* extra_params["index_type"] = one of the values: FLAT, IVF_LAT, IVF_SQ8, NSGMIX, IVFSQ8H,
|
||||
* PQ, HNSW, HNSW_SQ8NM, ANNOY
|
||||
* extra_params["metric_type"] = one of the values: L2, IP, HAMMING, JACCARD, TANIMOTO
|
||||
* SUBSTRUCTURE, SUPERSTRUCTURE
|
||||
* extra_params["params"] = extra parameters for index, for example ivflat: {nlist: 2048}
|
||||
* for structured field:
|
||||
* extra_params["index_type"] = one of the values: SORTED
|
||||
*/
|
||||
message IndexParam {
|
||||
Status status = 1;
|
||||
string collection_name = 2;
|
||||
string field_name = 3;
|
||||
string index_name = 4;
|
||||
repeated KeyValuePair extra_params = 5;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Parameters for flush action
|
||||
*/
|
||||
message FlushParam {
|
||||
repeated string collection_name_array = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Parameters for flush action
|
||||
*/
|
||||
message CompactParam {
|
||||
string collection_name = 1;
|
||||
double threshold = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Parameters for deleting entities by id
|
||||
*/
|
||||
message DeleteByIDParam {
|
||||
string collection_name = 1;
|
||||
repeated int64 id_array = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return collection stats
|
||||
* @json_info: collection stats in json format, typically, the format is like:
|
||||
* {
|
||||
* row_count: xxx,
|
||||
* data_size: xxx,
|
||||
* partitions: [
|
||||
* {
|
||||
* tag: xxx,
|
||||
* id: xxx,
|
||||
* row_count: xxx,
|
||||
* data_size: xxx,
|
||||
* segments: [
|
||||
* {
|
||||
* id: xxx,
|
||||
* row_count: xxx,
|
||||
* data_size: xxx,
|
||||
* files: [
|
||||
* {
|
||||
* field: xxx,
|
||||
* name: xxx,
|
||||
* index_type: xxx,
|
||||
* path: xxx,
|
||||
* data_size: xxx,
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
*/
|
||||
message CollectionInfo {
|
||||
Status status = 1;
|
||||
string json_info = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Parameters for returning entities id of a segment
|
||||
*/
|
||||
message GetEntityIDsParam {
|
||||
string collection_name = 1;
|
||||
int64 segment_id = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Entities identity
|
||||
*/
|
||||
message EntityIdentity {
|
||||
string collection_name = 1;
|
||||
repeated int64 id_array = 2;
|
||||
repeated string field_names = 3;
|
||||
}
|
||||
|
||||
/********************************************SearchPB interface***************************************************/
|
||||
/**
|
||||
* @brief Vector field parameters
|
||||
*/
|
||||
message VectorFieldParam {
|
||||
int64 dimension = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Field type
|
||||
*/
|
||||
message FieldType {
|
||||
oneof value {
|
||||
DataType data_type = 1;
|
||||
VectorFieldParam vector_param = 2;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Field parameters
|
||||
*/
|
||||
message FieldParam {
|
||||
uint64 id = 1;
|
||||
string name = 2;
|
||||
DataType type = 3;
|
||||
repeated KeyValuePair index_params = 4;
|
||||
repeated KeyValuePair extra_params = 5;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Vector field record
|
||||
*/
|
||||
message VectorFieldRecord {
|
||||
repeated VectorRowRecord value = 1;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
message TermQuery {
|
||||
string field_name = 1;
|
||||
repeated int64 int_value = 2;
|
||||
repeated double double_value = 3;
|
||||
int64 value_num = 4;
|
||||
float boost = 5;
|
||||
repeated KeyValuePair extra_params = 6;
|
||||
}
|
||||
|
||||
enum CompareOperator {
|
||||
LT = 0;
|
||||
LTE = 1;
|
||||
EQ = 2;
|
||||
GT = 3;
|
||||
GTE = 4;
|
||||
NE = 5;
|
||||
}
|
||||
|
||||
message CompareExpr {
|
||||
CompareOperator operator = 1;
|
||||
string operand = 2;
|
||||
}
|
||||
|
||||
message RangeQuery {
|
||||
string field_name = 1;
|
||||
repeated CompareExpr operand = 2;
|
||||
float boost = 3;
|
||||
repeated KeyValuePair extra_params = 4;
|
||||
}
|
||||
|
||||
message VectorQuery {
|
||||
string field_name = 1;
|
||||
float query_boost = 2;
|
||||
repeated VectorRowRecord records = 3;
|
||||
int64 topk = 4;
|
||||
repeated KeyValuePair extra_params = 5;
|
||||
}
|
||||
|
||||
enum Occur {
|
||||
INVALID = 0;
|
||||
MUST = 1;
|
||||
SHOULD = 2;
|
||||
MUST_NOT = 3;
|
||||
}
|
||||
|
||||
message BooleanQuery {
|
||||
Occur occur = 1;
|
||||
repeated GeneralQuery general_query = 2;
|
||||
}
|
||||
|
||||
message GeneralQuery {
|
||||
oneof query {
|
||||
BooleanQuery boolean_query = 1;
|
||||
TermQuery term_query = 2;
|
||||
RangeQuery range_query = 3;
|
||||
VectorQuery vector_query = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message SearchParamPB {
|
||||
string collection_name = 1;
|
||||
repeated string partition_tag_array = 2;
|
||||
GeneralQuery general_query = 3;
|
||||
repeated KeyValuePair extra_params = 4;
|
||||
}
|
||||
|
||||
service MilvusService {
|
||||
/**
|
||||
* @brief This method is used to create collection
|
||||
*
|
||||
* @param CollectionSchema, use to provide collection information to be created.
|
||||
*
|
||||
* @return Status
|
||||
*/
|
||||
rpc CreateCollection(Mapping) returns (Status){}
|
||||
|
||||
/**
|
||||
* @brief This method is used to test collection existence.
|
||||
*
|
||||
* @param CollectionName, collection name is going to be tested.
|
||||
*
|
||||
* @return BoolReply
|
||||
*/
|
||||
rpc HasCollection(CollectionName) returns (BoolReply) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to get collection schema.
|
||||
*
|
||||
* @param CollectionName, target collection name.
|
||||
*
|
||||
* @return CollectionSchema
|
||||
*/
|
||||
rpc DescribeCollection(CollectionName) returns (Mapping) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to get collection schema.
|
||||
*
|
||||
* @param CollectionName, target collection name.
|
||||
*
|
||||
* @return CollectionRowCount
|
||||
*/
|
||||
rpc CountCollection(CollectionName) returns (CollectionRowCount) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to list all collections.
|
||||
*
|
||||
* @param Command, dummy parameter.
|
||||
*
|
||||
* @return CollectionNameList
|
||||
*/
|
||||
rpc ShowCollections(Command) returns (CollectionNameList) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to get collection detail information.
|
||||
*
|
||||
* @param CollectionName, target collection name.
|
||||
*
|
||||
* @return CollectionInfo
|
||||
*/
|
||||
rpc ShowCollectionInfo(CollectionName) returns (CollectionInfo) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to delete collection.
|
||||
*
|
||||
* @param CollectionName, collection name is going to be deleted.
|
||||
*
|
||||
* @return Status
|
||||
*/
|
||||
rpc DropCollection(CollectionName) returns (Status) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to build index by collection in sync mode.
|
||||
*
|
||||
* @param IndexParam, index paramters.
|
||||
*
|
||||
* @return Status
|
||||
*/
|
||||
rpc CreateIndex(IndexParam) returns (Status) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to describe index
|
||||
*
|
||||
* @param IndexParam, target index.
|
||||
*
|
||||
* @return IndexParam
|
||||
*/
|
||||
rpc DescribeIndex(IndexParam) returns (IndexParam) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to drop index
|
||||
*
|
||||
* @param IndexParam, target field. if the IndexParam.field_name is empty, will drop all index of the collection
|
||||
*
|
||||
* @return Status
|
||||
*/
|
||||
rpc DropIndex(IndexParam) returns (Status) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to create partition
|
||||
*
|
||||
* @param PartitionParam, partition parameters.
|
||||
*
|
||||
* @return Status
|
||||
*/
|
||||
rpc CreatePartition(PartitionParam) returns (Status) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to test partition existence.
|
||||
*
|
||||
* @param PartitionParam, target partition.
|
||||
*
|
||||
* @return BoolReply
|
||||
*/
|
||||
rpc HasPartition(PartitionParam) returns (BoolReply) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to show partition information
|
||||
*
|
||||
* @param CollectionName, target collection name.
|
||||
*
|
||||
* @return PartitionList
|
||||
*/
|
||||
rpc ShowPartitions(CollectionName) returns (PartitionList) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to drop partition
|
||||
*
|
||||
* @param PartitionParam, target partition.
|
||||
*
|
||||
* @return Status
|
||||
*/
|
||||
rpc DropPartition(PartitionParam) returns (Status) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to add vector array to collection.
|
||||
*
|
||||
* @param InsertParam, insert parameters.
|
||||
*
|
||||
* @return VectorIds
|
||||
*/
|
||||
rpc Insert(InsertParam) returns (EntityIds) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to get entities data by id array.
|
||||
*
|
||||
* @param EntitiesIdentity, target entity id array.
|
||||
*
|
||||
* @return EntitiesData
|
||||
*/
|
||||
rpc GetEntityByID(EntityIdentity) returns (Entities) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to get vector ids from a segment
|
||||
*
|
||||
* @param GetVectorIDsParam, target collection and segment
|
||||
*
|
||||
* @return VectorIds
|
||||
*/
|
||||
rpc GetEntityIDs(GetEntityIDsParam) returns (EntityIds) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to query vector in collection.
|
||||
*
|
||||
* @param SearchParam, search parameters.
|
||||
*
|
||||
* @return KQueryResult
|
||||
*/
|
||||
rpc Search(SearchParam) returns (QueryResult) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to query vector in specified files.
|
||||
*
|
||||
* @param SearchInSegmentParam, target segments to search.
|
||||
*
|
||||
* @return TopKQueryResult
|
||||
*/
|
||||
rpc SearchInSegment(SearchInSegmentParam) returns (QueryResult) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to give the server status.
|
||||
*
|
||||
* @param Command, command string
|
||||
*
|
||||
* @return StringReply
|
||||
*/
|
||||
rpc Cmd(Command) returns (StringReply) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to delete vector by id
|
||||
*
|
||||
* @param DeleteByIDParam, delete parameters.
|
||||
*
|
||||
* @return status
|
||||
*/
|
||||
rpc DeleteByID(DeleteByIDParam) returns (Status) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to preload collection
|
||||
*
|
||||
* @param CollectionName, target collection name.
|
||||
*
|
||||
* @return Status
|
||||
*/
|
||||
rpc PreloadCollection(CollectionName) returns (Status) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to flush buffer into storage.
|
||||
*
|
||||
* @param FlushParam, flush parameters
|
||||
*
|
||||
* @return Status
|
||||
*/
|
||||
rpc Flush(FlushParam) returns (Status) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to compact collection
|
||||
*
|
||||
* @param CompactParam, compact parameters
|
||||
*
|
||||
* @return Status
|
||||
*/
|
||||
rpc Compact(CompactParam) returns (Status) {}
|
||||
|
||||
/********************************New Interface********************************************/
|
||||
|
||||
rpc SearchPB(SearchParamPB) returns (QueryResult) {}
|
||||
}
|
||||
|
||||
////////////////////pulsar//////////////////////////////////////
|
||||
enum OpType {
|
||||
INSERT = 0;
|
||||
DELETE = 1;
|
||||
}
|
||||
|
||||
message InsertOrDeleteMsg {
|
||||
string collection_name = 1;
|
||||
RowData rows_data = 2;
|
||||
int64 uid = 3; //optional
|
||||
string partition_tag = 4;
|
||||
uint64 timestamp =5;
|
||||
int64 segment_id = 6;
|
||||
int64 channel_id = 7;
|
||||
OpType op = 8;
|
||||
int64 client_id = 9;
|
||||
repeated KeyValuePair extra_params = 10;
|
||||
}
|
||||
|
||||
message SearchMsg {
|
||||
string collection_name = 1;
|
||||
VectorRowRecord records = 2;
|
||||
string partition_tag = 3;
|
||||
int64 uid = 4;
|
||||
uint64 timestamp =5;
|
||||
int64 client_id = 6;
|
||||
repeated KeyValuePair extra_params = 7;
|
||||
}
|
||||
|
||||
enum SyncType {
|
||||
READ = 0;
|
||||
WRITE = 1;
|
||||
}
|
||||
message TimeSyncMsg{
|
||||
int64 peer_Id = 1;
|
||||
uint64 Timestamp = 2;
|
||||
SyncType sync_type = 3;
|
||||
}
|
||||
|
||||
message Key2SegMsg {
|
||||
int64 uid = 1;
|
||||
uint64 timestamp = 2;
|
||||
repeated int64 segment_id = 3;
|
||||
}
|
|
@ -39,7 +39,7 @@ func (pc PulsarClient) Listener(ssChan chan mock.SegmentStats) error {
|
|||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
for {
|
||||
for i := 0; i < 10; i++ {
|
||||
msg, err := consumer.Receive(context.TODO())
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
|
@ -5,8 +5,7 @@ import (
|
|||
"log"
|
||||
"time"
|
||||
|
||||
pb "github.com/czs007/suvlim/pkg/master/grpc/master"
|
||||
msgpb "github.com/czs007/suvlim/pkg/master/grpc/message"
|
||||
pb "github.com/czs007/suvlim/pkg/master/grpc"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
|
@ -50,14 +49,11 @@ func FakeCreateCollectionByGRPC() (string, uint64) {
|
|||
|
||||
defer cancel()
|
||||
|
||||
r, err := c.CreateCollection(ctx, &msgpb.Mapping{
|
||||
CollectionName: "test-collection",
|
||||
})
|
||||
r, err := c.CreateCollection(ctx, &pb.CreateCollectionRequest{CollectionName: "grpc-client-test"})
|
||||
if err != nil {
|
||||
log.Fatalf("could not greet: %v", err)
|
||||
}
|
||||
|
||||
// log.Printf("CreateCollection: %s, id: %d", r.GetCollectionName(), r.GetCollectionId())
|
||||
// return r.GetCollectionName(), r.GetCollectionId()
|
||||
return r.GetReason(), 0
|
||||
log.Printf("CreateCollection: %s, id: %d", r.GetCollectionName(), r.GetCollectionId())
|
||||
return r.GetCollectionName(), r.GetCollectionId()
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ import (
|
|||
)
|
||||
|
||||
func TestFakeCreateCollectionByGRPC(t *testing.T) {
|
||||
reason, segmentID := FakeCreateCollectionByGRPC()
|
||||
if reason != "" {
|
||||
t.Error(reason)
|
||||
collectionName, segmentID := FakeCreateCollectionByGRPC()
|
||||
if collectionName != "grpc-client-test" {
|
||||
t.Error("Collection name wrong")
|
||||
}
|
||||
fmt.Println(collectionName)
|
||||
fmt.Println(segmentID)
|
||||
|
|
|
@ -9,8 +9,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/czs007/suvlim/pkg/master/common"
|
||||
pb "github.com/czs007/suvlim/pkg/master/grpc/master"
|
||||
messagepb "github.com/czs007/suvlim/pkg/master/grpc/message"
|
||||
pb "github.com/czs007/suvlim/pkg/master/grpc"
|
||||
"github.com/czs007/suvlim/pkg/master/informer"
|
||||
"github.com/czs007/suvlim/pkg/master/kv"
|
||||
"github.com/czs007/suvlim/pkg/master/mock"
|
||||
|
@ -91,19 +90,12 @@ func GRPCServer() error {
|
|||
|
||||
type GRPCMasterServer struct{}
|
||||
|
||||
func (ms GRPCMasterServer) CreateCollection(ctx context.Context, in *messagepb.Mapping) (*messagepb.Status, error) {
|
||||
return &messagepb.Status{
|
||||
ErrorCode: 0,
|
||||
Reason: "",
|
||||
func (ms GRPCMasterServer) CreateCollection(ctx context.Context, in *pb.CreateCollectionRequest) (*pb.CreateCollectionResponse, error) {
|
||||
return &pb.CreateCollectionResponse{
|
||||
CollectionName: in.CollectionName,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// func (ms GRPCMasterServer) CreateCollection(ctx context.Context, in *pb.CreateCollectionRequest) (*pb.CreateCollectionResponse, error) {
|
||||
// return &pb.CreateCollectionResponse{
|
||||
// CollectionName: in.CollectionName,
|
||||
// }, nil
|
||||
// }
|
||||
|
||||
func CollectionController() {
|
||||
cli, _ := clientv3.New(clientv3.Config{
|
||||
Endpoints: []string{"127.0.0.1:12379"},
|
||||
|
|
|
@ -2839,13 +2839,11 @@ func (m *InsertOrDeleteMsg) GetExtraParams() []*KeyValuePair {
|
|||
type SearchMsg struct {
|
||||
CollectionName string `protobuf:"bytes,1,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"`
|
||||
Records *VectorRowRecord `protobuf:"bytes,2,opt,name=records,proto3" json:"records,omitempty"`
|
||||
PartitionTag []string `protobuf:"bytes,3,rep,name=partition_tag,json=partitionTag,proto3" json:"partition_tag,omitempty"`
|
||||
PartitionTag string `protobuf:"bytes,3,opt,name=partition_tag,json=partitionTag,proto3" json:"partition_tag,omitempty"`
|
||||
Uid int64 `protobuf:"varint,4,opt,name=uid,proto3" json:"uid,omitempty"`
|
||||
Timestamp uint64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||
ClientId int64 `protobuf:"varint,6,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
|
||||
ExtraParams []*KeyValuePair `protobuf:"bytes,7,rep,name=extra_params,json=extraParams,proto3" json:"extra_params,omitempty"`
|
||||
Json []string `protobuf:"bytes,8,rep,name=json,proto3" json:"json,omitempty"`
|
||||
Dsl string `protobuf:"bytes,9,opt,name=dsl,proto3" json:"dsl,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
|
@ -2890,11 +2888,11 @@ func (m *SearchMsg) GetRecords() *VectorRowRecord {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *SearchMsg) GetPartitionTag() []string {
|
||||
func (m *SearchMsg) GetPartitionTag() string {
|
||||
if m != nil {
|
||||
return m.PartitionTag
|
||||
}
|
||||
return nil
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *SearchMsg) GetUid() int64 {
|
||||
|
@ -2925,23 +2923,9 @@ func (m *SearchMsg) GetExtraParams() []*KeyValuePair {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *SearchMsg) GetJson() []string {
|
||||
if m != nil {
|
||||
return m.Json
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SearchMsg) GetDsl() string {
|
||||
if m != nil {
|
||||
return m.Dsl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type TimeSyncMsg struct {
|
||||
Peer_Id int64 `protobuf:"varint,1,opt,name=peer_Id,json=peerId,proto3" json:"peer_Id,omitempty"`
|
||||
Timestamp uint64 `protobuf:"varint,2,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
|
||||
Timestamp uint64 `protobuf:"varint,2,opt,name=Timestamp,json=timestamp,proto3" json:"Timestamp,omitempty"`
|
||||
SyncType SyncType `protobuf:"varint,3,opt,name=sync_type,json=syncType,proto3,enum=milvus.grpc.SyncType" json:"sync_type,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
|
@ -3108,185 +3092,184 @@ func init() {
|
|||
func init() { proto.RegisterFile("message.proto", fileDescriptor_33c57e4bae7b9afd) }
|
||||
|
||||
var fileDescriptor_33c57e4bae7b9afd = []byte{
|
||||
// 2878 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x3a, 0xdd, 0x72, 0xdb, 0xc6,
|
||||
0xd5, 0x04, 0x41, 0x91, 0xc4, 0x01, 0x29, 0x41, 0x6b, 0xd9, 0x96, 0xed, 0xf8, 0xb3, 0x83, 0x6f,
|
||||
0xa6, 0x75, 0xdc, 0x19, 0x4f, 0xa2, 0xa4, 0xb6, 0x5b, 0x27, 0x69, 0xf8, 0x03, 0x49, 0xa8, 0x29,
|
||||
0x52, 0x5e, 0x42, 0x76, 0x7e, 0xa6, 0x83, 0x42, 0xc4, 0x9a, 0x46, 0x43, 0x02, 0x2c, 0x00, 0x5a,
|
||||
0xe6, 0x6d, 0xef, 0xdb, 0x99, 0x5e, 0xf6, 0xb2, 0x7d, 0x84, 0xf6, 0x0d, 0x7a, 0xd9, 0x17, 0xc8,
|
||||
0x45, 0x66, 0x7a, 0xd9, 0xe9, 0x63, 0x74, 0xf6, 0x07, 0x24, 0x40, 0x91, 0x12, 0x19, 0xb5, 0x57,
|
||||
0x5a, 0x9e, 0xdd, 0x73, 0xf6, 0xfc, 0xef, 0x39, 0x07, 0x82, 0xea, 0x90, 0x44, 0x91, 0xd3, 0x27,
|
||||
0x8f, 0x46, 0x61, 0x10, 0x07, 0x48, 0x1d, 0x7a, 0x83, 0xb7, 0xe3, 0xe8, 0x51, 0x3f, 0x1c, 0xf5,
|
||||
0xf4, 0x57, 0x50, 0xec, 0xc6, 0x4e, 0x3c, 0x8e, 0xd0, 0x4f, 0x01, 0x48, 0x18, 0x06, 0xa1, 0xdd,
|
||||
0x0b, 0x5c, 0xb2, 0x2b, 0xdd, 0x97, 0x1e, 0x6c, 0xee, 0xdd, 0x78, 0x94, 0x3a, 0xfb, 0xc8, 0xa0,
|
||||
0xdb, 0x8d, 0xc0, 0x25, 0x58, 0x21, 0xc9, 0x12, 0xdd, 0x80, 0x62, 0x48, 0x9c, 0x28, 0xf0, 0x77,
|
||||
0xf3, 0xf7, 0xa5, 0x07, 0x0a, 0x16, 0xbf, 0xf4, 0xc7, 0x50, 0x79, 0x4e, 0x26, 0x2f, 0x9d, 0xc1,
|
||||
0x98, 0x1c, 0x3b, 0x5e, 0x88, 0x34, 0x90, 0xbf, 0x25, 0x13, 0x46, 0x57, 0xc1, 0x74, 0x89, 0x76,
|
||||
0x60, 0xe3, 0x2d, 0xdd, 0x16, 0x88, 0xfc, 0x87, 0xfe, 0x33, 0xd8, 0x6c, 0x04, 0x83, 0x01, 0xe9,
|
||||
0xc5, 0x5e, 0xe0, 0xb7, 0x9d, 0x21, 0x41, 0x3f, 0x86, 0xad, 0xde, 0x14, 0x62, 0xfb, 0xce, 0x90,
|
||||
0x08, 0x2a, 0x9b, 0xbd, 0xcc, 0x41, 0x7d, 0x00, 0x28, 0x8b, 0xda, 0xf2, 0xa2, 0x18, 0xfd, 0x04,
|
||||
0x8a, 0x11, 0x93, 0x90, 0x61, 0xa9, 0x7b, 0xd7, 0x32, 0x32, 0x71, 0xe1, 0xb1, 0x38, 0x82, 0x3e,
|
||||
0x00, 0x6d, 0xee, 0xae, 0x68, 0x37, 0x7f, 0x5f, 0x7e, 0xa0, 0xe0, 0xad, 0xec, 0x65, 0x91, 0xde,
|
||||
0x05, 0x65, 0xdf, 0x23, 0x03, 0x77, 0x2d, 0x1e, 0xd1, 0x5d, 0x80, 0xd7, 0x14, 0x8b, 0x9f, 0xe1,
|
||||
0x92, 0x2b, 0xaf, 0x13, 0x3a, 0xfa, 0x3f, 0x24, 0x28, 0x1d, 0x39, 0xa3, 0x91, 0xe7, 0xf7, 0xd7,
|
||||
0x63, 0x7c, 0x01, 0x03, 0xf9, 0x85, 0x0c, 0x50, 0xaa, 0xbd, 0x37, 0x64, 0xe8, 0xec, 0xca, 0x8b,
|
||||
0xa8, 0xb2, 0x2d, 0x2c, 0x8e, 0xa0, 0x4f, 0xa1, 0x42, 0xde, 0xc5, 0xa1, 0x63, 0x8f, 0x9c, 0xd0,
|
||||
0x19, 0x46, 0xbb, 0x85, 0xfb, 0xf2, 0x03, 0x75, 0xef, 0x56, 0x06, 0x25, 0x6d, 0x65, 0xac, 0xb2,
|
||||
0xe3, 0xc7, 0xec, 0xb4, 0x1e, 0x81, 0x2a, 0x64, 0x59, 0xdf, 0x10, 0x4f, 0xa0, 0x32, 0xe4, 0xb8,
|
||||
0xf6, 0xc0, 0x8b, 0x62, 0x66, 0x04, 0x75, 0x6f, 0x27, 0x83, 0x22, 0x88, 0x63, 0x75, 0x38, 0xbb,
|
||||
0x45, 0x7f, 0x0e, 0x9b, 0xc7, 0x4e, 0x18, 0x7b, 0x54, 0x60, 0xc6, 0xc7, 0xea, 0xb6, 0xd1, 0x40,
|
||||
0x8e, 0x9d, 0xbe, 0xd0, 0x1b, 0x5d, 0xea, 0x03, 0xa8, 0x4e, 0x89, 0xad, 0x2f, 0xc3, 0x23, 0xb8,
|
||||
0x36, 0x4a, 0xb0, 0xed, 0xd8, 0xe9, 0xdb, 0x4e, 0x18, 0x3a, 0x13, 0xe1, 0x4f, 0xdb, 0xd3, 0x2d,
|
||||
0xcb, 0xe9, 0xd7, 0xe8, 0x86, 0xfe, 0x02, 0xb6, 0x5e, 0x92, 0x5e, 0x1c, 0x84, 0x38, 0x38, 0xc3,
|
||||
0xa4, 0x17, 0x84, 0x2e, 0x73, 0x97, 0x41, 0xe0, 0xc4, 0xb6, 0xeb, 0xc4, 0xce, 0xae, 0x74, 0x5f,
|
||||
0x7e, 0x90, 0xc7, 0x0a, 0x83, 0x34, 0x9d, 0xd8, 0x41, 0xf7, 0x40, 0x3d, 0xf5, 0x7c, 0x27, 0x9c,
|
||||
0xf0, 0x7d, 0xca, 0x79, 0x05, 0x03, 0x07, 0xd1, 0x03, 0xfa, 0xaf, 0x41, 0x31, 0xfc, 0xd8, 0x8b,
|
||||
0x27, 0xa6, 0x1b, 0xad, 0xc7, 0xfc, 0x8f, 0x60, 0x8b, 0x30, 0x4c, 0xdb, 0x73, 0x53, 0x8c, 0xcb,
|
||||
0xb8, 0x4a, 0x04, 0x41, 0xce, 0xf4, 0x3e, 0x54, 0x04, 0xd3, 0x9c, 0xe3, 0xc7, 0x50, 0x0a, 0xd9,
|
||||
0x2a, 0x62, 0xec, 0xaa, 0x7b, 0xef, 0x65, 0x6e, 0x99, 0x13, 0x10, 0x27, 0x87, 0xf5, 0x6f, 0x40,
|
||||
0xe5, 0x7b, 0xdc, 0x68, 0x08, 0x0a, 0xbf, 0xa1, 0x49, 0x85, 0x5b, 0x8a, 0xad, 0xd1, 0x53, 0x80,
|
||||
0x30, 0x38, 0xb3, 0x39, 0x06, 0x13, 0x76, 0xde, 0x17, 0xd3, 0x9c, 0x60, 0x25, 0x4c, 0x6e, 0xd1,
|
||||
0xfb, 0x22, 0x56, 0x8f, 0x48, 0xec, 0xcc, 0x85, 0xa0, 0x34, 0x17, 0x82, 0xe8, 0x03, 0x28, 0xc4,
|
||||
0x93, 0x11, 0x0f, 0x9f, 0xcd, 0xbd, 0xeb, 0x19, 0xfa, 0x54, 0xa7, 0xd6, 0x64, 0x44, 0x30, 0x3b,
|
||||
0x42, 0x1d, 0xc6, 0xf5, 0x86, 0x2c, 0x90, 0x64, 0x4c, 0x97, 0x7a, 0x0d, 0x8a, 0x3c, 0x84, 0xd0,
|
||||
0x13, 0x50, 0xf9, 0x2d, 0x43, 0x12, 0x3b, 0x89, 0x2e, 0xb2, 0xf9, 0x74, 0xca, 0x12, 0xe6, 0x0c,
|
||||
0xd1, 0x65, 0xa4, 0xdf, 0x85, 0x12, 0x0e, 0xce, 0x98, 0x79, 0x11, 0x14, 0x4e, 0x07, 0xc1, 0x29,
|
||||
0xe3, 0xb1, 0x82, 0xd9, 0x5a, 0xff, 0x73, 0x1e, 0x54, 0xd3, 0x8f, 0x48, 0x18, 0xaf, 0xe9, 0xdd,
|
||||
0xb3, 0xc0, 0xcf, 0x5f, 0x1e, 0xf8, 0x1f, 0x01, 0xd5, 0x5e, 0xc4, 0xdd, 0x4a, 0x5e, 0x10, 0x7b,
|
||||
0x82, 0x45, 0x5c, 0xa6, 0xc7, 0x18, 0xb3, 0x0b, 0x1c, 0xa6, 0xb0, 0xc0, 0x61, 0xd0, 0xff, 0x43,
|
||||
0x35, 0x13, 0x15, 0xbb, 0x1b, 0x8c, 0xdd, 0x4a, 0x3a, 0x1e, 0xce, 0x25, 0x9e, 0xe2, 0x5a, 0x89,
|
||||
0xe7, 0xdf, 0x12, 0xa8, 0x5d, 0xe2, 0x84, 0xbd, 0x37, 0x6b, 0xea, 0xe8, 0x19, 0x54, 0xde, 0x32,
|
||||
0x17, 0xe2, 0xf7, 0x8a, 0xac, 0xb3, 0xbb, 0xc0, 0xc7, 0x18, 0x61, 0xac, 0xbe, 0x4d, 0xb9, 0x2c,
|
||||
0xf5, 0x86, 0x68, 0xc0, 0xbc, 0x41, 0xc1, 0x74, 0x79, 0x5e, 0xd4, 0x02, 0x0b, 0xfd, 0x8b, 0x45,
|
||||
0xdd, 0x58, 0x4b, 0xd4, 0x33, 0xd8, 0xe1, 0x92, 0x9a, 0x7e, 0x97, 0xf4, 0x87, 0xc4, 0x17, 0x6e,
|
||||
0xa1, 0x43, 0xf5, 0xb5, 0x37, 0x20, 0x33, 0x5b, 0x48, 0xec, 0x6a, 0x95, 0x02, 0x13, 0x4b, 0x3c,
|
||||
0x83, 0x4a, 0xc4, 0x70, 0xa7, 0xd2, 0x4a, 0xe7, 0xa4, 0x4d, 0xa9, 0x11, 0xab, 0xd1, 0xec, 0x87,
|
||||
0xfe, 0x27, 0x09, 0xca, 0x2c, 0xb5, 0x78, 0x64, 0xcd, 0xcc, 0xa2, 0x81, 0xec, 0xb9, 0x91, 0xc8,
|
||||
0x26, 0x74, 0x89, 0xee, 0x80, 0xf2, 0xd6, 0x19, 0x78, 0xae, 0x1d, 0x06, 0x67, 0xcc, 0xdb, 0xca,
|
||||
0xb8, 0xcc, 0x00, 0x38, 0x38, 0xcb, 0xba, 0x62, 0x61, 0x15, 0x57, 0xd4, 0xff, 0x9a, 0x07, 0xf5,
|
||||
0xc5, 0x98, 0x84, 0x13, 0x4c, 0xa2, 0xf1, 0x60, 0xcd, 0xac, 0xfd, 0x11, 0x94, 0x89, 0x90, 0x4b,
|
||||
0x68, 0x24, 0x9b, 0x03, 0x12, 0xa1, 0xf1, 0xf4, 0x18, 0xba, 0x09, 0x25, 0x9a, 0x98, 0xfc, 0x71,
|
||||
0x92, 0x0b, 0x8a, 0x61, 0x70, 0xd6, 0x1e, 0x0f, 0x69, 0x71, 0x14, 0xf5, 0x82, 0x90, 0xf0, 0x97,
|
||||
0x33, 0x8f, 0xc5, 0x2f, 0xf4, 0x1e, 0x28, 0xae, 0x17, 0xc5, 0x8e, 0xdf, 0x23, 0xdc, 0xe0, 0x79,
|
||||
0x3c, 0x03, 0x5c, 0xcd, 0xf9, 0xd1, 0x2d, 0x28, 0xff, 0x96, 0xca, 0x6e, 0x7b, 0xee, 0x6e, 0x89,
|
||||
0x71, 0x53, 0x62, 0xbf, 0x4d, 0x97, 0xea, 0xb9, 0x37, 0xf0, 0x88, 0x1f, 0xd3, 0xbd, 0x32, 0xdb,
|
||||
0x2b, 0x73, 0x80, 0xe9, 0xea, 0xbf, 0x02, 0xb5, 0x1b, 0x87, 0xf4, 0x3d, 0x25, 0xa3, 0xc1, 0x64,
|
||||
0x3d, 0x9d, 0xbd, 0x0f, 0x95, 0x88, 0xe1, 0xda, 0x21, 0x45, 0x16, 0x4f, 0xa8, 0x1a, 0xcd, 0xe8,
|
||||
0xe9, 0xaf, 0x40, 0xa9, 0x07, 0xc1, 0xe0, 0x07, 0x10, 0xbf, 0x0b, 0x70, 0x1a, 0x04, 0x83, 0x14,
|
||||
0xe9, 0x32, 0x56, 0x4e, 0x13, 0x5a, 0x7a, 0x94, 0xae, 0xfa, 0x70, 0x70, 0xd6, 0x08, 0xc6, 0xfe,
|
||||
0x9a, 0x26, 0xff, 0x10, 0x76, 0x52, 0xf9, 0x81, 0x9a, 0xb2, 0x47, 0x89, 0xb0, 0xbb, 0x64, 0x8c,
|
||||
0x7a, 0xe7, 0xc8, 0xeb, 0x77, 0xa0, 0xd4, 0x08, 0x86, 0x43, 0xc7, 0x77, 0xa9, 0x3b, 0xf7, 0x86,
|
||||
0x6e, 0x52, 0xd8, 0xf6, 0x86, 0xae, 0xfe, 0x4f, 0x09, 0xc0, 0xf4, 0x5d, 0xf2, 0x8e, 0x87, 0xe2,
|
||||
0xff, 0xa6, 0x8e, 0xcb, 0xbe, 0x62, 0xf2, 0xfc, 0x2b, 0x76, 0x17, 0xc0, 0xa3, 0x2c, 0xf0, 0xed,
|
||||
0x02, 0xdf, 0x66, 0x10, 0xb6, 0x7d, 0xb5, 0xa4, 0xf3, 0x05, 0xc0, 0xfe, 0x60, 0x1c, 0x89, 0xec,
|
||||
0xba, 0x07, 0xd7, 0xe7, 0x58, 0xce, 0xa4, 0x9c, 0x6b, 0x59, 0xc6, 0x79, 0xd5, 0x70, 0x02, 0x95,
|
||||
0x46, 0x30, 0x1c, 0x39, 0xbd, 0x75, 0x5f, 0xb1, 0xf7, 0x40, 0x89, 0xdf, 0x84, 0x24, 0x7a, 0x13,
|
||||
0x0c, 0x78, 0x09, 0x20, 0xe1, 0x19, 0x40, 0x3f, 0x81, 0xad, 0x26, 0x19, 0x90, 0x98, 0xd4, 0x27,
|
||||
0x66, 0x73, 0x4d, 0xca, 0xb7, 0xa0, 0x3c, 0x57, 0xe9, 0x94, 0x3c, 0x51, 0xe3, 0x7c, 0x9d, 0xee,
|
||||
0x49, 0x4c, 0xff, 0x75, 0xb0, 0x9e, 0x4d, 0xef, 0x80, 0x42, 0xeb, 0x17, 0xdb, 0xf3, 0x5f, 0x07,
|
||||
0xc2, 0x9a, 0x65, 0x0a, 0xa0, 0x94, 0xf4, 0x6f, 0x60, 0xfb, 0x80, 0xc4, 0xa2, 0x48, 0x6b, 0x46,
|
||||
0x6b, 0x32, 0x7d, 0x17, 0x20, 0xe2, 0x69, 0x9f, 0x86, 0x34, 0xf7, 0x57, 0x45, 0x40, 0x4c, 0x57,
|
||||
0x1f, 0xc3, 0x66, 0x52, 0xfe, 0xf1, 0x47, 0xf8, 0xbf, 0xa1, 0x0e, 0x5a, 0x75, 0xce, 0x5c, 0x2f,
|
||||
0x62, 0x09, 0x5b, 0x11, 0x25, 0x0c, 0x6f, 0x8d, 0x3e, 0x04, 0x8d, 0xbf, 0x92, 0xac, 0xc2, 0xe1,
|
||||
0x22, 0xb1, 0x94, 0x37, 0x24, 0x7e, 0xe4, 0x89, 0xaa, 0x4e, 0xc6, 0x33, 0x80, 0xfe, 0x07, 0x49,
|
||||
0x54, 0x68, 0xb4, 0xba, 0x42, 0x9f, 0x80, 0x42, 0xb3, 0xbd, 0xcd, 0xea, 0x30, 0xe9, 0x82, 0x3a,
|
||||
0xec, 0x30, 0x87, 0xcb, 0xae, 0x58, 0xa3, 0xfa, 0xb9, 0xc7, 0x9b, 0x5a, 0xe6, 0xee, 0x82, 0xc7,
|
||||
0x7b, 0xc6, 0xd6, 0x61, 0x2e, 0xf3, 0x86, 0xd7, 0x4b, 0xa2, 0x27, 0xd5, 0xbf, 0x93, 0x00, 0x52,
|
||||
0xdc, 0x6f, 0x42, 0xde, 0xe3, 0x31, 0x5e, 0xc0, 0x79, 0xcf, 0xa5, 0x95, 0x59, 0x2a, 0x36, 0xd9,
|
||||
0x7a, 0x5a, 0x38, 0xca, 0x97, 0x17, 0x8e, 0x9f, 0x42, 0x85, 0x47, 0xe7, 0xca, 0x7d, 0x95, 0x37,
|
||||
0xcd, 0x27, 0xd1, 0x15, 0x83, 0xf7, 0x00, 0xb6, 0x53, 0x5a, 0x10, 0x55, 0xfb, 0x5e, 0xd2, 0x8b,
|
||||
0xaf, 0x52, 0xb3, 0x0b, 0x15, 0x7d, 0x2f, 0x81, 0x62, 0x91, 0x70, 0xc8, 0x5e, 0xda, 0xcb, 0xaa,
|
||||
0xea, 0x3b, 0xa0, 0x78, 0x7e, 0x6c, 0x27, 0x0d, 0x3f, 0xf5, 0xa7, 0xb2, 0xe7, 0xc7, 0x8c, 0x47,
|
||||
0xfa, 0x7c, 0xb8, 0xc1, 0xf8, 0x74, 0x40, 0xc4, 0x3e, 0xf5, 0x28, 0x09, 0xab, 0x1c, 0xc6, 0x8f,
|
||||
0xf0, 0x12, 0x61, 0x4c, 0xd8, 0x23, 0x5b, 0xe0, 0x4f, 0x17, 0x03, 0xd0, 0x67, 0x76, 0x07, 0x36,
|
||||
0x4e, 0x83, 0x20, 0x8a, 0x59, 0x29, 0x99, 0xc7, 0xfc, 0xc7, 0x15, 0x6b, 0x48, 0x07, 0x54, 0x96,
|
||||
0xa1, 0x42, 0x62, 0xbc, 0x1b, 0x85, 0xe8, 0x29, 0x94, 0x83, 0x11, 0x09, 0x9d, 0x38, 0x08, 0x85,
|
||||
0x47, 0x66, 0x75, 0x24, 0xce, 0x76, 0xc4, 0x19, 0x3c, 0x3d, 0x8d, 0x76, 0xa1, 0xc4, 0xd6, 0xbe,
|
||||
0x2b, 0xbc, 0x25, 0xf9, 0xa9, 0xff, 0x4d, 0x02, 0xc0, 0x8e, 0xdf, 0x27, 0x2b, 0x69, 0x70, 0x2f,
|
||||
0x4d, 0xe7, 0x7c, 0x59, 0x9a, 0x62, 0x76, 0x7a, 0xc3, 0x4c, 0x31, 0xf2, 0x45, 0x8a, 0x59, 0xaf,
|
||||
0xab, 0xff, 0x4e, 0x4a, 0x3a, 0xb5, 0x95, 0xd8, 0xbe, 0x07, 0x2a, 0x2f, 0x47, 0x38, 0x23, 0x79,
|
||||
0xc6, 0x08, 0x30, 0x50, 0x9d, 0x71, 0x93, 0x6a, 0x18, 0xe5, 0x35, 0x1a, 0x46, 0x1a, 0x82, 0x71,
|
||||
0x30, 0xfa, 0x56, 0x38, 0x03, 0x5b, 0x5f, 0x31, 0x32, 0xde, 0x41, 0x85, 0x96, 0x28, 0xc4, 0xf1,
|
||||
0xb9, 0x64, 0x0f, 0x60, 0x23, 0xe8, 0xf5, 0xc6, 0x89, 0xc1, 0x51, 0x86, 0x4c, 0x87, 0xee, 0x60,
|
||||
0x7e, 0x00, 0x7d, 0x0e, 0xd5, 0x3e, 0xf1, 0x49, 0xe8, 0x0c, 0x6c, 0x26, 0x99, 0xb0, 0x50, 0xf6,
|
||||
0xe2, 0x03, 0x7e, 0x82, 0x17, 0xa6, 0x95, 0x7e, 0xea, 0x97, 0xfe, 0xfb, 0x3c, 0x54, 0xd2, 0xdb,
|
||||
0xe8, 0x0b, 0xa8, 0x9e, 0x72, 0x56, 0x04, 0x41, 0x69, 0x41, 0xb7, 0x9b, 0x66, 0xf6, 0x30, 0x87,
|
||||
0x2b, 0xa7, 0x69, 0xe6, 0x9f, 0x00, 0xc4, 0x24, 0x1c, 0x4e, 0xf9, 0x91, 0xce, 0xb5, 0x9f, 0xd3,
|
||||
0xd8, 0x3d, 0xcc, 0x61, 0x25, 0x9e, 0x06, 0xf2, 0xcf, 0x41, 0x0d, 0xa9, 0x53, 0x0a, 0x4c, 0x3e,
|
||||
0x25, 0xba, 0x99, 0xad, 0xb8, 0xa7, 0x4e, 0x7b, 0x98, 0xc3, 0x10, 0xce, 0x5c, 0xf8, 0xb3, 0x69,
|
||||
0x0a, 0xe6, 0xc8, 0x85, 0x05, 0x1d, 0x45, 0xca, 0x77, 0x66, 0xd9, 0x97, 0xfd, 0xa4, 0xd9, 0x97,
|
||||
0xe1, 0xe9, 0xff, 0x92, 0xa0, 0x9a, 0xea, 0x3c, 0x8e, 0xeb, 0xab, 0xbf, 0x5b, 0x6b, 0x0e, 0x5d,
|
||||
0xce, 0x9b, 0x4e, 0x5e, 0xa0, 0xe9, 0xe5, 0xa6, 0xbb, 0x62, 0x30, 0xfd, 0x4e, 0x86, 0x6d, 0xde,
|
||||
0xcd, 0x77, 0x42, 0x5e, 0xb9, 0x1c, 0x45, 0xfd, 0xd5, 0x85, 0xcd, 0xf4, 0x46, 0xdc, 0xc6, 0x97,
|
||||
0xb5, 0xe9, 0x1a, 0xc8, 0x63, 0xcf, 0x4d, 0x66, 0x16, 0x63, 0xcf, 0x5d, 0xd4, 0xa5, 0x9e, 0x6f,
|
||||
0xc8, 0x69, 0xdd, 0xe5, 0x0d, 0x49, 0x14, 0x3b, 0xc3, 0x11, 0x4b, 0xb3, 0x05, 0x3c, 0x03, 0xcc,
|
||||
0x95, 0x21, 0xc5, 0xb9, 0x32, 0x84, 0x6e, 0xf7, 0xde, 0x38, 0xbe, 0x4f, 0x06, 0xb3, 0xa6, 0x44,
|
||||
0x11, 0x10, 0x93, 0x32, 0x90, 0x0f, 0x46, 0xac, 0x1f, 0xd9, 0x9c, 0x2b, 0xa4, 0x3a, 0x23, 0xf6,
|
||||
0x68, 0xe6, 0x83, 0x51, 0xb6, 0x77, 0x51, 0xb2, 0xbd, 0xcb, 0x39, 0x23, 0xc0, 0x5a, 0x46, 0xf8,
|
||||
0x7b, 0x1e, 0x14, 0xee, 0x6d, 0x6b, 0x29, 0x3f, 0x95, 0xb8, 0xb8, 0xea, 0x57, 0x4c, 0x5c, 0xe7,
|
||||
0xf4, 0x2d, 0x2f, 0x98, 0x0a, 0x08, 0x33, 0x15, 0x66, 0x66, 0xba, 0xd8, 0x02, 0x19, 0xf5, 0x14,
|
||||
0x2f, 0x51, 0x4f, 0x69, 0xad, 0x86, 0x32, 0x19, 0xc5, 0x95, 0x19, 0x9b, 0x7c, 0x14, 0x27, 0x66,
|
||||
0x1d, 0xca, 0x74, 0xd6, 0xa1, 0xbf, 0x03, 0xd5, 0xf2, 0x86, 0xa4, 0x3b, 0xf1, 0x7b, 0x54, 0x8b,
|
||||
0x37, 0xa1, 0x34, 0x22, 0x24, 0xb4, 0x4d, 0x57, 0x14, 0x7b, 0x45, 0xfa, 0xd3, 0x64, 0x62, 0x58,
|
||||
0x53, 0x31, 0xf2, 0x5c, 0x8c, 0x29, 0x00, 0xed, 0x81, 0x12, 0x4d, 0xfc, 0x9e, 0xbd, 0xb4, 0x90,
|
||||
0xa2, 0xf4, 0x99, 0x4f, 0x94, 0x23, 0xb1, 0xd2, 0xbf, 0x01, 0x78, 0x4e, 0x26, 0x7b, 0x5d, 0xd2,
|
||||
0xa7, 0x17, 0x0b, 0xc5, 0x49, 0x4b, 0x14, 0x97, 0xbf, 0xd8, 0x75, 0x65, 0x56, 0x99, 0xcc, 0x5c,
|
||||
0xf7, 0xe1, 0x5f, 0x0a, 0xa0, 0x4c, 0xbf, 0x7b, 0x20, 0x15, 0x4a, 0xdd, 0x93, 0x46, 0xc3, 0xe8,
|
||||
0x76, 0xb5, 0x1c, 0xda, 0x01, 0xed, 0xa4, 0x6d, 0x7c, 0x79, 0x6c, 0x34, 0x2c, 0xa3, 0x69, 0x1b,
|
||||
0x18, 0x77, 0xb0, 0x26, 0x21, 0x04, 0x9b, 0x8d, 0x4e, 0xbb, 0x6d, 0x34, 0x2c, 0x7b, 0xbf, 0x66,
|
||||
0xb6, 0x8c, 0xa6, 0x96, 0x47, 0xd7, 0x61, 0xfb, 0xd8, 0xc0, 0x47, 0x66, 0xb7, 0x6b, 0x76, 0xda,
|
||||
0x76, 0xd3, 0x68, 0x9b, 0x46, 0x53, 0x93, 0xd1, 0x2d, 0xb8, 0xde, 0xe8, 0xb4, 0x5a, 0x46, 0xc3,
|
||||
0xa2, 0xe0, 0x76, 0xc7, 0xb2, 0x8d, 0x2f, 0xcd, 0xae, 0xd5, 0xd5, 0x0a, 0x94, 0xb6, 0xd9, 0x6a,
|
||||
0x19, 0x07, 0xb5, 0x96, 0x5d, 0xc3, 0x07, 0x27, 0x47, 0x46, 0xdb, 0xd2, 0x36, 0x28, 0x9d, 0x04,
|
||||
0xda, 0x34, 0x8f, 0x8c, 0x36, 0x25, 0xa7, 0x95, 0xd0, 0x0d, 0x40, 0x09, 0xd8, 0x6c, 0x37, 0x8d,
|
||||
0x2f, 0x6d, 0xeb, 0xab, 0x63, 0x43, 0x2b, 0xa3, 0x3b, 0x70, 0x33, 0x81, 0xa7, 0xef, 0xa9, 0x1d,
|
||||
0x19, 0x9a, 0x82, 0x34, 0xa8, 0x24, 0x9b, 0x56, 0xe7, 0xf8, 0xb9, 0x06, 0x69, 0xea, 0xb8, 0xf3,
|
||||
0x0a, 0x1b, 0x8d, 0x0e, 0x6e, 0x6a, 0x6a, 0x1a, 0xfc, 0xd2, 0x68, 0x58, 0x1d, 0x6c, 0x9b, 0x4d,
|
||||
0xad, 0x42, 0x99, 0x4f, 0xc0, 0x5d, 0xa3, 0x86, 0x1b, 0x87, 0x36, 0x36, 0xba, 0x27, 0x2d, 0x4b,
|
||||
0xab, 0x52, 0x15, 0xec, 0x9b, 0x2d, 0x83, 0x49, 0xb4, 0xdf, 0x39, 0x69, 0x37, 0xb5, 0x4d, 0xb4,
|
||||
0x05, 0xea, 0x91, 0x61, 0xd5, 0x12, 0x9d, 0x6c, 0xd1, 0xfb, 0x1b, 0xb5, 0xc6, 0xa1, 0x91, 0x40,
|
||||
0x34, 0xb4, 0x0b, 0x3b, 0x8d, 0x5a, 0x9b, 0x22, 0x35, 0xb0, 0x51, 0xb3, 0x0c, 0x7b, 0xbf, 0xd3,
|
||||
0x6a, 0x1a, 0x58, 0xdb, 0xa6, 0x02, 0xce, 0xed, 0x98, 0x2d, 0x43, 0x43, 0x29, 0x8c, 0xa6, 0xd1,
|
||||
0x32, 0x66, 0x18, 0xd7, 0x52, 0x18, 0xc9, 0x0e, 0xc5, 0xd8, 0xa1, 0xc2, 0xd4, 0x4f, 0xcc, 0x56,
|
||||
0x53, 0x28, 0x8a, 0x1b, 0xed, 0x3a, 0xda, 0x86, 0x6a, 0x22, 0x4c, 0xbb, 0x65, 0x76, 0x2d, 0xed,
|
||||
0x06, 0xba, 0x09, 0xd7, 0x12, 0xd0, 0x91, 0x61, 0x61, 0xb3, 0xc1, 0xb5, 0x7a, 0x93, 0x9e, 0xed,
|
||||
0x9c, 0x58, 0x76, 0x67, 0xdf, 0x3e, 0x32, 0x8e, 0x3a, 0xf8, 0x2b, 0x6d, 0xf7, 0xe1, 0x1f, 0x25,
|
||||
0x28, 0x27, 0x15, 0x3e, 0x2a, 0x43, 0xa1, 0xdd, 0x69, 0x1b, 0x5a, 0x8e, 0xae, 0xea, 0x9d, 0x4e,
|
||||
0x4b, 0x93, 0xe8, 0xca, 0x6c, 0x5b, 0x4f, 0xb5, 0x3c, 0x52, 0x60, 0xc3, 0x6c, 0x5b, 0x1f, 0x3d,
|
||||
0xd6, 0x64, 0xb1, 0xfc, 0x78, 0x4f, 0x2b, 0x88, 0xe5, 0xe3, 0x4f, 0xb4, 0x0d, 0xba, 0xdc, 0x6f,
|
||||
0x75, 0x6a, 0x96, 0x06, 0x08, 0xa0, 0xd8, 0xec, 0x9c, 0xd4, 0x5b, 0x86, 0xa6, 0xd2, 0x75, 0xd7,
|
||||
0xc2, 0x66, 0xfb, 0x40, 0xdb, 0xa1, 0x1c, 0x08, 0x4b, 0xd4, 0xcd, 0x76, 0x0d, 0x7f, 0xa5, 0xb9,
|
||||
0x54, 0x9b, 0x02, 0xc4, 0x91, 0xc9, 0xc3, 0x06, 0x6c, 0xcd, 0xd5, 0xa4, 0xa8, 0x08, 0xf9, 0x96,
|
||||
0xa5, 0xe5, 0x50, 0x09, 0xe4, 0x96, 0x65, 0x68, 0x12, 0x05, 0x18, 0x2f, 0xb4, 0x3c, 0xfd, 0x7b,
|
||||
0x60, 0x69, 0x32, 0xdd, 0x38, 0xb0, 0x0c, 0xad, 0x40, 0x01, 0x6d, 0x43, 0xdb, 0x78, 0xf8, 0x14,
|
||||
0x36, 0x58, 0x9d, 0x43, 0x1d, 0xdf, 0x6c, 0xbf, 0xac, 0xb5, 0xcc, 0x26, 0x97, 0xeb, 0xe8, 0xa4,
|
||||
0x6b, 0x69, 0x12, 0xe3, 0xea, 0xb0, 0x73, 0xd2, 0xa2, 0x4e, 0x5e, 0x81, 0x32, 0x85, 0x52, 0xab,
|
||||
0x6b, 0xf2, 0xc3, 0xfb, 0x50, 0xe4, 0xc9, 0x9b, 0x9e, 0x31, 0xdb, 0x5d, 0x03, 0xd3, 0x9b, 0xa9,
|
||||
0x44, 0xcc, 0x1e, 0x9a, 0xf4, 0xf0, 0x1e, 0x94, 0x93, 0x60, 0xa6, 0x14, 0xb1, 0x51, 0xa3, 0xb4,
|
||||
0x15, 0xd8, 0x78, 0x85, 0x4d, 0x7a, 0x60, 0xef, 0xfb, 0x2a, 0x54, 0x8f, 0x58, 0xe8, 0x77, 0x49,
|
||||
0xf8, 0xd6, 0xeb, 0x11, 0xf4, 0x0b, 0xd0, 0x1a, 0x21, 0x71, 0x62, 0x32, 0xeb, 0xc6, 0xd1, 0xc2,
|
||||
0x4f, 0x42, 0xb7, 0x17, 0xf5, 0xe3, 0x7a, 0x0e, 0xed, 0x43, 0xf5, 0xd0, 0x89, 0x52, 0xd8, 0x77,
|
||||
0xe6, 0x6a, 0xe8, 0x74, 0x82, 0xbf, 0x7d, 0xe3, 0x5c, 0xb5, 0xc5, 0x27, 0x4e, 0x39, 0x64, 0x02,
|
||||
0x6a, 0x92, 0xa8, 0x17, 0x7a, 0xa7, 0x64, 0x55, 0x62, 0x0b, 0xf9, 0xd4, 0x73, 0xe8, 0x05, 0xb5,
|
||||
0xd3, 0xd8, 0x8f, 0x57, 0xa5, 0x73, 0x6f, 0xc9, 0xe6, 0x74, 0x34, 0x95, 0x43, 0xbf, 0x84, 0xad,
|
||||
0xee, 0x1b, 0xfa, 0x33, 0xd9, 0x8b, 0xe6, 0xb4, 0x24, 0x46, 0x57, 0x4b, 0x69, 0x25, 0xdf, 0x4e,
|
||||
0xf5, 0x1c, 0x3a, 0x06, 0x94, 0xa5, 0xc5, 0xc6, 0x1f, 0x17, 0x72, 0xb8, 0x6c, 0x93, 0x8d, 0x3b,
|
||||
0x72, 0xa8, 0x09, 0x9b, 0xcd, 0x30, 0x18, 0xad, 0x2a, 0xef, 0x12, 0x4b, 0x7e, 0x06, 0x2a, 0x77,
|
||||
0x05, 0x36, 0x68, 0x43, 0xd9, 0xfa, 0x74, 0x36, 0x7c, 0x5b, 0x86, 0xde, 0x80, 0x6a, 0x62, 0xc0,
|
||||
0x4b, 0x08, 0x2c, 0xdb, 0xd0, 0x73, 0xe8, 0x19, 0x28, 0x54, 0x92, 0x1f, 0xc6, 0x81, 0x01, 0x5b,
|
||||
0x5c, 0x80, 0xe9, 0x07, 0xc6, 0x39, 0x3d, 0x64, 0xbf, 0x62, 0x2e, 0x27, 0x53, 0x39, 0x74, 0xa2,
|
||||
0x15, 0x69, 0x2c, 0x77, 0xe8, 0xe7, 0xb0, 0x49, 0xcd, 0x3c, 0x3d, 0x1f, 0x5d, 0x6c, 0x94, 0xdb,
|
||||
0x8b, 0x6f, 0x11, 0x3e, 0x43, 0x95, 0x1b, 0x06, 0xa3, 0xab, 0x09, 0xf6, 0x29, 0x14, 0x79, 0x61,
|
||||
0x8c, 0x76, 0xe7, 0x34, 0x3b, 0xfd, 0xf6, 0x35, 0x27, 0xcf, 0xf4, 0x43, 0x27, 0x53, 0x4b, 0x75,
|
||||
0x3a, 0x55, 0xab, 0x4f, 0xcc, 0xe6, 0x1c, 0x0b, 0xd9, 0xa1, 0xd8, 0xed, 0xc5, 0x03, 0x7e, 0x3d,
|
||||
0x87, 0x0e, 0x69, 0x5b, 0x36, 0x1b, 0xce, 0xa1, 0xff, 0x9b, 0xeb, 0x0a, 0xe6, 0xe6, 0x76, 0x17,
|
||||
0x30, 0xf4, 0x39, 0x14, 0x79, 0x89, 0x89, 0x96, 0x7e, 0x5f, 0xb9, 0x9d, 0xdd, 0x49, 0x7d, 0xc0,
|
||||
0x60, 0x71, 0xb8, 0x35, 0xf7, 0x9d, 0x07, 0xbd, 0xbf, 0x80, 0x50, 0xf6, 0x2b, 0xd0, 0x85, 0x14,
|
||||
0x9f, 0x80, 0xdc, 0x18, 0xba, 0x4b, 0x32, 0xc3, 0x1c, 0x93, 0xa9, 0x39, 0x7e, 0x0e, 0xd5, 0x00,
|
||||
0x66, 0x43, 0x56, 0x94, 0x2d, 0x7a, 0xe7, 0xa6, 0xaf, 0xcb, 0x8c, 0x7b, 0x00, 0xdb, 0xc7, 0x21,
|
||||
0x19, 0x04, 0x8e, 0x7b, 0xc5, 0x34, 0xf0, 0x04, 0x36, 0xd8, 0x24, 0x7a, 0x2e, 0xfc, 0x66, 0xd3,
|
||||
0xe9, 0x65, 0x88, 0xcf, 0xd8, 0x00, 0x7f, 0xe4, 0xf4, 0x62, 0x74, 0xeb, 0xfc, 0x1c, 0x45, 0x8c,
|
||||
0xa5, 0x97, 0x21, 0xd7, 0xa1, 0x2c, 0xec, 0x56, 0x47, 0xb7, 0x97, 0x99, 0xf3, 0xb8, 0x7e, 0x91,
|
||||
0xfa, 0xeb, 0xa5, 0xaf, 0x37, 0x86, 0x51, 0x7f, 0x74, 0x7a, 0x5a, 0x64, 0xff, 0x95, 0xf3, 0xf1,
|
||||
0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xef, 0x73, 0xf9, 0x2c, 0xa6, 0x23, 0x00, 0x00,
|
||||
// 2859 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x5a, 0xdd, 0x72, 0xdb, 0xc6,
|
||||
0xf5, 0x27, 0x08, 0x8a, 0x24, 0x0e, 0x48, 0x09, 0x5a, 0xcb, 0xb6, 0x6c, 0xc7, 0x7f, 0x3b, 0xf8,
|
||||
0xcf, 0xb4, 0x8e, 0x3b, 0xe3, 0x49, 0x94, 0xd4, 0x76, 0xeb, 0x24, 0x0d, 0x3f, 0x20, 0x09, 0x35,
|
||||
0x45, 0xca, 0x4b, 0xc8, 0xce, 0xc7, 0x74, 0x50, 0x88, 0x58, 0xd3, 0x68, 0x48, 0x80, 0x05, 0x40,
|
||||
0xcb, 0xbc, 0xed, 0x7d, 0x3b, 0xd3, 0xcb, 0xce, 0xf4, 0xa6, 0x7d, 0x84, 0xf6, 0x2d, 0xfa, 0x02,
|
||||
0xb9, 0xc8, 0x4c, 0x2f, 0x3b, 0x7d, 0x8c, 0xce, 0x7e, 0x80, 0x04, 0x28, 0x52, 0x22, 0xa3, 0xf6,
|
||||
0x4a, 0xcb, 0xb3, 0xbb, 0x67, 0xcf, 0xf7, 0xfe, 0xce, 0x42, 0x50, 0x1d, 0x92, 0x28, 0x72, 0xfa,
|
||||
0xe4, 0xd1, 0x28, 0x0c, 0xe2, 0x00, 0xa9, 0x43, 0x6f, 0xf0, 0x76, 0x1c, 0x3d, 0xea, 0x87, 0xa3,
|
||||
0x9e, 0xfe, 0x0a, 0x8a, 0xdd, 0xd8, 0x89, 0xc7, 0x11, 0xfa, 0x29, 0x00, 0x09, 0xc3, 0x20, 0xb4,
|
||||
0x7b, 0x81, 0x4b, 0x76, 0xa5, 0xfb, 0xd2, 0x83, 0xcd, 0xbd, 0x1b, 0x8f, 0x52, 0x6b, 0x1f, 0x19,
|
||||
0x74, 0xba, 0x11, 0xb8, 0x04, 0x2b, 0x24, 0x19, 0xa2, 0x1b, 0x50, 0x0c, 0x89, 0x13, 0x05, 0xfe,
|
||||
0x6e, 0xfe, 0xbe, 0xf4, 0x40, 0xc1, 0xe2, 0x97, 0xfe, 0x18, 0x2a, 0xcf, 0xc9, 0xe4, 0xa5, 0x33,
|
||||
0x18, 0x93, 0x63, 0xc7, 0x0b, 0x91, 0x06, 0xf2, 0xb7, 0x64, 0xc2, 0xf8, 0x2a, 0x98, 0x0e, 0xd1,
|
||||
0x0e, 0x6c, 0xbc, 0xa5, 0xd3, 0x62, 0x23, 0xff, 0xa1, 0xff, 0x0c, 0x36, 0x1b, 0xc1, 0x60, 0x40,
|
||||
0x7a, 0xb1, 0x17, 0xf8, 0x6d, 0x67, 0x48, 0xd0, 0x8f, 0x61, 0xab, 0x37, 0xa5, 0xd8, 0xbe, 0x33,
|
||||
0x24, 0x82, 0xcb, 0x66, 0x2f, 0xb3, 0x50, 0x1f, 0x00, 0xca, 0x6e, 0x6d, 0x79, 0x51, 0x8c, 0x7e,
|
||||
0x02, 0xc5, 0x88, 0x69, 0xc8, 0x76, 0xa9, 0x7b, 0xd7, 0x32, 0x3a, 0x71, 0xe5, 0xb1, 0x58, 0x82,
|
||||
0x3e, 0x00, 0x6d, 0xee, 0xac, 0x68, 0x37, 0x7f, 0x5f, 0x7e, 0xa0, 0xe0, 0xad, 0xec, 0x61, 0x91,
|
||||
0xde, 0x05, 0x65, 0xdf, 0x23, 0x03, 0x77, 0x2d, 0x19, 0xd1, 0x5d, 0x80, 0xd7, 0x74, 0x17, 0x5f,
|
||||
0xc3, 0x35, 0x57, 0x5e, 0x27, 0x7c, 0xf4, 0x7f, 0x48, 0x50, 0x3a, 0x72, 0x46, 0x23, 0xcf, 0xef,
|
||||
0xaf, 0x27, 0xf8, 0x02, 0x01, 0xf2, 0x0b, 0x05, 0xa0, 0x5c, 0x7b, 0x6f, 0xc8, 0xd0, 0xd9, 0x95,
|
||||
0x17, 0x71, 0x65, 0x53, 0x58, 0x2c, 0x41, 0x9f, 0x42, 0x85, 0xbc, 0x8b, 0x43, 0xc7, 0x1e, 0x39,
|
||||
0xa1, 0x33, 0x8c, 0x76, 0x0b, 0xf7, 0xe5, 0x07, 0xea, 0xde, 0xad, 0xcc, 0x96, 0xb4, 0x97, 0xb1,
|
||||
0xca, 0x96, 0x1f, 0xb3, 0xd5, 0x7a, 0x04, 0xaa, 0xd0, 0x65, 0x7d, 0x47, 0x3c, 0x81, 0xca, 0x90,
|
||||
0xef, 0xb5, 0x07, 0x5e, 0x14, 0x33, 0x27, 0xa8, 0x7b, 0x3b, 0x99, 0x2d, 0x82, 0x39, 0x56, 0x87,
|
||||
0xb3, 0x53, 0xf4, 0xe7, 0xb0, 0x79, 0xec, 0x84, 0xb1, 0x47, 0x15, 0x66, 0x72, 0xac, 0xee, 0x1b,
|
||||
0x0d, 0xe4, 0xd8, 0xe9, 0x0b, 0xbb, 0xd1, 0xa1, 0x3e, 0x80, 0xea, 0x94, 0xd9, 0xfa, 0x3a, 0x3c,
|
||||
0x82, 0x6b, 0xa3, 0x64, 0xb7, 0x1d, 0x3b, 0x7d, 0xdb, 0x09, 0x43, 0x67, 0x22, 0xe2, 0x69, 0x7b,
|
||||
0x3a, 0x65, 0x39, 0xfd, 0x1a, 0x9d, 0xd0, 0x5f, 0xc0, 0xd6, 0x4b, 0xd2, 0x8b, 0x83, 0x10, 0x07,
|
||||
0x67, 0x98, 0xf4, 0x82, 0xd0, 0x65, 0xe1, 0x32, 0x08, 0x9c, 0xd8, 0x76, 0x9d, 0xd8, 0xd9, 0x95,
|
||||
0xee, 0xcb, 0x0f, 0xf2, 0x58, 0x61, 0x94, 0xa6, 0x13, 0x3b, 0xe8, 0x1e, 0xa8, 0xa7, 0x9e, 0xef,
|
||||
0x84, 0x13, 0x3e, 0x4f, 0x25, 0xaf, 0x60, 0xe0, 0x24, 0xba, 0x40, 0xff, 0x35, 0x28, 0x86, 0x1f,
|
||||
0x7b, 0xf1, 0xc4, 0x74, 0xa3, 0xf5, 0x84, 0xff, 0x11, 0x6c, 0x11, 0xb6, 0xd3, 0xf6, 0xdc, 0x94,
|
||||
0xe0, 0x32, 0xae, 0x12, 0xc1, 0x90, 0x0b, 0xbd, 0x0f, 0x15, 0x21, 0x34, 0x97, 0xf8, 0x31, 0x94,
|
||||
0x42, 0x36, 0x8a, 0x98, 0xb8, 0xea, 0xde, 0x7b, 0x99, 0x53, 0xe6, 0x14, 0xc4, 0xc9, 0x62, 0xfd,
|
||||
0x1b, 0x50, 0xf9, 0x1c, 0x77, 0x1a, 0x82, 0xc2, 0x6f, 0x68, 0x51, 0xe1, 0x9e, 0x62, 0x63, 0xf4,
|
||||
0x14, 0x20, 0x0c, 0xce, 0x6c, 0xbe, 0x83, 0x29, 0x3b, 0x1f, 0x8b, 0x69, 0x49, 0xb0, 0x12, 0x26,
|
||||
0xa7, 0xe8, 0x7d, 0x91, 0xab, 0x47, 0x24, 0x76, 0xe6, 0x52, 0x50, 0x9a, 0x4b, 0x41, 0xf4, 0x01,
|
||||
0x14, 0xe2, 0xc9, 0x88, 0xa7, 0xcf, 0xe6, 0xde, 0xf5, 0x0c, 0x7f, 0x6a, 0x53, 0x6b, 0x32, 0x22,
|
||||
0x98, 0x2d, 0xa1, 0x01, 0xe3, 0x7a, 0x43, 0x96, 0x48, 0x32, 0xa6, 0x43, 0xbd, 0x06, 0x45, 0x9e,
|
||||
0x42, 0xe8, 0x09, 0xa8, 0xfc, 0x94, 0x21, 0x89, 0x9d, 0xc4, 0x16, 0xd9, 0x7a, 0x3a, 0x15, 0x09,
|
||||
0x73, 0x81, 0xe8, 0x30, 0xd2, 0xef, 0x42, 0x09, 0x07, 0x67, 0xcc, 0xbd, 0x08, 0x0a, 0xa7, 0x83,
|
||||
0xe0, 0x94, 0xc9, 0x58, 0xc1, 0x6c, 0xac, 0xff, 0x25, 0x0f, 0xaa, 0xe9, 0x47, 0x24, 0x8c, 0xd7,
|
||||
0x8c, 0xee, 0x59, 0xe2, 0xe7, 0x2f, 0x4f, 0xfc, 0x8f, 0x80, 0x5a, 0x2f, 0xe2, 0x61, 0x25, 0x2f,
|
||||
0xc8, 0x3d, 0x21, 0x22, 0x2e, 0xd3, 0x65, 0x4c, 0xd8, 0x05, 0x01, 0x53, 0x58, 0x10, 0x30, 0xe8,
|
||||
0xff, 0xa1, 0x9a, 0xc9, 0x8a, 0xdd, 0x0d, 0x26, 0x6e, 0x25, 0x9d, 0x0f, 0xe7, 0x0a, 0x4f, 0x71,
|
||||
0xad, 0xc2, 0xf3, 0x6f, 0x09, 0xd4, 0x2e, 0x71, 0xc2, 0xde, 0x9b, 0x35, 0x6d, 0xf4, 0x0c, 0x2a,
|
||||
0x6f, 0x59, 0x08, 0xf1, 0x73, 0x45, 0xd5, 0xd9, 0x5d, 0x10, 0x63, 0x8c, 0x31, 0x56, 0xdf, 0xa6,
|
||||
0x42, 0x96, 0x46, 0x43, 0x34, 0x60, 0xd1, 0xa0, 0x60, 0x3a, 0x3c, 0xaf, 0x6a, 0x81, 0xa5, 0xfe,
|
||||
0xc5, 0xaa, 0x6e, 0xac, 0xa5, 0xea, 0x19, 0xec, 0x70, 0x4d, 0x4d, 0xbf, 0x4b, 0xfa, 0x43, 0xe2,
|
||||
0x8b, 0xb0, 0xd0, 0xa1, 0xfa, 0xda, 0x1b, 0x90, 0x99, 0x2f, 0x24, 0x76, 0xb4, 0x4a, 0x89, 0x89,
|
||||
0x27, 0x9e, 0x41, 0x25, 0x62, 0x7b, 0xa7, 0xda, 0x4a, 0xe7, 0xb4, 0x4d, 0x99, 0x11, 0xab, 0xd1,
|
||||
0xec, 0x87, 0xfe, 0x27, 0x09, 0xca, 0xac, 0xb4, 0x78, 0x64, 0xcd, 0xca, 0xa2, 0x81, 0xec, 0xb9,
|
||||
0x91, 0xa8, 0x26, 0x74, 0x88, 0xee, 0x80, 0xf2, 0xd6, 0x19, 0x78, 0xae, 0x1d, 0x06, 0x67, 0x2c,
|
||||
0xda, 0xca, 0xb8, 0xcc, 0x08, 0x38, 0x38, 0xcb, 0x86, 0x62, 0x61, 0x95, 0x50, 0xd4, 0xff, 0x96,
|
||||
0x07, 0xf5, 0xc5, 0x98, 0x84, 0x13, 0x4c, 0xa2, 0xf1, 0x60, 0xcd, 0xaa, 0xfd, 0x11, 0x94, 0x89,
|
||||
0xd0, 0x4b, 0x58, 0x24, 0x5b, 0x03, 0x12, 0xa5, 0xf1, 0x74, 0x19, 0xba, 0x09, 0x25, 0x5a, 0x98,
|
||||
0xfc, 0x71, 0x52, 0x0b, 0x8a, 0x61, 0x70, 0xd6, 0x1e, 0x0f, 0x29, 0x38, 0x8a, 0x7a, 0x41, 0x48,
|
||||
0xf8, 0xcd, 0x99, 0xc7, 0xe2, 0x17, 0x7a, 0x0f, 0x14, 0xd7, 0x8b, 0x62, 0xc7, 0xef, 0x11, 0xee,
|
||||
0xf0, 0x3c, 0x9e, 0x11, 0xae, 0x16, 0xfc, 0xe8, 0x16, 0x94, 0x7f, 0x4b, 0x75, 0xb7, 0x3d, 0x77,
|
||||
0xb7, 0xc4, 0xa4, 0x29, 0xb1, 0xdf, 0xa6, 0x4b, 0xed, 0xdc, 0x1b, 0x78, 0xc4, 0x8f, 0xe9, 0x5c,
|
||||
0x99, 0xcd, 0x95, 0x39, 0xc1, 0x74, 0xf5, 0x5f, 0x81, 0xda, 0x8d, 0x43, 0x7a, 0x9f, 0x92, 0xd1,
|
||||
0x60, 0xb2, 0x9e, 0xcd, 0xde, 0x87, 0x4a, 0xc4, 0xf6, 0xda, 0x21, 0xdd, 0x2c, 0xae, 0x50, 0x35,
|
||||
0x9a, 0xf1, 0xd3, 0x5f, 0x81, 0x52, 0x0f, 0x82, 0xc1, 0x0f, 0x60, 0x7e, 0x17, 0xe0, 0x34, 0x08,
|
||||
0x06, 0x29, 0xd6, 0x65, 0xac, 0x9c, 0x26, 0xbc, 0xf4, 0x28, 0x8d, 0xfa, 0x70, 0x70, 0xd6, 0x08,
|
||||
0xc6, 0xfe, 0x9a, 0x2e, 0xff, 0x10, 0x76, 0x52, 0xf5, 0x81, 0xba, 0xb2, 0x47, 0x99, 0xb0, 0xb3,
|
||||
0x64, 0x8c, 0x7a, 0xe7, 0xd8, 0xeb, 0x77, 0xa0, 0xd4, 0x08, 0x86, 0x43, 0xc7, 0x77, 0x69, 0x38,
|
||||
0xf7, 0x86, 0x6e, 0x02, 0x6c, 0x7b, 0x43, 0x57, 0xff, 0xa7, 0x04, 0x60, 0xfa, 0x2e, 0x79, 0xc7,
|
||||
0x53, 0xf1, 0x7f, 0x83, 0xe3, 0xb2, 0xb7, 0x98, 0x3c, 0x7f, 0x8b, 0xdd, 0x05, 0xf0, 0xa8, 0x08,
|
||||
0x7c, 0xba, 0xc0, 0xa7, 0x19, 0x85, 0x4d, 0x5f, 0xad, 0xe8, 0x7c, 0x01, 0xb0, 0x3f, 0x18, 0x47,
|
||||
0xa2, 0xba, 0xee, 0xc1, 0xf5, 0x39, 0x91, 0x33, 0x25, 0xe7, 0x5a, 0x56, 0x70, 0x8e, 0x1a, 0x4e,
|
||||
0xa0, 0xd2, 0x08, 0x86, 0x23, 0xa7, 0xb7, 0xee, 0x2d, 0xf6, 0x1e, 0x28, 0xf1, 0x9b, 0x90, 0x44,
|
||||
0x6f, 0x82, 0x01, 0x87, 0x00, 0x12, 0x9e, 0x11, 0xf4, 0x13, 0xd8, 0x6a, 0x92, 0x01, 0x89, 0x49,
|
||||
0x7d, 0x62, 0x36, 0xd7, 0xe4, 0x7c, 0x0b, 0xca, 0x73, 0x48, 0xa7, 0xe4, 0x09, 0x8c, 0xf3, 0x75,
|
||||
0xba, 0x27, 0x31, 0xfd, 0xd7, 0xc1, 0x7a, 0x3e, 0xbd, 0x03, 0x0a, 0xc5, 0x2f, 0xb6, 0xe7, 0xbf,
|
||||
0x0e, 0x84, 0x37, 0xcb, 0x94, 0x40, 0x39, 0xe9, 0xdf, 0xc0, 0xf6, 0x01, 0x89, 0x05, 0x48, 0x6b,
|
||||
0x46, 0x6b, 0x0a, 0x7d, 0x17, 0x20, 0xe2, 0x65, 0x9f, 0xa6, 0x34, 0x8f, 0x57, 0x45, 0x50, 0x4c,
|
||||
0x57, 0x1f, 0xc3, 0x66, 0x02, 0xff, 0xf8, 0x25, 0xfc, 0xdf, 0x30, 0x07, 0x45, 0x9d, 0xb3, 0xd0,
|
||||
0x8b, 0x58, 0xc1, 0x56, 0x04, 0x84, 0xe1, 0xad, 0xd1, 0x87, 0xa0, 0xf1, 0x5b, 0x92, 0x21, 0x1c,
|
||||
0xae, 0x12, 0x2b, 0x79, 0x43, 0xe2, 0x47, 0x9e, 0x40, 0x75, 0x32, 0x9e, 0x11, 0xf4, 0x3f, 0x48,
|
||||
0x02, 0xa1, 0x51, 0x74, 0x85, 0x3e, 0x01, 0x85, 0x56, 0x7b, 0x9b, 0xe1, 0x30, 0xe9, 0x02, 0x1c,
|
||||
0x76, 0x98, 0xc3, 0x65, 0x57, 0x8c, 0x51, 0xfd, 0xdc, 0xe5, 0x4d, 0x3d, 0x73, 0x77, 0xc1, 0xe5,
|
||||
0x3d, 0x13, 0xeb, 0x30, 0x97, 0xb9, 0xc3, 0xeb, 0x25, 0xd1, 0x93, 0xea, 0xdf, 0x49, 0x00, 0x29,
|
||||
0xe9, 0x37, 0x21, 0xef, 0xf1, 0x1c, 0x2f, 0xe0, 0xbc, 0xe7, 0x52, 0x64, 0x96, 0xca, 0x4d, 0x36,
|
||||
0x9e, 0x02, 0x47, 0xf9, 0x72, 0xe0, 0xf8, 0x29, 0x54, 0x78, 0x76, 0xae, 0xdc, 0x57, 0x79, 0xd3,
|
||||
0x7a, 0x12, 0x5d, 0x31, 0x79, 0x0f, 0x60, 0x3b, 0x65, 0x05, 0x81, 0xda, 0xf7, 0x92, 0x5e, 0x7c,
|
||||
0x15, 0xcc, 0x2e, 0x4c, 0xf4, 0xbd, 0x04, 0x8a, 0x45, 0xc2, 0x21, 0xbb, 0x69, 0x2f, 0x43, 0xd5,
|
||||
0x77, 0x40, 0xf1, 0xfc, 0xd8, 0x4e, 0x1a, 0x7e, 0x1a, 0x4f, 0x65, 0xcf, 0x8f, 0x99, 0x8c, 0xf4,
|
||||
0xfa, 0x70, 0x83, 0xf1, 0xe9, 0x80, 0x88, 0x79, 0x1a, 0x51, 0x12, 0x56, 0x39, 0x8d, 0x2f, 0xe1,
|
||||
0x10, 0x61, 0x4c, 0xd8, 0x25, 0x5b, 0xe0, 0x57, 0x17, 0x23, 0xd0, 0x6b, 0x76, 0x07, 0x36, 0x4e,
|
||||
0x83, 0x20, 0x8a, 0x19, 0x94, 0xcc, 0x63, 0xfe, 0xe3, 0x8a, 0x18, 0xd2, 0x01, 0x95, 0x55, 0xa8,
|
||||
0x90, 0x18, 0xef, 0x46, 0x21, 0x7a, 0x0a, 0xe5, 0x60, 0x44, 0x42, 0x27, 0x0e, 0x42, 0x11, 0x91,
|
||||
0x59, 0x1b, 0x89, 0xb5, 0x1d, 0xb1, 0x06, 0x4f, 0x57, 0xa3, 0x5d, 0x28, 0xb1, 0xb1, 0xef, 0x8a,
|
||||
0x68, 0x49, 0x7e, 0xea, 0x7f, 0x97, 0x00, 0xb0, 0xe3, 0xf7, 0xc9, 0x4a, 0x16, 0xdc, 0x4b, 0xf3,
|
||||
0x39, 0x0f, 0x4b, 0x53, 0xc2, 0x4e, 0x4f, 0x98, 0x19, 0x46, 0xbe, 0xc8, 0x30, 0xeb, 0x75, 0xf5,
|
||||
0xdf, 0x49, 0x49, 0xa7, 0xb6, 0x92, 0xd8, 0xf7, 0x40, 0xe5, 0x70, 0x84, 0x0b, 0x92, 0x67, 0x82,
|
||||
0x00, 0x23, 0xd5, 0x99, 0x34, 0xa9, 0x86, 0x51, 0x5e, 0xa3, 0x61, 0xa4, 0x29, 0x18, 0x07, 0xa3,
|
||||
0x6f, 0x45, 0x30, 0xb0, 0xf1, 0x15, 0x33, 0xe3, 0x1d, 0x54, 0x28, 0x44, 0x21, 0x8e, 0xcf, 0x35,
|
||||
0x7b, 0x00, 0x1b, 0x41, 0xaf, 0x37, 0x4e, 0x1c, 0x8e, 0x32, 0x6c, 0x3a, 0x74, 0x06, 0xf3, 0x05,
|
||||
0xe8, 0x73, 0xa8, 0xf6, 0x89, 0x4f, 0x42, 0x67, 0x60, 0x33, 0xcd, 0x84, 0x87, 0xb2, 0x07, 0x1f,
|
||||
0xf0, 0x15, 0x1c, 0x98, 0x56, 0xfa, 0xa9, 0x5f, 0xfa, 0xef, 0xf3, 0x50, 0x49, 0x4f, 0xa3, 0x2f,
|
||||
0xa0, 0x7a, 0xca, 0x45, 0x11, 0x0c, 0xa5, 0x05, 0xdd, 0x6e, 0x5a, 0xd8, 0xc3, 0x1c, 0xae, 0x9c,
|
||||
0xa6, 0x85, 0x7f, 0x02, 0x10, 0x93, 0x70, 0x38, 0x95, 0x47, 0x3a, 0xd7, 0x7e, 0x4e, 0x73, 0xf7,
|
||||
0x30, 0x87, 0x95, 0x78, 0x9a, 0xc8, 0x3f, 0x07, 0x35, 0xa4, 0x41, 0x29, 0x76, 0xf2, 0x57, 0xa2,
|
||||
0x9b, 0x59, 0xc4, 0x3d, 0x0d, 0xda, 0xc3, 0x1c, 0x86, 0x70, 0x16, 0xc2, 0x9f, 0x4d, 0x4b, 0x30,
|
||||
0xdf, 0x5c, 0x58, 0xd0, 0x51, 0xa4, 0x62, 0x67, 0x56, 0x7d, 0xd9, 0x4f, 0x5a, 0x7d, 0xd9, 0x3e,
|
||||
0xfd, 0x5f, 0x12, 0x54, 0x53, 0x9d, 0xc7, 0x71, 0x7d, 0xf5, 0x7b, 0x6b, 0xcd, 0x47, 0x97, 0xf3,
|
||||
0xae, 0x93, 0x17, 0x58, 0x7a, 0xb9, 0xeb, 0xae, 0x98, 0x4c, 0xbf, 0x93, 0x61, 0x9b, 0x77, 0xf3,
|
||||
0x9d, 0x90, 0x23, 0x97, 0xa3, 0xa8, 0xbf, 0xba, 0xb2, 0x99, 0xde, 0x88, 0xfb, 0xf8, 0xb2, 0x36,
|
||||
0x5d, 0x03, 0x79, 0xec, 0xb9, 0xc9, 0x9b, 0xc5, 0xd8, 0x73, 0x17, 0x75, 0xa9, 0xe7, 0x1b, 0x72,
|
||||
0x8a, 0xbb, 0xbc, 0x21, 0x89, 0x62, 0x67, 0x38, 0x62, 0x65, 0xb6, 0x80, 0x67, 0x84, 0x39, 0x18,
|
||||
0x52, 0x9c, 0x83, 0x21, 0x74, 0xba, 0xf7, 0xc6, 0xf1, 0x7d, 0x32, 0x98, 0x35, 0x25, 0x8a, 0xa0,
|
||||
0x98, 0x54, 0x80, 0x7c, 0x30, 0x62, 0xfd, 0xc8, 0xe6, 0x1c, 0x90, 0xea, 0x8c, 0xd8, 0xa5, 0x99,
|
||||
0x0f, 0x46, 0xd9, 0xde, 0x45, 0xc9, 0xf6, 0x2e, 0xe7, 0x9c, 0x00, 0x6b, 0x39, 0xe1, 0xcf, 0x79,
|
||||
0x50, 0x78, 0xb4, 0xad, 0x65, 0xfc, 0x54, 0xe1, 0xe2, 0xa6, 0x5f, 0xb1, 0x70, 0x9d, 0xb3, 0xb7,
|
||||
0xbc, 0xc0, 0xde, 0xc2, 0x4d, 0x85, 0x99, 0x9b, 0x2e, 0xf6, 0x40, 0xc6, 0x3c, 0xc5, 0x4b, 0xcc,
|
||||
0x53, 0x5a, 0xb3, 0x2c, 0xaa, 0x96, 0x37, 0x24, 0xdd, 0x89, 0xdf, 0xa3, 0xf6, 0xb9, 0x09, 0xa5,
|
||||
0x11, 0x21, 0xa1, 0x6d, 0xba, 0x02, 0xc6, 0x15, 0xe9, 0x4f, 0x93, 0x09, 0x68, 0x4d, 0x05, 0xcc,
|
||||
0xcf, 0x0b, 0xb8, 0x07, 0x4a, 0x34, 0xf1, 0x7b, 0xf6, 0x52, 0x88, 0x44, 0xf9, 0x33, 0x6f, 0x97,
|
||||
0x23, 0x31, 0xd2, 0xbf, 0x01, 0x78, 0x4e, 0x26, 0x7b, 0x5d, 0xd2, 0xa7, 0x07, 0x0b, 0x93, 0x48,
|
||||
0x4b, 0x4c, 0x92, 0xbf, 0x38, 0x28, 0x65, 0x86, 0x39, 0x66, 0x41, 0xf9, 0xf0, 0xaf, 0x05, 0x50,
|
||||
0xa6, 0x5f, 0x34, 0x90, 0x0a, 0xa5, 0xee, 0x49, 0xa3, 0x61, 0x74, 0xbb, 0x5a, 0x0e, 0xed, 0x80,
|
||||
0x76, 0xd2, 0x36, 0xbe, 0x3c, 0x36, 0x1a, 0x96, 0xd1, 0xb4, 0x0d, 0x8c, 0x3b, 0x58, 0x93, 0x10,
|
||||
0x82, 0xcd, 0x46, 0xa7, 0xdd, 0x36, 0x1a, 0x96, 0xbd, 0x5f, 0x33, 0x5b, 0x46, 0x53, 0xcb, 0xa3,
|
||||
0xeb, 0xb0, 0x7d, 0x6c, 0xe0, 0x23, 0xb3, 0xdb, 0x35, 0x3b, 0x6d, 0xbb, 0x69, 0xb4, 0x4d, 0xa3,
|
||||
0xa9, 0xc9, 0xe8, 0x16, 0x5c, 0x6f, 0x74, 0x5a, 0x2d, 0xa3, 0x61, 0x51, 0x72, 0xbb, 0x63, 0xd9,
|
||||
0xc6, 0x97, 0x66, 0xd7, 0xea, 0x6a, 0x05, 0xca, 0xdb, 0x6c, 0xb5, 0x8c, 0x83, 0x5a, 0xcb, 0xae,
|
||||
0xe1, 0x83, 0x93, 0x23, 0xa3, 0x6d, 0x69, 0x1b, 0x94, 0x4f, 0x42, 0x6d, 0x9a, 0x47, 0x46, 0x9b,
|
||||
0xb2, 0xd3, 0x4a, 0xe8, 0x06, 0xa0, 0x84, 0x6c, 0xb6, 0x9b, 0xc6, 0x97, 0xb6, 0xf5, 0xd5, 0xb1,
|
||||
0xa1, 0x95, 0xd1, 0x1d, 0xb8, 0x99, 0xd0, 0xd3, 0xe7, 0xd4, 0x8e, 0x0c, 0x4d, 0x41, 0x1a, 0x54,
|
||||
0x92, 0x49, 0xab, 0x73, 0xfc, 0x5c, 0x83, 0x34, 0x77, 0xdc, 0x79, 0x85, 0x8d, 0x46, 0x07, 0x37,
|
||||
0x35, 0x35, 0x4d, 0x7e, 0x69, 0x34, 0xac, 0x0e, 0xb6, 0xcd, 0xa6, 0x56, 0xa1, 0xc2, 0x27, 0xe4,
|
||||
0xae, 0x51, 0xc3, 0x8d, 0x43, 0x1b, 0x1b, 0xdd, 0x93, 0x96, 0xa5, 0x55, 0xa9, 0x09, 0xf6, 0xcd,
|
||||
0x96, 0xc1, 0x34, 0xda, 0xef, 0x9c, 0xb4, 0x9b, 0xda, 0x26, 0xda, 0x02, 0xf5, 0xc8, 0xb0, 0x6a,
|
||||
0x89, 0x4d, 0xb6, 0xe8, 0xf9, 0x8d, 0x5a, 0xe3, 0xd0, 0x48, 0x28, 0x1a, 0xda, 0x85, 0x9d, 0x46,
|
||||
0xad, 0x4d, 0x37, 0x35, 0xb0, 0x51, 0xb3, 0x0c, 0x7b, 0xbf, 0xd3, 0x6a, 0x1a, 0x58, 0xdb, 0xa6,
|
||||
0x0a, 0xce, 0xcd, 0x98, 0x2d, 0x43, 0x43, 0xa9, 0x1d, 0x4d, 0xa3, 0x65, 0xcc, 0x76, 0x5c, 0x4b,
|
||||
0xed, 0x48, 0x66, 0xe8, 0x8e, 0x1d, 0xaa, 0x4c, 0xfd, 0xc4, 0x6c, 0x35, 0x85, 0xa1, 0xb8, 0xd3,
|
||||
0xae, 0xa3, 0x6d, 0xa8, 0x26, 0xca, 0xb4, 0x5b, 0x66, 0xd7, 0xd2, 0x6e, 0xa0, 0x9b, 0x70, 0x2d,
|
||||
0x21, 0x1d, 0x19, 0x16, 0x36, 0x1b, 0xdc, 0xaa, 0x37, 0xe9, 0xda, 0xce, 0x89, 0x65, 0x77, 0xf6,
|
||||
0xed, 0x23, 0xe3, 0xa8, 0x83, 0xbf, 0xd2, 0x76, 0x1f, 0xfe, 0x51, 0x82, 0x72, 0x82, 0xdd, 0x51,
|
||||
0x19, 0x0a, 0xed, 0x4e, 0xdb, 0xd0, 0x72, 0x74, 0x54, 0xef, 0x74, 0x5a, 0x9a, 0x44, 0x47, 0x66,
|
||||
0xdb, 0x7a, 0xaa, 0xe5, 0x91, 0x02, 0x1b, 0x66, 0xdb, 0xfa, 0xe8, 0xb1, 0x26, 0x8b, 0xe1, 0xc7,
|
||||
0x7b, 0x5a, 0x41, 0x0c, 0x1f, 0x7f, 0xa2, 0x6d, 0xd0, 0xe1, 0x7e, 0xab, 0x53, 0xb3, 0x34, 0x40,
|
||||
0x00, 0xc5, 0x66, 0xe7, 0xa4, 0xde, 0x32, 0x34, 0x95, 0x8e, 0xbb, 0x16, 0x36, 0xdb, 0x07, 0xda,
|
||||
0x0e, 0x95, 0x40, 0x78, 0xa2, 0x6e, 0xb6, 0x6b, 0xf8, 0x2b, 0xcd, 0xa5, 0xd6, 0x14, 0x24, 0xbe,
|
||||
0x99, 0x3c, 0x6c, 0xc0, 0xd6, 0x1c, 0xda, 0x44, 0x45, 0xc8, 0xb7, 0x2c, 0x2d, 0x87, 0x4a, 0x20,
|
||||
0xb7, 0x2c, 0x43, 0x93, 0x28, 0xc1, 0x78, 0xa1, 0xe5, 0xe9, 0xdf, 0x03, 0x4b, 0x93, 0xe9, 0xc4,
|
||||
0x81, 0x65, 0x68, 0x05, 0x4a, 0x68, 0x1b, 0xda, 0xc6, 0xc3, 0xa7, 0xb0, 0xc1, 0x10, 0x0c, 0x0d,
|
||||
0x7c, 0xb3, 0xfd, 0xb2, 0xd6, 0x32, 0x9b, 0x5c, 0xaf, 0xa3, 0x93, 0xae, 0xa5, 0x49, 0x4c, 0xaa,
|
||||
0xc3, 0xce, 0x49, 0x8b, 0x06, 0x79, 0x05, 0xca, 0x94, 0x4a, 0xbd, 0xae, 0xc9, 0x0f, 0xef, 0x43,
|
||||
0x91, 0x97, 0x65, 0xba, 0xc6, 0x6c, 0x77, 0x0d, 0x4c, 0x4f, 0xa6, 0x1a, 0x31, 0x7f, 0x68, 0xd2,
|
||||
0xc3, 0x7b, 0x50, 0x4e, 0x92, 0x99, 0x72, 0xc4, 0x46, 0x8d, 0xf2, 0x56, 0x60, 0xe3, 0x15, 0x36,
|
||||
0xe9, 0x82, 0xbd, 0xef, 0xab, 0x50, 0x3d, 0x62, 0xa9, 0xdf, 0x25, 0xe1, 0x5b, 0xaf, 0x47, 0xd0,
|
||||
0x2f, 0x40, 0x6b, 0x84, 0xc4, 0x89, 0xc9, 0xac, 0xcf, 0x46, 0x0b, 0x3f, 0xf6, 0xdc, 0x5e, 0xd4,
|
||||
0x69, 0xeb, 0x39, 0xb4, 0x0f, 0xd5, 0x43, 0x27, 0x4a, 0xed, 0xbe, 0x33, 0x87, 0x8e, 0xd3, 0xa5,
|
||||
0xfb, 0xf6, 0x8d, 0x73, 0x38, 0x8a, 0xbf, 0x25, 0xe5, 0x90, 0x09, 0xa8, 0x49, 0xa2, 0x5e, 0xe8,
|
||||
0x9d, 0x92, 0x55, 0x99, 0x2d, 0x94, 0x53, 0xcf, 0xa1, 0x17, 0xd4, 0x4f, 0x63, 0x3f, 0x5e, 0x95,
|
||||
0xcf, 0xbd, 0x25, 0x93, 0xd3, 0x47, 0xa7, 0x1c, 0xfa, 0x25, 0x6c, 0x75, 0xdf, 0xd0, 0x9f, 0xc9,
|
||||
0x5c, 0x34, 0x67, 0x25, 0xf1, 0x28, 0xb5, 0x94, 0x57, 0xf2, 0x55, 0x54, 0xcf, 0xa1, 0x63, 0x40,
|
||||
0x59, 0x5e, 0xec, 0x61, 0xe3, 0x42, 0x09, 0x97, 0x4d, 0xb2, 0x87, 0x8c, 0x1c, 0x6a, 0xc2, 0x66,
|
||||
0x33, 0x0c, 0x46, 0xab, 0xea, 0xbb, 0xc4, 0x93, 0x9f, 0x81, 0xca, 0x43, 0x81, 0x3d, 0xa1, 0xa1,
|
||||
0x2c, 0xf2, 0x9c, 0x3d, 0xab, 0x2d, 0xdb, 0xde, 0x80, 0x6a, 0xe2, 0xc0, 0x4b, 0x18, 0x2c, 0x9b,
|
||||
0xd0, 0x73, 0xe8, 0x19, 0x28, 0x54, 0x93, 0x1f, 0x26, 0x81, 0x01, 0x5b, 0x5c, 0x81, 0xe9, 0xa7,
|
||||
0xc3, 0x39, 0x3b, 0x64, 0xbf, 0x4f, 0x2e, 0x67, 0x53, 0x39, 0x74, 0xa2, 0x15, 0x79, 0x2c, 0x0f,
|
||||
0xe8, 0xe7, 0xb0, 0x49, 0xdd, 0x3c, 0x5d, 0x1f, 0x5d, 0xec, 0x94, 0xdb, 0x8b, 0x4f, 0x11, 0x31,
|
||||
0x43, 0x8d, 0x1b, 0x06, 0xa3, 0xab, 0x29, 0xf6, 0x29, 0x14, 0x39, 0xe4, 0x45, 0xbb, 0x73, 0x96,
|
||||
0x9d, 0x7e, 0xd5, 0x9a, 0xd3, 0x67, 0xfa, 0x09, 0x93, 0x99, 0xa5, 0x3a, 0x7d, 0x2f, 0xab, 0x4f,
|
||||
0xcc, 0xe6, 0x9c, 0x08, 0xd9, 0xe7, 0xae, 0xdb, 0x8b, 0x9f, 0xee, 0xf5, 0x1c, 0x3a, 0xa4, 0x0d,
|
||||
0xd7, 0xec, 0xd9, 0x0d, 0xfd, 0xdf, 0x1c, 0xde, 0x9f, 0x7b, 0x91, 0xbb, 0x40, 0xa0, 0xcf, 0xa1,
|
||||
0xc8, 0xc1, 0x23, 0x5a, 0xfa, 0xe5, 0xe4, 0x76, 0x76, 0x26, 0xf5, 0x69, 0x82, 0xe5, 0xe1, 0xd6,
|
||||
0xdc, 0x17, 0x1c, 0xf4, 0xfe, 0x02, 0x46, 0xd9, 0xef, 0x3b, 0x17, 0x72, 0x7c, 0x02, 0x72, 0x63,
|
||||
0xe8, 0x2e, 0xa9, 0x0c, 0x73, 0x42, 0xa6, 0x5e, 0xe8, 0x73, 0xa8, 0x06, 0x30, 0x7b, 0x3e, 0x45,
|
||||
0x59, 0x38, 0x3b, 0xf7, 0xae, 0xba, 0xcc, 0xb9, 0x07, 0xb0, 0x7d, 0x1c, 0x92, 0x41, 0xe0, 0xb8,
|
||||
0x57, 0x2c, 0x03, 0x4f, 0x60, 0x83, 0xbd, 0x31, 0xcf, 0xa5, 0xdf, 0xec, 0xdd, 0x79, 0xd9, 0xc6,
|
||||
0x67, 0xec, 0x69, 0x7e, 0xe4, 0xf4, 0x62, 0x74, 0xeb, 0xfc, 0x0b, 0x89, 0x78, 0x70, 0x5e, 0xb6,
|
||||
0xb9, 0x0e, 0x65, 0xe1, 0xb7, 0x3a, 0xba, 0xbd, 0xcc, 0x9d, 0xc7, 0xf5, 0x8b, 0xcc, 0x5f, 0x2f,
|
||||
0x7d, 0xbd, 0x31, 0x8c, 0xfa, 0xa3, 0xd3, 0xd3, 0x22, 0xfb, 0x7f, 0x9b, 0x8f, 0xff, 0x13, 0x00,
|
||||
0x00, 0xff, 0xff, 0xaf, 0xd6, 0x20, 0xc1, 0x80, 0x23, 0x00, 0x00,
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package milvus.grpc;
|
||||
|
||||
message HelloRequest{
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message HelloReply{
|
||||
string msg = 1;
|
||||
}
|
||||
|
||||
service HelloService{
|
||||
rpc SayHello (HelloRequest) returns (HelloReply){}
|
||||
}
|
|
@ -1,36 +1,26 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package masterpb;
|
||||
package master;
|
||||
|
||||
option go_package="master";
|
||||
// The greeting service definition.
|
||||
service Greeter {
|
||||
// receive a grpc_server address and set to etcd.
|
||||
rpc ReportAddress (Request) returns (Reply) {}
|
||||
|
||||
import "message.proto";
|
||||
|
||||
message Collection {
|
||||
uint64 id=1;
|
||||
string name=2;
|
||||
milvus.grpc.Schema schema=3;
|
||||
uint64 create_time=4;
|
||||
repeated uint64 segment_ids=5;
|
||||
repeated string partition_tags=6;
|
||||
// send a grpc_server address to client
|
||||
rpc GetAddress (EmptyRequest) returns (Request) {}
|
||||
}
|
||||
|
||||
message Segment {
|
||||
uint64 segment_id=1;
|
||||
uint64 collection_id =2;
|
||||
string partition_tag=3;
|
||||
int32 channel_start=4;
|
||||
int32 channel_end=5;
|
||||
uint64 open_timestamp=6;
|
||||
uint64 close_timestamp=7;
|
||||
// The request message containing the user's name.
|
||||
message Request {
|
||||
string address = 1;
|
||||
}
|
||||
|
||||
message SegmentStat {
|
||||
uint64 segment_id=1;
|
||||
uint64 memory_size=2;
|
||||
float memory_rate=3;
|
||||
message EmptyRequest {
|
||||
|
||||
}
|
||||
|
||||
service Master {
|
||||
rpc CreateCollection(milvus.grpc.Mapping) returns (milvus.grpc.Status){}
|
||||
// The response message containing the greetings
|
||||
message Reply {
|
||||
bool status = 1;
|
||||
}
|
|
@ -691,13 +691,11 @@ message InsertOrDeleteMsg {
|
|||
message SearchMsg {
|
||||
string collection_name = 1;
|
||||
VectorRowRecord records = 2;
|
||||
repeated string partition_tag = 3;
|
||||
string partition_tag = 3;
|
||||
int64 uid = 4;
|
||||
uint64 timestamp =5;
|
||||
int64 client_id = 6;
|
||||
repeated KeyValuePair extra_params = 7;
|
||||
repeated string json = 8;
|
||||
string dsl = 9;
|
||||
}
|
||||
|
||||
enum SyncType {
|
||||
|
|
|
@ -63,7 +63,7 @@ include( FetchContent )
|
|||
set( FETCHCONTENT_BASE_DIR ${MILVUS_BINARY_DIR}/3rdparty_download )
|
||||
set(FETCHCONTENT_QUIET OFF)
|
||||
include( ThirdPartyPackages )
|
||||
find_package(OpenMP REQUIRED)
|
||||
|
||||
# **************************** Compiler arguments ****************************
|
||||
message( STATUS "Building Milvus CPU version" )
|
||||
|
||||
|
|
|
@ -0,0 +1,187 @@
|
|||
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
# or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
version: 0.5
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Cluster Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# enable | If runinng with Mishards, set true, otherwise false. | Boolean | false |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# role | Milvus deployment role: rw / ro | role | rw |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
cluster:
|
||||
enable: false
|
||||
role: rw
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# General Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# time_zone | Use UTC-x or UTC+x to specify a time zone. | Timezone | UTC+8 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# meta_uri | URI for metadata storage, using SQLite (for single server | URL | sqlite://:@:/ |
|
||||
# | Milvus) or MySQL (for distributed cluster Milvus). | | |
|
||||
# | Format: dialect://username:password@host:port/database | | |
|
||||
# | Keep 'dialect://:@:/', 'dialect' can be either 'sqlite' or | | |
|
||||
# | 'mysql', replace other texts with real values. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
general:
|
||||
timezone: UTC+8
|
||||
meta_uri: sqlite://:@:/
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Network Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# bind.address | IP address that Milvus server monitors. | IP | 0.0.0.0 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# bind.port | Port that Milvus server monitors. Port range (1024, 65535) | Integer | 19530 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# http.enable | Enable web server or not. | Boolean | true |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# http.port | Port that Milvus web server monitors. | Integer | 19121 |
|
||||
# | Port range (1024, 65535) | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
network:
|
||||
bind.address: 0.0.0.0
|
||||
bind.port: 19530
|
||||
http.enable: true
|
||||
http.port: 19121
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Storage Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# path | Path used to save meta data, vector data and index data. | Path | /var/lib/milvus |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# auto_flush_interval | The interval, in seconds, at which Milvus automatically | Integer | 1 (s) |
|
||||
# | flushes data to disk. | | |
|
||||
# | 0 means disable the regular flush. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
storage:
|
||||
path: /var/lib/milvus
|
||||
auto_flush_interval: 1
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# WAL Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# enable | Whether to enable write-ahead logging (WAL) in Milvus. | Boolean | true |
|
||||
# | If WAL is enabled, Milvus writes all data changes to log | | |
|
||||
# | files in advance before implementing data changes. WAL | | |
|
||||
# | ensures the atomicity and durability for Milvus operations.| | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# recovery_error_ignore| Whether to ignore logs with errors that happens during WAL | Boolean | false |
|
||||
# | recovery. If true, when Milvus restarts for recovery and | | |
|
||||
# | there are errors in WAL log files, log files with errors | | |
|
||||
# | are ignored. If false, Milvus does not restart when there | | |
|
||||
# | are errors in WAL log files. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# buffer_size | Sum total of the read buffer and the write buffer in MBs. | Integer | 256 (MB) |
|
||||
# | buffer_size must be in range [64, 4096] (MB). | | |
|
||||
# | If the value you specified is out of range, Milvus | | |
|
||||
# | automatically uses the boundary value closest to the | | |
|
||||
# | specified value. It is recommended you set buffer_size to | | |
|
||||
# | a value greater than the inserted data size of a single | | |
|
||||
# | insert operation for better performance. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# path | Location of WAL log files. | String | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
wal:
|
||||
enable: true
|
||||
recovery_error_ignore: false
|
||||
buffer_size: 256MB
|
||||
path: /var/lib/milvus/wal
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Cache Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# cache_size | The size of CPU memory used for caching data for faster | Integer | 4 (GB) |
|
||||
# | query. The sum of 'cpu_cache_capacity' and | | |
|
||||
# | 'insert_buffer_size' must be less than system memory size. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# insert_buffer_size | Buffer size used for data insertion. | Integer | 1 (GB) |
|
||||
# | The sum of 'insert_buffer_size' and 'cpu_cache_capacity' | | |
|
||||
# | must be less than system memory size. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# preload_collection | A comma-separated list of collection names that need to | StringList | |
|
||||
# | be pre-loaded when Milvus server starts up. | | |
|
||||
# | '*' means preload all existing tables (single-quote or | | |
|
||||
# | double-quote required). | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
cache:
|
||||
cache_size: 4GB
|
||||
insert_buffer_size: 1GB
|
||||
preload_collection:
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# GPU Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# enable | Enable GPU resources or not. | Boolean | false |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# cache_size | The size of GPU memory per card used for cache. | Integer | 1 (GB) |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# gpu_search_threshold | A Milvus performance tuning parameter. This value will be | Integer | 1000 |
|
||||
# | compared with 'nq' to decide if the search computation will| | |
|
||||
# | be executed on GPUs only. | | |
|
||||
# | If nq >= gpu_search_threshold, the search computation will | | |
|
||||
# | be executed on GPUs only; | | |
|
||||
# | if nq < gpu_search_threshold, the search computation will | | |
|
||||
# | be executed on both CPUs and GPUs. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# search_resources | The list of GPU devices used for search computation. | DeviceList | gpu0 |
|
||||
# | Must be in format gpux. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# build_index_resources| The list of GPU devices used for index building. | DeviceList | gpu0 |
|
||||
# | Must be in format gpux. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
gpu:
|
||||
enable: false
|
||||
cache_size: 1GB
|
||||
gpu_search_threshold: 1000
|
||||
search_devices:
|
||||
- gpu0
|
||||
build_index_devices:
|
||||
- gpu0
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Logs Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# level | Log level in Milvus. Must be one of debug, info, warning, | String | debug |
|
||||
# | error, fatal | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# trace.enable | Whether to enable trace level logging in Milvus. | Boolean | true |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# path | Absolute path to the folder holding the log files. | String | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# max_log_file_size | The maximum size of each log file, size range [512, 4096] | Integer | 1024 (MB) |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# log_rotate_num | The maximum number of log files that Milvus keeps for each | Integer | 0 |
|
||||
# | logging level, num range [0, 1024], 0 means unlimited. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
logs:
|
||||
level: debug
|
||||
trace.enable: true
|
||||
path: /var/lib/milvus/logs
|
||||
max_log_file_size: 1024MB
|
||||
log_rotate_num: 0
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Metric Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# enable | Enable monitoring function or not. | Boolean | false |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# address | Pushgateway address | IP | 127.0.0.1 +
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# port | Pushgateway port, port range (1024, 65535) | Integer | 9091 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
metric:
|
||||
enable: false
|
||||
address: 127.0.0.1
|
||||
port: 9091
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
* GLOBAL:
|
||||
FORMAT = "%datetime | %level | %logger | %msg"
|
||||
FILENAME = "/usr/local/logs/milvus-%datetime{%y-%M-%d-%H:%m}-global.log"
|
||||
ENABLED = true
|
||||
TO_FILE = true
|
||||
TO_STANDARD_OUTPUT = false
|
||||
SUBSECOND_PRECISION = 3
|
||||
PERFORMANCE_TRACKING = false
|
||||
MAX_LOG_FILE_SIZE = 209715200 ## Throw log files away after 200MB
|
||||
* DEBUG:
|
||||
FILENAME = "/usr/local/logs/milvus-%datetime{%y-%M-%d-%H:%m}-debug.log"
|
||||
ENABLED = true
|
||||
* WARNING:
|
||||
FILENAME = "/usr/local/logs/milvus-%datetime{%y-%M-%d-%H:%m}-warning.log"
|
||||
* TRACE:
|
||||
FILENAME = "/usr/local/logs/milvus-%datetime{%y-%M-%d-%H:%m}-trace.log"
|
||||
* VERBOSE:
|
||||
FORMAT = "%datetime{%d/%M/%y} | %level-%vlevel | %msg"
|
||||
TO_FILE = false
|
||||
TO_STANDARD_OUTPUT = false
|
||||
## Error logs
|
||||
* ERROR:
|
||||
ENABLED = true
|
||||
FILENAME = "/usr/local/logs/milvus-%datetime{%y-%M-%d-%H:%m}-error.log"
|
||||
* FATAL:
|
||||
ENABLED = true
|
||||
FILENAME = "/usr/local/logs/milvus-%datetime{%y-%M-%d-%H:%m}-fatal.log"
|
|
@ -0,0 +1,188 @@
|
|||
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
# or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
version: 0.5
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Cluster Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# enable | If running with Mishards, set true, otherwise false. | Boolean | false |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# role | Milvus deployment role: rw / ro | Role | rw |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
cluster:
|
||||
enable: false
|
||||
role: rw
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# General Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# timezone | Use UTC-x or UTC+x to specify a time zone. | Timezone | UTC+8 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# meta_uri | URI for metadata storage, using SQLite (for single server | URI | sqlite://:@:/ |
|
||||
# | Milvus) or MySQL (for distributed cluster Milvus). | | |
|
||||
# | Format: dialect://username:password@host:port/database | | |
|
||||
# | Keep 'dialect://:@:/', 'dialect' can be either 'sqlite' or | | |
|
||||
# | 'mysql', replace other texts with real values. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
general:
|
||||
timezone: UTC+8
|
||||
meta_uri: sqlite://:@:/
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Network Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# bind.address | IP address that Milvus server monitors. | IP | 0.0.0.0 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# bind.port | Port that Milvus server monitors. Port range (1024, 65535) | Integer | 19530 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# http.enable | Enable HTTP server or not. | Boolean | true |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# http.port | Port that Milvus HTTP server monitors. | Integer | 19121 |
|
||||
# | Port range (1024, 65535) | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
network:
|
||||
bind.address: 0.0.0.0
|
||||
bind.port: 19530
|
||||
http.enable: true
|
||||
http.port: 19121
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Storage Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# path | Path used to save meta data, vector data and index data. | Path | /var/lib/milvus |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# auto_flush_interval | The interval, in seconds, at which Milvus automatically | Integer | 1 (s) |
|
||||
# | flushes data to disk. | | |
|
||||
# | 0 means disable the regular flush. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
storage:
|
||||
path: @MILVUS_DB_PATH@
|
||||
auto_flush_interval: 1
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# WAL Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# enable | Whether to enable write-ahead logging (WAL) in Milvus. | Boolean | true |
|
||||
# | If WAL is enabled, Milvus writes all data changes to log | | |
|
||||
# | files in advance before implementing data changes. WAL | | |
|
||||
# | ensures the atomicity and durability for Milvus operations.| | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# recovery_error_ignore| Whether to ignore logs with errors that happens during WAL | Boolean | false |
|
||||
# | recovery. If true, when Milvus restarts for recovery and | | |
|
||||
# | there are errors in WAL log files, log files with errors | | |
|
||||
# | are ignored. If false, Milvus does not restart when there | | |
|
||||
# | are errors in WAL log files. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# buffer_size | Sum total of the read buffer and the write buffer in Bytes.| String | 256MB |
|
||||
# | buffer_size must be in range [64MB, 4096MB]. | | |
|
||||
# | If the value you specified is out of range, Milvus | | |
|
||||
# | automatically uses the boundary value closest to the | | |
|
||||
# | specified value. It is recommended you set buffer_size to | | |
|
||||
# | a value greater than the inserted data size of a single | | |
|
||||
# | insert operation for better performance. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# path | Location of WAL log files. | String | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
wal:
|
||||
enable: true
|
||||
recovery_error_ignore: false
|
||||
buffer_size: 256MB
|
||||
path: @MILVUS_DB_PATH@/wal
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Cache Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# cache_size | The size of CPU memory used for caching data for faster | String | 4GB |
|
||||
# | query. The sum of 'cache_size' and 'insert_buffer_size' | | |
|
||||
# | must be less than system memory size. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# insert_buffer_size | Buffer size used for data insertion. | String | 1GB |
|
||||
# | The sum of 'insert_buffer_size' and 'cache_size' | | |
|
||||
# | must be less than system memory size. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# preload_collection | A comma-separated list of collection names that need to | StringList | |
|
||||
# | be pre-loaded when Milvus server starts up. | | |
|
||||
# | '*' means preload all existing tables (single-quote or | | |
|
||||
# | double-quote required). | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
cache:
|
||||
cache_size: 4GB
|
||||
insert_buffer_size: 1GB
|
||||
preload_collection:
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# GPU Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# enable | Use GPU devices or not. | Boolean | false |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# cache_size | The size of GPU memory per card used for cache. | String | 1GB |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# gpu_search_threshold | A Milvus performance tuning parameter. This value will be | Integer | 1000 |
|
||||
# | compared with 'nq' to decide if the search computation will| | |
|
||||
# | be executed on GPUs only. | | |
|
||||
# | If nq >= gpu_search_threshold, the search computation will | | |
|
||||
# | be executed on GPUs only; | | |
|
||||
# | if nq < gpu_search_threshold, the search computation will | | |
|
||||
# | be executed on both CPUs and GPUs. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# search_devices | The list of GPU devices used for search computation. | DeviceList | gpu0 |
|
||||
# | Must be in format gpux. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# build_index_devices | The list of GPU devices used for index building. | DeviceList | gpu0 |
|
||||
# | Must be in format gpux. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
gpu:
|
||||
enable: @GPU_ENABLE@
|
||||
cache_size: 1GB
|
||||
gpu_search_threshold: 1000
|
||||
search_devices:
|
||||
- gpu0
|
||||
build_index_devices:
|
||||
- gpu0
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Logs Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# level | Log level in Milvus. Must be one of debug, info, warning, | String | debug |
|
||||
# | error, fatal | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# trace.enable | Whether to enable trace level logging in Milvus. | Boolean | true |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# path | Absolute path to the folder holding the log files. | String | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# max_log_file_size | The maximum size of each log file, size range | String | 1024MB |
|
||||
# | [512MB, 4096MB]. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# log_rotate_num | The maximum number of log files that Milvus keeps for each | Integer | 0 |
|
||||
# | logging level, num range [0, 1024], 0 means unlimited. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
logs:
|
||||
level: debug
|
||||
trace.enable: true
|
||||
path: @MILVUS_DB_PATH@/logs
|
||||
max_log_file_size: 1024MB
|
||||
log_rotate_num: 0
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Metric Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# enable | Enable monitoring function or not. | Boolean | false |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# address | Pushgateway address | IP | 127.0.0.1 +
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# port | Pushgateway port, port range (1024, 65535) | Integer | 9091 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
metric:
|
||||
enable: false
|
||||
address: 127.0.0.1
|
||||
port: 9091
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
# or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
version: 0.5
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# General Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# timezone | Use UTC-x or UTC+x to specify a time zone. | Timezone | UTC+8 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# meta_uri | URI for metadata storage, using SQLite (for single server | URI | sqlite://:@:/ |
|
||||
# | Milvus) or MySQL (for distributed cluster Milvus). | | |
|
||||
# | Format: dialect://username:password@host:port/database | | |
|
||||
# | Keep 'dialect://:@:/', 'dialect' can be either 'sqlite' or | | |
|
||||
# | 'mysql', replace other texts with real values. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
general:
|
||||
timezone: UTC+8
|
||||
meta_uri: sqlite://:@:/
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Network Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# bind.address | IP address that Milvus server monitors. | IP | 0.0.0.0 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# bind.port | Port that Milvus server monitors. Port range (1024, 65535) | Integer | 19530 |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# http.enable | Enable HTTP server or not. | Boolean | true |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# http.port | Port that Milvus HTTP server monitors. | Integer | 19121 |
|
||||
# | Port range (1024, 65535) | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
network:
|
||||
bind.address: 0.0.0.0
|
||||
bind.port: 19530
|
||||
http.enable: true
|
||||
http.port: 19121
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Storage Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# path | Path used to save meta data, vector data and index data. | Path | /var/lib/milvus |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# auto_flush_interval | The interval, in seconds, at which Milvus automatically | Integer | 1 (s) |
|
||||
# | flushes data to disk. | | |
|
||||
# | 0 means disable the regular flush. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
storage:
|
||||
path: /tmp
|
||||
auto_flush_interval: 1
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Cache Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# cache_size | The size of CPU memory used for caching data for faster | String | 4GB |
|
||||
# | query. The sum of 'cache_size' and 'insert_buffer_size' | | |
|
||||
# | must be less than system memory size. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# insert_buffer_size | Buffer size used for data insertion. | String | 1GB |
|
||||
# | The sum of 'insert_buffer_size' and 'cache_size' | | |
|
||||
# | must be less than system memory size. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# preload_collection | A comma-separated list of collection names that need to | StringList | |
|
||||
# | be pre-loaded when Milvus server starts up. | | |
|
||||
# | '*' means preload all existing tables (single-quote or | | |
|
||||
# | double-quote required). | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
cache:
|
||||
cache_size: 4GB
|
||||
insert_buffer_size: 1GB
|
||||
preload_collection:
|
||||
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# Logs Config | Description | Type | Default |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# level | Log level in Milvus. Must be one of debug, info, warning, | String | debug |
|
||||
# | error, fatal | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# trace.enable | Whether to enable trace level logging in Milvus. | Boolean | true |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# path | Absolute path to the folder holding the log files. | String | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# max_log_file_size | The maximum size of each log file, size range | String | 1024MB |
|
||||
# | [512MB, 4096MB]. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
# log_rotate_num | The maximum number of log files that Milvus keeps for each | Integer | 0 |
|
||||
# | logging level, num range [0, 1024], 0 means unlimited. | | |
|
||||
#----------------------+------------------------------------------------------------+------------+-----------------+
|
||||
logs:
|
||||
level: debug
|
||||
trace.enable: true
|
||||
path: /tmp/logs
|
||||
max_log_file_size: 1024MB
|
||||
log_rotate_num: 0
|
||||
|
||||
metric:
|
||||
level: debug
|
||||
|
||||
pulsar:
|
||||
address: localhost
|
||||
port: 6650
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"host": "127.0.0.1",
|
||||
"port": "5666",
|
||||
"tracer_library": "/path/to/shared_tracing_library",
|
||||
"tracer_configuration": {
|
||||
"service_name": "milvus_server",
|
||||
"sampler": {
|
||||
"type": "const",
|
||||
"param": "1"
|
||||
},
|
||||
"disabled": false,
|
||||
"reporter": {
|
||||
"localAgentHostPort": "127.0.0.1:6831"
|
||||
},
|
||||
"headers": {
|
||||
"jaegerDebugHeader": "jaeger_debug_header",
|
||||
"jaegerBaggageHeader": "jarger_baggage_header",
|
||||
"TraceContextHeaderName": "trace_context_header_name",
|
||||
"traceBaggageHeaderPrefix": "trace_baggage_header_prefix"
|
||||
},
|
||||
"baggage_restrictions": {
|
||||
"denyBaggageOnInitializationFailure": false,
|
||||
"hostPort": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -25,6 +25,7 @@ add_subdirectory( db ) # target milvus_engine
|
|||
add_subdirectory( log )
|
||||
add_subdirectory( server )
|
||||
add_subdirectory( message_client )
|
||||
add_subdirectory( etcd_watcher )
|
||||
|
||||
set(link_lib
|
||||
milvus_engine
|
||||
|
|
|
@ -68,16 +68,22 @@ ConfigMgr ConfigMgr::instance;
|
|||
|
||||
ConfigMgr::ConfigMgr() {
|
||||
config_list_ = {
|
||||
/* version */
|
||||
{"version", CreateStringConfig("version", false, &config.version.value, "unknown", nullptr, nullptr)},
|
||||
|
||||
/* general */
|
||||
{"timezone",
|
||||
CreateStringConfig("timezone", false, &config.timezone.value, "UTC+8", nullptr, nullptr)},
|
||||
{"general.timezone",
|
||||
CreateStringConfig("general.timezone", false, &config.general.timezone.value, "UTC+8", nullptr, nullptr)},
|
||||
|
||||
/* network */
|
||||
{"network.address", CreateStringConfig("network.address", false, &config.network.address.value,
|
||||
{"network.bind.address", CreateStringConfig("network.bind.address", false, &config.network.bind.address.value,
|
||||
"0.0.0.0", nullptr, nullptr)},
|
||||
{"network.port", CreateIntegerConfig("network.port", false, 0, 65535, &config.network.port.value,
|
||||
{"network.bind.port", CreateIntegerConfig("network.bind.port", false, 0, 65535, &config.network.bind.port.value,
|
||||
19530, nullptr, nullptr)},
|
||||
{"network.http.enable",
|
||||
CreateBoolConfig("network.http.enable", false, &config.network.http.enable.value, true, nullptr, nullptr)},
|
||||
{"network.http.port", CreateIntegerConfig("network.http.port", false, 0, 65535, &config.network.http.port.value,
|
||||
19121, nullptr, nullptr)},
|
||||
|
||||
|
||||
/* pulsar */
|
||||
|
@ -86,6 +92,27 @@ ConfigMgr::ConfigMgr() {
|
|||
{"pulsar.port", CreateIntegerConfig("pulsar.port", false, 0, 65535, &config.pulsar.port.value,
|
||||
6650, nullptr, nullptr)},
|
||||
|
||||
/* storage */
|
||||
{"storage.path",
|
||||
CreateStringConfig("storage.path", false, &config.storage.path.value, "/var/lib/milvus", nullptr, nullptr)},
|
||||
{"storage.auto_flush_interval",
|
||||
CreateIntegerConfig("storage.auto_flush_interval", true, 0, std::numeric_limits<int64_t>::max(),
|
||||
&config.storage.auto_flush_interval.value, 1, nullptr, nullptr)},
|
||||
|
||||
|
||||
/* cache */
|
||||
{"cache.cache_size", CreateSizeConfig("cache.cache_size", true, 0, std::numeric_limits<int64_t>::max(),
|
||||
&config.cache.cache_size.value, 4 * GB, nullptr, nullptr)},
|
||||
{"cache.cpu_cache_threshold",
|
||||
CreateFloatingConfig("cache.cpu_cache_threshold", false, 0.0, 1.0, &config.cache.cpu_cache_threshold.value,
|
||||
0.7, nullptr, nullptr)},
|
||||
{"cache.insert_buffer_size",
|
||||
CreateSizeConfig("cache.insert_buffer_size", false, 0, std::numeric_limits<int64_t>::max(),
|
||||
&config.cache.insert_buffer_size.value, 1 * GB, nullptr, nullptr)},
|
||||
{"cache.cache_insert_data", CreateBoolConfig("cache.cache_insert_data", false,
|
||||
&config.cache.cache_insert_data.value, false, nullptr, nullptr)},
|
||||
{"cache.preload_collection", CreateStringConfig("cache.preload_collection", false,
|
||||
&config.cache.preload_collection.value, "", nullptr, nullptr)},
|
||||
|
||||
/* log */
|
||||
{"logs.level", CreateStringConfig("logs.level", false, &config.logs.level.value, "debug", nullptr, nullptr)},
|
||||
|
@ -135,19 +162,13 @@ ConfigMgr::Load(const std::string& path) {
|
|||
auto yaml = YAML::LoadFile(path);
|
||||
/* make it flattened */
|
||||
std::unordered_map<std::string, std::string> flattened;
|
||||
// auto proxy_yaml = yaml["porxy"];
|
||||
auto other_yaml = YAML::Node{};
|
||||
other_yaml["pulsar"] = yaml["pulsar"];
|
||||
Flatten(yaml["proxy"], flattened, "");
|
||||
Flatten(other_yaml, flattened, "");
|
||||
// Flatten(yaml["proxy"], flattened, "");
|
||||
Flatten(yaml, flattened, "");
|
||||
/* update config */
|
||||
for (auto& it : flattened) Set(it.first, it.second, false);
|
||||
}
|
||||
|
||||
void
|
||||
ConfigMgr::Set(const std::string& name, const std::string& value, bool update) {
|
||||
std::cout<<"InSet Config "<< name <<std::endl;
|
||||
if (config_list_.find(name) == config_list_.end()){
|
||||
std::cout<<"Config "<< name << " not found!"<<std::endl;
|
||||
return;
|
||||
|
|
|
@ -64,11 +64,21 @@ struct ServerConfig {
|
|||
using Integer = ConfigValue<int64_t>;
|
||||
using Floating = ConfigValue<double>;
|
||||
|
||||
String timezone{"unknown"};
|
||||
String version{"unknown"};
|
||||
|
||||
struct General {
|
||||
String timezone{"unknown"};
|
||||
} general;
|
||||
|
||||
struct Network {
|
||||
String address{"unknown"};
|
||||
Integer port{0};
|
||||
struct Bind {
|
||||
String address{"unknown"};
|
||||
Integer port{0};
|
||||
} bind;
|
||||
struct Http {
|
||||
Bool enable{false};
|
||||
Integer port{0};
|
||||
} http;
|
||||
} network;
|
||||
|
||||
struct Pulsar{
|
||||
|
@ -76,6 +86,18 @@ struct ServerConfig {
|
|||
Integer port{6650};
|
||||
}pulsar;
|
||||
|
||||
struct Storage {
|
||||
String path{"unknown"};
|
||||
Integer auto_flush_interval{0};
|
||||
} storage;
|
||||
|
||||
struct Cache {
|
||||
Integer cache_size{0};
|
||||
Floating cpu_cache_threshold{0.0};
|
||||
Integer insert_buffer_size{0};
|
||||
Bool cache_insert_data{false};
|
||||
String preload_collection{"unknown"};
|
||||
} cache;
|
||||
|
||||
struct Engine {
|
||||
Integer build_index_threshold{4096};
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
AUX_SOURCE_DIRECTORY(. watcher_src)
|
||||
add_executable(test_watcher
|
||||
${watcher_src}
|
||||
${PROJECT_SOURCE_DIR}/src/grpc/etcd.pb.cc
|
||||
${PROJECT_SOURCE_DIR}/src/grpc/etcd.grpc.pb.cc
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
test_watcher
|
||||
PRIVATE
|
||||
libprotobuf
|
||||
grpc++_reflection
|
||||
grpc++
|
||||
)
|
|
@ -0,0 +1,88 @@
|
|||
#include "Watcher.h"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include "grpc/etcd.grpc.pb.h"
|
||||
|
||||
namespace milvus {
|
||||
namespace master {
|
||||
|
||||
Watcher::Watcher(const std::string &address,
|
||||
const std::string &key,
|
||||
std::function<void(etcdserverpb::WatchResponse)> callback) {
|
||||
auto channel = grpc::CreateChannel(address, grpc::InsecureChannelCredentials());
|
||||
stub_ = etcdserverpb::Watch::NewStub(channel);
|
||||
|
||||
call_ = std::make_unique<AsyncWatchAction>(key, stub_.get());
|
||||
work_thread_ = std::thread([&]() {
|
||||
call_->WaitForResponse(callback);
|
||||
});
|
||||
}
|
||||
|
||||
void Watcher::Cancel() {
|
||||
call_->CancelWatch();
|
||||
}
|
||||
|
||||
Watcher::~Watcher() {
|
||||
Cancel();
|
||||
work_thread_.join();
|
||||
}
|
||||
|
||||
AsyncWatchAction::AsyncWatchAction(const std::string &key, etcdserverpb::Watch::Stub *stub) {
|
||||
// tag `1` means to wire a rpc
|
||||
stream_ = stub->AsyncWatch(&context_, &cq_, (void *) 1);
|
||||
etcdserverpb::WatchRequest req;
|
||||
req.mutable_create_request()->set_key(key);
|
||||
std::string range_end(key);
|
||||
int ascii = (int) range_end[range_end.length() - 1];
|
||||
range_end.back() = ascii + 1;
|
||||
req.mutable_create_request()->set_range_end(range_end);
|
||||
|
||||
void *got_tag;
|
||||
bool ok = false;
|
||||
if (cq_.Next(&got_tag, &ok) && ok && got_tag == (void *) 1) {
|
||||
// tag `2` means write watch request to stream
|
||||
stream_->Write(req, (void *) 2);
|
||||
} else {
|
||||
throw std::runtime_error("failed to create a watch connection");
|
||||
}
|
||||
|
||||
if (cq_.Next(&got_tag, &ok) && ok && got_tag == (void *) 2) {
|
||||
stream_->Read(&reply_, (void *) this);
|
||||
} else {
|
||||
throw std::runtime_error("failed to write WatchCreateRequest to server");
|
||||
}
|
||||
}
|
||||
|
||||
void AsyncWatchAction::WaitForResponse(std::function<void(etcdserverpb::WatchResponse)> callback) {
|
||||
void *got_tag;
|
||||
bool ok = false;
|
||||
|
||||
while (cq_.Next(&got_tag, &ok)) {
|
||||
if (!ok) {
|
||||
break;
|
||||
}
|
||||
if (got_tag == (void *) 3) {
|
||||
cancled_.store(true);
|
||||
cq_.Shutdown();
|
||||
break;
|
||||
} else if (got_tag == (void *) this) // read tag
|
||||
{
|
||||
if (reply_.events_size()) {
|
||||
callback(reply_);
|
||||
}
|
||||
stream_->Read(&reply_, (void *) this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AsyncWatchAction::CancelWatch() {
|
||||
if (!cancled_.load()) {
|
||||
// tag `3` mean write done
|
||||
stream_->WritesDone((void *) 3);
|
||||
cancled_.store(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
#pragma once
|
||||
#include "grpc/etcd.grpc.pb.h"
|
||||
#include <grpc++/grpc++.h>
|
||||
#include <thread>
|
||||
|
||||
namespace milvus {
|
||||
namespace master {
|
||||
|
||||
class AsyncWatchAction;
|
||||
|
||||
class Watcher {
|
||||
public:
|
||||
Watcher(std::string const &address,
|
||||
std::string const &key,
|
||||
std::function<void(etcdserverpb::WatchResponse)> callback);
|
||||
void Cancel();
|
||||
~Watcher();
|
||||
|
||||
private:
|
||||
std::unique_ptr<etcdserverpb::Watch::Stub> stub_;
|
||||
std::unique_ptr<AsyncWatchAction> call_;
|
||||
std::thread work_thread_;
|
||||
};
|
||||
|
||||
class AsyncWatchAction {
|
||||
public:
|
||||
AsyncWatchAction(const std::string &key, etcdserverpb::Watch::Stub* stub);
|
||||
void WaitForResponse(std::function<void(etcdserverpb::WatchResponse)> callback);
|
||||
void CancelWatch();
|
||||
private:
|
||||
// Status status;
|
||||
grpc::ClientContext context_;
|
||||
grpc::CompletionQueue cq_;
|
||||
etcdserverpb::WatchResponse reply_;
|
||||
std::unique_ptr<grpc::ClientAsyncReaderWriter<etcdserverpb::WatchRequest, etcdserverpb::WatchResponse>> stream_;
|
||||
std::atomic<bool> cancled_ = false;
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
// Steps to test this file:
|
||||
// 1. start a etcdv3 server
|
||||
// 2. run this test
|
||||
// 3. modify test key using etcdctlv3 or etcd-clientv3(Must using v3 api)
|
||||
// TODO: move this test to unittest
|
||||
|
||||
#include "Watcher.h"
|
||||
|
||||
using namespace milvus::master;
|
||||
int main() {
|
||||
try {
|
||||
Watcher watcher("127.0.0.1:2379", "SomeKey", [](etcdserverpb::WatchResponse res) {
|
||||
std::cerr << "Key1 changed!" << std::endl;
|
||||
std::cout << "Event size: " << res.events_size() << std::endl;
|
||||
for (auto &event: res.events()) {
|
||||
std::cout <<
|
||||
event.kv().key() << ":" <<
|
||||
event.kv().value() << std::endl;
|
||||
}
|
||||
});
|
||||
while (true) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(60000));
|
||||
watcher.Cancel();
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (const std::exception &e) {
|
||||
std::cout << e.what();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
// Generated by the gRPC C++ plugin.
|
||||
// If you make any local change, they will be lost.
|
||||
// source: etcd.proto
|
||||
|
||||
#include "etcd.pb.h"
|
||||
#include "etcd.grpc.pb.h"
|
||||
|
||||
#include <functional>
|
||||
#include <grpcpp/impl/codegen/async_stream.h>
|
||||
#include <grpcpp/impl/codegen/async_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/channel_interface.h>
|
||||
#include <grpcpp/impl/codegen/client_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/client_callback.h>
|
||||
#include <grpcpp/impl/codegen/method_handler_impl.h>
|
||||
#include <grpcpp/impl/codegen/rpc_service_method.h>
|
||||
#include <grpcpp/impl/codegen/server_callback.h>
|
||||
#include <grpcpp/impl/codegen/service_type.h>
|
||||
#include <grpcpp/impl/codegen/sync_stream.h>
|
||||
namespace etcdserverpb {
|
||||
|
||||
static const char* Watch_method_names[] = {
|
||||
"/etcdserverpb.Watch/Watch",
|
||||
};
|
||||
|
||||
std::unique_ptr< Watch::Stub> Watch::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
|
||||
(void)options;
|
||||
std::unique_ptr< Watch::Stub> stub(new Watch::Stub(channel));
|
||||
return stub;
|
||||
}
|
||||
|
||||
Watch::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
|
||||
: channel_(channel), rpcmethod_Watch_(Watch_method_names[0], ::grpc::internal::RpcMethod::BIDI_STREAMING, channel)
|
||||
{}
|
||||
|
||||
::grpc::ClientReaderWriter< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>* Watch::Stub::WatchRaw(::grpc::ClientContext* context) {
|
||||
return ::grpc_impl::internal::ClientReaderWriterFactory< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>::Create(channel_.get(), rpcmethod_Watch_, context);
|
||||
}
|
||||
|
||||
void Watch::Stub::experimental_async::Watch(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::etcdserverpb::WatchRequest,::etcdserverpb::WatchResponse>* reactor) {
|
||||
::grpc_impl::internal::ClientCallbackReaderWriterFactory< ::etcdserverpb::WatchRequest,::etcdserverpb::WatchResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_Watch_, context, reactor);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncReaderWriter< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>* Watch::Stub::AsyncWatchRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
|
||||
return ::grpc_impl::internal::ClientAsyncReaderWriterFactory< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>::Create(channel_.get(), cq, rpcmethod_Watch_, context, true, tag);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncReaderWriter< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>* Watch::Stub::PrepareAsyncWatchRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncReaderWriterFactory< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>::Create(channel_.get(), cq, rpcmethod_Watch_, context, false, nullptr);
|
||||
}
|
||||
|
||||
Watch::Service::Service() {
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Watch_method_names[0],
|
||||
::grpc::internal::RpcMethod::BIDI_STREAMING,
|
||||
new ::grpc::internal::BidiStreamingHandler< Watch::Service, ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>(
|
||||
std::mem_fn(&Watch::Service::Watch), this)));
|
||||
}
|
||||
|
||||
Watch::Service::~Service() {
|
||||
}
|
||||
|
||||
::grpc::Status Watch::Service::Watch(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::etcdserverpb::WatchResponse, ::etcdserverpb::WatchRequest>* stream) {
|
||||
(void) context;
|
||||
(void) stream;
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
|
||||
} // namespace etcdserverpb
|
||||
|
|
@ -0,0 +1,235 @@
|
|||
// Generated by the gRPC C++ plugin.
|
||||
// If you make any local change, they will be lost.
|
||||
// source: etcd.proto
|
||||
#ifndef GRPC_etcd_2eproto__INCLUDED
|
||||
#define GRPC_etcd_2eproto__INCLUDED
|
||||
|
||||
#include "etcd.pb.h"
|
||||
|
||||
#include <functional>
|
||||
#include <grpcpp/impl/codegen/async_generic_service.h>
|
||||
#include <grpcpp/impl/codegen/async_stream.h>
|
||||
#include <grpcpp/impl/codegen/async_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/client_callback.h>
|
||||
#include <grpcpp/impl/codegen/client_context.h>
|
||||
#include <grpcpp/impl/codegen/completion_queue.h>
|
||||
#include <grpcpp/impl/codegen/method_handler_impl.h>
|
||||
#include <grpcpp/impl/codegen/proto_utils.h>
|
||||
#include <grpcpp/impl/codegen/rpc_method.h>
|
||||
#include <grpcpp/impl/codegen/server_callback.h>
|
||||
#include <grpcpp/impl/codegen/server_context.h>
|
||||
#include <grpcpp/impl/codegen/service_type.h>
|
||||
#include <grpcpp/impl/codegen/status.h>
|
||||
#include <grpcpp/impl/codegen/stub_options.h>
|
||||
#include <grpcpp/impl/codegen/sync_stream.h>
|
||||
|
||||
namespace grpc_impl {
|
||||
class CompletionQueue;
|
||||
class ServerCompletionQueue;
|
||||
class ServerContext;
|
||||
} // namespace grpc_impl
|
||||
|
||||
namespace grpc {
|
||||
namespace experimental {
|
||||
template <typename RequestT, typename ResponseT>
|
||||
class MessageAllocator;
|
||||
} // namespace experimental
|
||||
} // namespace grpc
|
||||
|
||||
namespace etcdserverpb {
|
||||
|
||||
class Watch final {
|
||||
public:
|
||||
static constexpr char const* service_full_name() {
|
||||
return "etcdserverpb.Watch";
|
||||
}
|
||||
class StubInterface {
|
||||
public:
|
||||
virtual ~StubInterface() {}
|
||||
// Watch watches for events happening or that have happened. Both input and output
|
||||
// are streams; the input stream is for creating and canceling watchers and the output
|
||||
// stream sends events. One watch RPC can watch on multiple key ranges, streaming events
|
||||
// for several watches at once. The entire event history can be watched starting from the
|
||||
// last compaction revision.
|
||||
std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>> Watch(::grpc::ClientContext* context) {
|
||||
return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>>(WatchRaw(context));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>> AsyncWatch(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>>(AsyncWatchRaw(context, cq, tag));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>> PrepareAsyncWatch(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>>(PrepareAsyncWatchRaw(context, cq));
|
||||
}
|
||||
class experimental_async_interface {
|
||||
public:
|
||||
virtual ~experimental_async_interface() {}
|
||||
// Watch watches for events happening or that have happened. Both input and output
|
||||
// are streams; the input stream is for creating and canceling watchers and the output
|
||||
// stream sends events. One watch RPC can watch on multiple key ranges, streaming events
|
||||
// for several watches at once. The entire event history can be watched starting from the
|
||||
// last compaction revision.
|
||||
virtual void Watch(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::etcdserverpb::WatchRequest,::etcdserverpb::WatchResponse>* reactor) = 0;
|
||||
};
|
||||
virtual class experimental_async_interface* experimental_async() { return nullptr; }
|
||||
private:
|
||||
virtual ::grpc::ClientReaderWriterInterface< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>* WatchRaw(::grpc::ClientContext* context) = 0;
|
||||
virtual ::grpc::ClientAsyncReaderWriterInterface< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>* AsyncWatchRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0;
|
||||
virtual ::grpc::ClientAsyncReaderWriterInterface< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>* PrepareAsyncWatchRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0;
|
||||
};
|
||||
class Stub final : public StubInterface {
|
||||
public:
|
||||
Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
|
||||
std::unique_ptr< ::grpc::ClientReaderWriter< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>> Watch(::grpc::ClientContext* context) {
|
||||
return std::unique_ptr< ::grpc::ClientReaderWriter< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>>(WatchRaw(context));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>> AsyncWatch(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>>(AsyncWatchRaw(context, cq, tag));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>> PrepareAsyncWatch(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>>(PrepareAsyncWatchRaw(context, cq));
|
||||
}
|
||||
class experimental_async final :
|
||||
public StubInterface::experimental_async_interface {
|
||||
public:
|
||||
void Watch(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::etcdserverpb::WatchRequest,::etcdserverpb::WatchResponse>* reactor) override;
|
||||
private:
|
||||
friend class Stub;
|
||||
explicit experimental_async(Stub* stub): stub_(stub) { }
|
||||
Stub* stub() { return stub_; }
|
||||
Stub* stub_;
|
||||
};
|
||||
class experimental_async_interface* experimental_async() override { return &async_stub_; }
|
||||
|
||||
private:
|
||||
std::shared_ptr< ::grpc::ChannelInterface> channel_;
|
||||
class experimental_async async_stub_{this};
|
||||
::grpc::ClientReaderWriter< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>* WatchRaw(::grpc::ClientContext* context) override;
|
||||
::grpc::ClientAsyncReaderWriter< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>* AsyncWatchRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override;
|
||||
::grpc::ClientAsyncReaderWriter< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>* PrepareAsyncWatchRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override;
|
||||
const ::grpc::internal::RpcMethod rpcmethod_Watch_;
|
||||
};
|
||||
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
|
||||
|
||||
class Service : public ::grpc::Service {
|
||||
public:
|
||||
Service();
|
||||
virtual ~Service();
|
||||
// Watch watches for events happening or that have happened. Both input and output
|
||||
// are streams; the input stream is for creating and canceling watchers and the output
|
||||
// stream sends events. One watch RPC can watch on multiple key ranges, streaming events
|
||||
// for several watches at once. The entire event history can be watched starting from the
|
||||
// last compaction revision.
|
||||
virtual ::grpc::Status Watch(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::etcdserverpb::WatchResponse, ::etcdserverpb::WatchRequest>* stream);
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithAsyncMethod_Watch : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithAsyncMethod_Watch() {
|
||||
::grpc::Service::MarkMethodAsync(0);
|
||||
}
|
||||
~WithAsyncMethod_Watch() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status Watch(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::etcdserverpb::WatchResponse, ::etcdserverpb::WatchRequest>* /*stream*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
void RequestWatch(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::etcdserverpb::WatchResponse, ::etcdserverpb::WatchRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
|
||||
::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag);
|
||||
}
|
||||
};
|
||||
typedef WithAsyncMethod_Watch<Service > AsyncService;
|
||||
template <class BaseClass>
|
||||
class ExperimentalWithCallbackMethod_Watch : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
ExperimentalWithCallbackMethod_Watch() {
|
||||
::grpc::Service::experimental().MarkMethodCallback(0,
|
||||
new ::grpc_impl::internal::CallbackBidiHandler< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>(
|
||||
[this] { return this->Watch(); }));
|
||||
}
|
||||
~ExperimentalWithCallbackMethod_Watch() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status Watch(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::etcdserverpb::WatchResponse, ::etcdserverpb::WatchRequest>* /*stream*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
virtual ::grpc::experimental::ServerBidiReactor< ::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>* Watch() {
|
||||
return new ::grpc_impl::internal::UnimplementedBidiReactor<
|
||||
::etcdserverpb::WatchRequest, ::etcdserverpb::WatchResponse>;}
|
||||
};
|
||||
typedef ExperimentalWithCallbackMethod_Watch<Service > ExperimentalCallbackService;
|
||||
template <class BaseClass>
|
||||
class WithGenericMethod_Watch : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithGenericMethod_Watch() {
|
||||
::grpc::Service::MarkMethodGeneric(0);
|
||||
}
|
||||
~WithGenericMethod_Watch() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status Watch(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::etcdserverpb::WatchResponse, ::etcdserverpb::WatchRequest>* /*stream*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithRawMethod_Watch : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithRawMethod_Watch() {
|
||||
::grpc::Service::MarkMethodRaw(0);
|
||||
}
|
||||
~WithRawMethod_Watch() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status Watch(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::etcdserverpb::WatchResponse, ::etcdserverpb::WatchRequest>* /*stream*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
void RequestWatch(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
|
||||
::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag);
|
||||
}
|
||||
};
|
||||
template <class BaseClass>
|
||||
class ExperimentalWithRawCallbackMethod_Watch : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
ExperimentalWithRawCallbackMethod_Watch() {
|
||||
::grpc::Service::experimental().MarkMethodRawCallback(0,
|
||||
new ::grpc_impl::internal::CallbackBidiHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
|
||||
[this] { return this->Watch(); }));
|
||||
}
|
||||
~ExperimentalWithRawCallbackMethod_Watch() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status Watch(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::etcdserverpb::WatchResponse, ::etcdserverpb::WatchRequest>* /*stream*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
virtual ::grpc::experimental::ServerBidiReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* Watch() {
|
||||
return new ::grpc_impl::internal::UnimplementedBidiReactor<
|
||||
::grpc::ByteBuffer, ::grpc::ByteBuffer>;}
|
||||
};
|
||||
typedef Service StreamedUnaryService;
|
||||
typedef Service SplitStreamedService;
|
||||
typedef Service StreamedService;
|
||||
};
|
||||
|
||||
} // namespace etcdserverpb
|
||||
|
||||
|
||||
#endif // GRPC_etcd_2eproto__INCLUDED
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,85 @@
|
|||
// Generated by the gRPC C++ plugin.
|
||||
// If you make any local change, they will be lost.
|
||||
// source: hello.proto
|
||||
|
||||
#include "hello.pb.h"
|
||||
#include "hello.grpc.pb.h"
|
||||
|
||||
#include <functional>
|
||||
#include <grpcpp/impl/codegen/async_stream.h>
|
||||
#include <grpcpp/impl/codegen/async_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/channel_interface.h>
|
||||
#include <grpcpp/impl/codegen/client_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/client_callback.h>
|
||||
#include <grpcpp/impl/codegen/method_handler_impl.h>
|
||||
#include <grpcpp/impl/codegen/rpc_service_method.h>
|
||||
#include <grpcpp/impl/codegen/server_callback.h>
|
||||
#include <grpcpp/impl/codegen/service_type.h>
|
||||
#include <grpcpp/impl/codegen/sync_stream.h>
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
|
||||
static const char* HelloService_method_names[] = {
|
||||
"/milvus.grpc.HelloService/SayHello",
|
||||
};
|
||||
|
||||
std::unique_ptr< HelloService::Stub> HelloService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
|
||||
(void)options;
|
||||
std::unique_ptr< HelloService::Stub> stub(new HelloService::Stub(channel));
|
||||
return stub;
|
||||
}
|
||||
|
||||
HelloService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
|
||||
: channel_(channel), rpcmethod_SayHello_(HelloService_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
{}
|
||||
|
||||
::grpc::Status HelloService::Stub::SayHello(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest& request, ::milvus::grpc::HelloReply* response) {
|
||||
return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_SayHello_, context, request, response);
|
||||
}
|
||||
|
||||
void HelloService::Stub::experimental_async::SayHello(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest* request, ::milvus::grpc::HelloReply* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_SayHello_, context, request, response, std::move(f));
|
||||
}
|
||||
|
||||
void HelloService::Stub::experimental_async::SayHello(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HelloReply* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_SayHello_, context, request, response, std::move(f));
|
||||
}
|
||||
|
||||
void HelloService::Stub::experimental_async::SayHello(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest* request, ::milvus::grpc::HelloReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
|
||||
::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_SayHello_, context, request, response, reactor);
|
||||
}
|
||||
|
||||
void HelloService::Stub::experimental_async::SayHello(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HelloReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
|
||||
::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_SayHello_, context, request, response, reactor);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::HelloReply>* HelloService::Stub::AsyncSayHelloRaw(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::HelloReply>::Create(channel_.get(), cq, rpcmethod_SayHello_, context, request, true);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::HelloReply>* HelloService::Stub::PrepareAsyncSayHelloRaw(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::HelloReply>::Create(channel_.get(), cq, rpcmethod_SayHello_, context, request, false);
|
||||
}
|
||||
|
||||
HelloService::Service::Service() {
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
HelloService_method_names[0],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< HelloService::Service, ::milvus::grpc::HelloRequest, ::milvus::grpc::HelloReply>(
|
||||
std::mem_fn(&HelloService::Service::SayHello), this)));
|
||||
}
|
||||
|
||||
HelloService::Service::~Service() {
|
||||
}
|
||||
|
||||
::grpc::Status HelloService::Service::SayHello(::grpc::ServerContext* context, const ::milvus::grpc::HelloRequest* request, ::milvus::grpc::HelloReply* response) {
|
||||
(void) context;
|
||||
(void) request;
|
||||
(void) response;
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
|
||||
} // namespace milvus
|
||||
} // namespace grpc
|
||||
|
|
@ -0,0 +1,254 @@
|
|||
// Generated by the gRPC C++ plugin.
|
||||
// If you make any local change, they will be lost.
|
||||
// source: hello.proto
|
||||
#ifndef GRPC_hello_2eproto__INCLUDED
|
||||
#define GRPC_hello_2eproto__INCLUDED
|
||||
|
||||
#include "hello.pb.h"
|
||||
|
||||
#include <functional>
|
||||
#include <grpcpp/impl/codegen/async_generic_service.h>
|
||||
#include <grpcpp/impl/codegen/async_stream.h>
|
||||
#include <grpcpp/impl/codegen/async_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/client_callback.h>
|
||||
#include <grpcpp/impl/codegen/client_context.h>
|
||||
#include <grpcpp/impl/codegen/completion_queue.h>
|
||||
#include <grpcpp/impl/codegen/method_handler_impl.h>
|
||||
#include <grpcpp/impl/codegen/proto_utils.h>
|
||||
#include <grpcpp/impl/codegen/rpc_method.h>
|
||||
#include <grpcpp/impl/codegen/server_callback.h>
|
||||
#include <grpcpp/impl/codegen/server_context.h>
|
||||
#include <grpcpp/impl/codegen/service_type.h>
|
||||
#include <grpcpp/impl/codegen/status.h>
|
||||
#include <grpcpp/impl/codegen/stub_options.h>
|
||||
#include <grpcpp/impl/codegen/sync_stream.h>
|
||||
|
||||
namespace grpc_impl {
|
||||
class CompletionQueue;
|
||||
class ServerCompletionQueue;
|
||||
class ServerContext;
|
||||
} // namespace grpc_impl
|
||||
|
||||
namespace grpc {
|
||||
namespace experimental {
|
||||
template <typename RequestT, typename ResponseT>
|
||||
class MessageAllocator;
|
||||
} // namespace experimental
|
||||
} // namespace grpc
|
||||
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
|
||||
class HelloService final {
|
||||
public:
|
||||
static constexpr char const* service_full_name() {
|
||||
return "milvus.grpc.HelloService";
|
||||
}
|
||||
class StubInterface {
|
||||
public:
|
||||
virtual ~StubInterface() {}
|
||||
virtual ::grpc::Status SayHello(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest& request, ::milvus::grpc::HelloReply* response) = 0;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HelloReply>> AsyncSayHello(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HelloReply>>(AsyncSayHelloRaw(context, request, cq));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HelloReply>> PrepareAsyncSayHello(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HelloReply>>(PrepareAsyncSayHelloRaw(context, request, cq));
|
||||
}
|
||||
class experimental_async_interface {
|
||||
public:
|
||||
virtual ~experimental_async_interface() {}
|
||||
virtual void SayHello(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest* request, ::milvus::grpc::HelloReply* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void SayHello(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HelloReply* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void SayHello(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest* request, ::milvus::grpc::HelloReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
|
||||
virtual void SayHello(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HelloReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
|
||||
};
|
||||
virtual class experimental_async_interface* experimental_async() { return nullptr; }
|
||||
private:
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HelloReply>* AsyncSayHelloRaw(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HelloReply>* PrepareAsyncSayHelloRaw(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
};
|
||||
class Stub final : public StubInterface {
|
||||
public:
|
||||
Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
|
||||
::grpc::Status SayHello(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest& request, ::milvus::grpc::HelloReply* response) override;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HelloReply>> AsyncSayHello(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HelloReply>>(AsyncSayHelloRaw(context, request, cq));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HelloReply>> PrepareAsyncSayHello(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HelloReply>>(PrepareAsyncSayHelloRaw(context, request, cq));
|
||||
}
|
||||
class experimental_async final :
|
||||
public StubInterface::experimental_async_interface {
|
||||
public:
|
||||
void SayHello(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest* request, ::milvus::grpc::HelloReply* response, std::function<void(::grpc::Status)>) override;
|
||||
void SayHello(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HelloReply* response, std::function<void(::grpc::Status)>) override;
|
||||
void SayHello(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest* request, ::milvus::grpc::HelloReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
void SayHello(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HelloReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
private:
|
||||
friend class Stub;
|
||||
explicit experimental_async(Stub* stub): stub_(stub) { }
|
||||
Stub* stub() { return stub_; }
|
||||
Stub* stub_;
|
||||
};
|
||||
class experimental_async_interface* experimental_async() override { return &async_stub_; }
|
||||
|
||||
private:
|
||||
std::shared_ptr< ::grpc::ChannelInterface> channel_;
|
||||
class experimental_async async_stub_{this};
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::HelloReply>* AsyncSayHelloRaw(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::HelloReply>* PrepareAsyncSayHelloRaw(::grpc::ClientContext* context, const ::milvus::grpc::HelloRequest& request, ::grpc::CompletionQueue* cq) override;
|
||||
const ::grpc::internal::RpcMethod rpcmethod_SayHello_;
|
||||
};
|
||||
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
|
||||
|
||||
class Service : public ::grpc::Service {
|
||||
public:
|
||||
Service();
|
||||
virtual ~Service();
|
||||
virtual ::grpc::Status SayHello(::grpc::ServerContext* context, const ::milvus::grpc::HelloRequest* request, ::milvus::grpc::HelloReply* response);
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithAsyncMethod_SayHello : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithAsyncMethod_SayHello() {
|
||||
::grpc::Service::MarkMethodAsync(0);
|
||||
}
|
||||
~WithAsyncMethod_SayHello() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status SayHello(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HelloRequest* /*request*/, ::milvus::grpc::HelloReply* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
void RequestSayHello(::grpc::ServerContext* context, ::milvus::grpc::HelloRequest* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::HelloReply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
|
||||
::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
|
||||
}
|
||||
};
|
||||
typedef WithAsyncMethod_SayHello<Service > AsyncService;
|
||||
template <class BaseClass>
|
||||
class ExperimentalWithCallbackMethod_SayHello : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
ExperimentalWithCallbackMethod_SayHello() {
|
||||
::grpc::Service::experimental().MarkMethodCallback(0,
|
||||
new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HelloRequest, ::milvus::grpc::HelloReply>(
|
||||
[this](::grpc::ServerContext* context,
|
||||
const ::milvus::grpc::HelloRequest* request,
|
||||
::milvus::grpc::HelloReply* response,
|
||||
::grpc::experimental::ServerCallbackRpcController* controller) {
|
||||
return this->SayHello(context, request, response, controller);
|
||||
}));
|
||||
}
|
||||
void SetMessageAllocatorFor_SayHello(
|
||||
::grpc::experimental::MessageAllocator< ::milvus::grpc::HelloRequest, ::milvus::grpc::HelloReply>* allocator) {
|
||||
static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HelloRequest, ::milvus::grpc::HelloReply>*>(
|
||||
::grpc::Service::experimental().GetHandler(0))
|
||||
->SetMessageAllocator(allocator);
|
||||
}
|
||||
~ExperimentalWithCallbackMethod_SayHello() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status SayHello(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HelloRequest* /*request*/, ::milvus::grpc::HelloReply* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
virtual void SayHello(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HelloRequest* /*request*/, ::milvus::grpc::HelloReply* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
|
||||
};
|
||||
typedef ExperimentalWithCallbackMethod_SayHello<Service > ExperimentalCallbackService;
|
||||
template <class BaseClass>
|
||||
class WithGenericMethod_SayHello : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithGenericMethod_SayHello() {
|
||||
::grpc::Service::MarkMethodGeneric(0);
|
||||
}
|
||||
~WithGenericMethod_SayHello() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status SayHello(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HelloRequest* /*request*/, ::milvus::grpc::HelloReply* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithRawMethod_SayHello : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithRawMethod_SayHello() {
|
||||
::grpc::Service::MarkMethodRaw(0);
|
||||
}
|
||||
~WithRawMethod_SayHello() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status SayHello(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HelloRequest* /*request*/, ::milvus::grpc::HelloReply* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
void RequestSayHello(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
|
||||
::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
|
||||
}
|
||||
};
|
||||
template <class BaseClass>
|
||||
class ExperimentalWithRawCallbackMethod_SayHello : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
ExperimentalWithRawCallbackMethod_SayHello() {
|
||||
::grpc::Service::experimental().MarkMethodRawCallback(0,
|
||||
new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
|
||||
[this](::grpc::ServerContext* context,
|
||||
const ::grpc::ByteBuffer* request,
|
||||
::grpc::ByteBuffer* response,
|
||||
::grpc::experimental::ServerCallbackRpcController* controller) {
|
||||
this->SayHello(context, request, response, controller);
|
||||
}));
|
||||
}
|
||||
~ExperimentalWithRawCallbackMethod_SayHello() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status SayHello(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HelloRequest* /*request*/, ::milvus::grpc::HelloReply* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
virtual void SayHello(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithStreamedUnaryMethod_SayHello : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithStreamedUnaryMethod_SayHello() {
|
||||
::grpc::Service::MarkMethodStreamed(0,
|
||||
new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::HelloRequest, ::milvus::grpc::HelloReply>(std::bind(&WithStreamedUnaryMethod_SayHello<BaseClass>::StreamedSayHello, this, std::placeholders::_1, std::placeholders::_2)));
|
||||
}
|
||||
~WithStreamedUnaryMethod_SayHello() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable regular version of this method
|
||||
::grpc::Status SayHello(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HelloRequest* /*request*/, ::milvus::grpc::HelloReply* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
// replace default version of method with streamed unary
|
||||
virtual ::grpc::Status StreamedSayHello(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::HelloRequest,::milvus::grpc::HelloReply>* server_unary_streamer) = 0;
|
||||
};
|
||||
typedef WithStreamedUnaryMethod_SayHello<Service > StreamedUnaryService;
|
||||
typedef Service SplitStreamedService;
|
||||
typedef WithStreamedUnaryMethod_SayHello<Service > StreamedService;
|
||||
};
|
||||
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
|
||||
|
||||
#endif // GRPC_hello_2eproto__INCLUDED
|
|
@ -0,0 +1,664 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: hello.proto
|
||||
|
||||
#include "hello.pb.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/extension_set.h>
|
||||
#include <google/protobuf/wire_format_lite.h>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/reflection_ops.h>
|
||||
#include <google/protobuf/wire_format.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
class HelloRequestDefaultTypeInternal {
|
||||
public:
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<HelloRequest> _instance;
|
||||
} _HelloRequest_default_instance_;
|
||||
class HelloReplyDefaultTypeInternal {
|
||||
public:
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<HelloReply> _instance;
|
||||
} _HelloReply_default_instance_;
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
static void InitDefaultsscc_info_HelloReply_hello_2eproto() {
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
|
||||
{
|
||||
void* ptr = &::milvus::grpc::_HelloReply_default_instance_;
|
||||
new (ptr) ::milvus::grpc::HelloReply();
|
||||
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
|
||||
}
|
||||
::milvus::grpc::HelloReply::InitAsDefaultInstance();
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_HelloReply_hello_2eproto =
|
||||
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_HelloReply_hello_2eproto}, {}};
|
||||
|
||||
static void InitDefaultsscc_info_HelloRequest_hello_2eproto() {
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
|
||||
{
|
||||
void* ptr = &::milvus::grpc::_HelloRequest_default_instance_;
|
||||
new (ptr) ::milvus::grpc::HelloRequest();
|
||||
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
|
||||
}
|
||||
::milvus::grpc::HelloRequest::InitAsDefaultInstance();
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_HelloRequest_hello_2eproto =
|
||||
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_HelloRequest_hello_2eproto}, {}};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_hello_2eproto[2];
|
||||
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_hello_2eproto = nullptr;
|
||||
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_hello_2eproto = nullptr;
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_hello_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::HelloRequest, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::HelloRequest, name_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::HelloReply, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::HelloReply, msg_),
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, sizeof(::milvus::grpc::HelloRequest)},
|
||||
{ 6, -1, sizeof(::milvus::grpc::HelloReply)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::grpc::_HelloRequest_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::grpc::_HelloReply_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_hello_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
"\n\013hello.proto\022\013milvus.grpc\"\034\n\014HelloReque"
|
||||
"st\022\014\n\004name\030\001 \001(\t\"\031\n\nHelloReply\022\013\n\003msg\030\001 "
|
||||
"\001(\t2P\n\014HelloService\022@\n\010SayHello\022\031.milvus"
|
||||
".grpc.HelloRequest\032\027.milvus.grpc.HelloRe"
|
||||
"ply\"\000b\006proto3"
|
||||
;
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_hello_2eproto_deps[1] = {
|
||||
};
|
||||
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_hello_2eproto_sccs[2] = {
|
||||
&scc_info_HelloReply_hello_2eproto.base,
|
||||
&scc_info_HelloRequest_hello_2eproto.base,
|
||||
};
|
||||
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_hello_2eproto_once;
|
||||
static bool descriptor_table_hello_2eproto_initialized = false;
|
||||
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_hello_2eproto = {
|
||||
&descriptor_table_hello_2eproto_initialized, descriptor_table_protodef_hello_2eproto, "hello.proto", 173,
|
||||
&descriptor_table_hello_2eproto_once, descriptor_table_hello_2eproto_sccs, descriptor_table_hello_2eproto_deps, 2, 0,
|
||||
schemas, file_default_instances, TableStruct_hello_2eproto::offsets,
|
||||
file_level_metadata_hello_2eproto, 2, file_level_enum_descriptors_hello_2eproto, file_level_service_descriptors_hello_2eproto,
|
||||
};
|
||||
|
||||
// Force running AddDescriptors() at dynamic initialization time.
|
||||
static bool dynamic_init_dummy_hello_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_hello_2eproto), true);
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
|
||||
// ===================================================================
|
||||
|
||||
void HelloRequest::InitAsDefaultInstance() {
|
||||
}
|
||||
class HelloRequest::_Internal {
|
||||
public:
|
||||
};
|
||||
|
||||
HelloRequest::HelloRequest()
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
|
||||
SharedCtor();
|
||||
// @@protoc_insertion_point(constructor:milvus.grpc.HelloRequest)
|
||||
}
|
||||
HelloRequest::HelloRequest(const HelloRequest& from)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(),
|
||||
_internal_metadata_(nullptr) {
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
if (!from.name().empty()) {
|
||||
name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
|
||||
}
|
||||
// @@protoc_insertion_point(copy_constructor:milvus.grpc.HelloRequest)
|
||||
}
|
||||
|
||||
void HelloRequest::SharedCtor() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_HelloRequest_hello_2eproto.base);
|
||||
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
|
||||
HelloRequest::~HelloRequest() {
|
||||
// @@protoc_insertion_point(destructor:milvus.grpc.HelloRequest)
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
void HelloRequest::SharedDtor() {
|
||||
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
|
||||
void HelloRequest::SetCachedSize(int size) const {
|
||||
_cached_size_.Set(size);
|
||||
}
|
||||
const HelloRequest& HelloRequest::default_instance() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_HelloRequest_hello_2eproto.base);
|
||||
return *internal_default_instance();
|
||||
}
|
||||
|
||||
|
||||
void HelloRequest::Clear() {
|
||||
// @@protoc_insertion_point(message_clear_start:milvus.grpc.HelloRequest)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
_internal_metadata_.Clear();
|
||||
}
|
||||
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* HelloRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
|
||||
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||||
while (!ctx->Done(&ptr)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
|
||||
CHK_(ptr);
|
||||
switch (tag >> 3) {
|
||||
// string name = 1;
|
||||
case 1:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "milvus.grpc.HelloRequest.name");
|
||||
CHK_(ptr);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
default: {
|
||||
handle_unusual:
|
||||
if ((tag & 7) == 4 || tag == 0) {
|
||||
ctx->SetLastTag(tag);
|
||||
goto success;
|
||||
}
|
||||
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
|
||||
CHK_(ptr != nullptr);
|
||||
continue;
|
||||
}
|
||||
} // switch
|
||||
} // while
|
||||
success:
|
||||
return ptr;
|
||||
failure:
|
||||
ptr = nullptr;
|
||||
goto success;
|
||||
#undef CHK_
|
||||
}
|
||||
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
bool HelloRequest::MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
|
||||
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
||||
// @@protoc_insertion_point(parse_start:milvus.grpc.HelloRequest)
|
||||
for (;;) {
|
||||
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
||||
tag = p.first;
|
||||
if (!p.second) goto handle_unusual;
|
||||
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
||||
// string name = 1;
|
||||
case 1: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
||||
input, this->mutable_name()));
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->name().data(), static_cast<int>(this->name().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
||||
"milvus.grpc.HelloRequest.name"));
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
handle_unusual:
|
||||
if (tag == 0) {
|
||||
goto success;
|
||||
}
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
|
||||
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
success:
|
||||
// @@protoc_insertion_point(parse_success:milvus.grpc.HelloRequest)
|
||||
return true;
|
||||
failure:
|
||||
// @@protoc_insertion_point(parse_failure:milvus.grpc.HelloRequest)
|
||||
return false;
|
||||
#undef DO_
|
||||
}
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
|
||||
void HelloRequest::SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
|
||||
// @@protoc_insertion_point(serialize_start:milvus.grpc.HelloRequest)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string name = 1;
|
||||
if (this->name().size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->name().data(), static_cast<int>(this->name().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"milvus.grpc.HelloRequest.name");
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
|
||||
1, this->name(), output);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
|
||||
_internal_metadata_.unknown_fields(), output);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_end:milvus.grpc.HelloRequest)
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* HelloRequest::InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
|
||||
// @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.HelloRequest)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string name = 1;
|
||||
if (this->name().size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->name().data(), static_cast<int>(this->name().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"milvus.grpc.HelloRequest.name");
|
||||
target =
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
|
||||
1, this->name(), target);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
|
||||
_internal_metadata_.unknown_fields(), target);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.HelloRequest)
|
||||
return target;
|
||||
}
|
||||
|
||||
size_t HelloRequest::ByteSizeLong() const {
|
||||
// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.HelloRequest)
|
||||
size_t total_size = 0;
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
total_size +=
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
|
||||
_internal_metadata_.unknown_fields());
|
||||
}
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string name = 1;
|
||||
if (this->name().size() > 0) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
this->name());
|
||||
}
|
||||
|
||||
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
|
||||
SetCachedSize(cached_size);
|
||||
return total_size;
|
||||
}
|
||||
|
||||
void HelloRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.HelloRequest)
|
||||
GOOGLE_DCHECK_NE(&from, this);
|
||||
const HelloRequest* source =
|
||||
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<HelloRequest>(
|
||||
&from);
|
||||
if (source == nullptr) {
|
||||
// @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.HelloRequest)
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
|
||||
} else {
|
||||
// @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.HelloRequest)
|
||||
MergeFrom(*source);
|
||||
}
|
||||
}
|
||||
|
||||
void HelloRequest::MergeFrom(const HelloRequest& from) {
|
||||
// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.HelloRequest)
|
||||
GOOGLE_DCHECK_NE(&from, this);
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
if (from.name().size() > 0) {
|
||||
|
||||
name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
|
||||
}
|
||||
}
|
||||
|
||||
void HelloRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.HelloRequest)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
void HelloRequest::CopyFrom(const HelloRequest& from) {
|
||||
// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.HelloRequest)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool HelloRequest::IsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void HelloRequest::InternalSwap(HelloRequest* other) {
|
||||
using std::swap;
|
||||
_internal_metadata_.Swap(&other->_internal_metadata_);
|
||||
name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
GetArenaNoVirtual());
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata HelloRequest::GetMetadata() const {
|
||||
return GetMetadataStatic();
|
||||
}
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
void HelloReply::InitAsDefaultInstance() {
|
||||
}
|
||||
class HelloReply::_Internal {
|
||||
public:
|
||||
};
|
||||
|
||||
HelloReply::HelloReply()
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
|
||||
SharedCtor();
|
||||
// @@protoc_insertion_point(constructor:milvus.grpc.HelloReply)
|
||||
}
|
||||
HelloReply::HelloReply(const HelloReply& from)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(),
|
||||
_internal_metadata_(nullptr) {
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
msg_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
if (!from.msg().empty()) {
|
||||
msg_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.msg_);
|
||||
}
|
||||
// @@protoc_insertion_point(copy_constructor:milvus.grpc.HelloReply)
|
||||
}
|
||||
|
||||
void HelloReply::SharedCtor() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_HelloReply_hello_2eproto.base);
|
||||
msg_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
|
||||
HelloReply::~HelloReply() {
|
||||
// @@protoc_insertion_point(destructor:milvus.grpc.HelloReply)
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
void HelloReply::SharedDtor() {
|
||||
msg_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
|
||||
void HelloReply::SetCachedSize(int size) const {
|
||||
_cached_size_.Set(size);
|
||||
}
|
||||
const HelloReply& HelloReply::default_instance() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_HelloReply_hello_2eproto.base);
|
||||
return *internal_default_instance();
|
||||
}
|
||||
|
||||
|
||||
void HelloReply::Clear() {
|
||||
// @@protoc_insertion_point(message_clear_start:milvus.grpc.HelloReply)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
msg_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
_internal_metadata_.Clear();
|
||||
}
|
||||
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* HelloReply::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
|
||||
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||||
while (!ctx->Done(&ptr)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
|
||||
CHK_(ptr);
|
||||
switch (tag >> 3) {
|
||||
// string msg = 1;
|
||||
case 1:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_msg(), ptr, ctx, "milvus.grpc.HelloReply.msg");
|
||||
CHK_(ptr);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
default: {
|
||||
handle_unusual:
|
||||
if ((tag & 7) == 4 || tag == 0) {
|
||||
ctx->SetLastTag(tag);
|
||||
goto success;
|
||||
}
|
||||
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
|
||||
CHK_(ptr != nullptr);
|
||||
continue;
|
||||
}
|
||||
} // switch
|
||||
} // while
|
||||
success:
|
||||
return ptr;
|
||||
failure:
|
||||
ptr = nullptr;
|
||||
goto success;
|
||||
#undef CHK_
|
||||
}
|
||||
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
bool HelloReply::MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
|
||||
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
||||
// @@protoc_insertion_point(parse_start:milvus.grpc.HelloReply)
|
||||
for (;;) {
|
||||
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
||||
tag = p.first;
|
||||
if (!p.second) goto handle_unusual;
|
||||
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
||||
// string msg = 1;
|
||||
case 1: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
||||
input, this->mutable_msg()));
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->msg().data(), static_cast<int>(this->msg().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
||||
"milvus.grpc.HelloReply.msg"));
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
handle_unusual:
|
||||
if (tag == 0) {
|
||||
goto success;
|
||||
}
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
|
||||
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
success:
|
||||
// @@protoc_insertion_point(parse_success:milvus.grpc.HelloReply)
|
||||
return true;
|
||||
failure:
|
||||
// @@protoc_insertion_point(parse_failure:milvus.grpc.HelloReply)
|
||||
return false;
|
||||
#undef DO_
|
||||
}
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
|
||||
void HelloReply::SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
|
||||
// @@protoc_insertion_point(serialize_start:milvus.grpc.HelloReply)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string msg = 1;
|
||||
if (this->msg().size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->msg().data(), static_cast<int>(this->msg().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"milvus.grpc.HelloReply.msg");
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
|
||||
1, this->msg(), output);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
|
||||
_internal_metadata_.unknown_fields(), output);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_end:milvus.grpc.HelloReply)
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* HelloReply::InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
|
||||
// @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.HelloReply)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string msg = 1;
|
||||
if (this->msg().size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->msg().data(), static_cast<int>(this->msg().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"milvus.grpc.HelloReply.msg");
|
||||
target =
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
|
||||
1, this->msg(), target);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
|
||||
_internal_metadata_.unknown_fields(), target);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.HelloReply)
|
||||
return target;
|
||||
}
|
||||
|
||||
size_t HelloReply::ByteSizeLong() const {
|
||||
// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.HelloReply)
|
||||
size_t total_size = 0;
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
total_size +=
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
|
||||
_internal_metadata_.unknown_fields());
|
||||
}
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string msg = 1;
|
||||
if (this->msg().size() > 0) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
this->msg());
|
||||
}
|
||||
|
||||
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
|
||||
SetCachedSize(cached_size);
|
||||
return total_size;
|
||||
}
|
||||
|
||||
void HelloReply::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.HelloReply)
|
||||
GOOGLE_DCHECK_NE(&from, this);
|
||||
const HelloReply* source =
|
||||
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<HelloReply>(
|
||||
&from);
|
||||
if (source == nullptr) {
|
||||
// @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.HelloReply)
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
|
||||
} else {
|
||||
// @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.HelloReply)
|
||||
MergeFrom(*source);
|
||||
}
|
||||
}
|
||||
|
||||
void HelloReply::MergeFrom(const HelloReply& from) {
|
||||
// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.HelloReply)
|
||||
GOOGLE_DCHECK_NE(&from, this);
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
if (from.msg().size() > 0) {
|
||||
|
||||
msg_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.msg_);
|
||||
}
|
||||
}
|
||||
|
||||
void HelloReply::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.HelloReply)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
void HelloReply::CopyFrom(const HelloReply& from) {
|
||||
// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.HelloReply)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool HelloReply::IsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void HelloReply::InternalSwap(HelloReply* other) {
|
||||
using std::swap;
|
||||
_internal_metadata_.Swap(&other->_internal_metadata_);
|
||||
msg_.Swap(&other->msg_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
GetArenaNoVirtual());
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata HelloReply::GetMetadata() const {
|
||||
return GetMetadataStatic();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE ::milvus::grpc::HelloRequest* Arena::CreateMaybeMessage< ::milvus::grpc::HelloRequest >(Arena* arena) {
|
||||
return Arena::CreateInternal< ::milvus::grpc::HelloRequest >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE ::milvus::grpc::HelloReply* Arena::CreateMaybeMessage< ::milvus::grpc::HelloReply >(Arena* arena) {
|
||||
return Arena::CreateInternal< ::milvus::grpc::HelloReply >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
#include <google/protobuf/port_undef.inc>
|
|
@ -0,0 +1,479 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: hello.proto
|
||||
|
||||
#ifndef GOOGLE_PROTOBUF_INCLUDED_hello_2eproto
|
||||
#define GOOGLE_PROTOBUF_INCLUDED_hello_2eproto
|
||||
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
#include <google/protobuf/port_def.inc>
|
||||
#if PROTOBUF_VERSION < 3009000
|
||||
#error This file was generated by a newer version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please update
|
||||
#error your headers.
|
||||
#endif
|
||||
#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
|
||||
#error This file was generated by an older version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please
|
||||
#error regenerate this file with a newer version of protoc.
|
||||
#endif
|
||||
|
||||
#include <google/protobuf/port_undef.inc>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/arena.h>
|
||||
#include <google/protobuf/arenastring.h>
|
||||
#include <google/protobuf/generated_message_table_driven.h>
|
||||
#include <google/protobuf/generated_message_util.h>
|
||||
#include <google/protobuf/inlined_string_field.h>
|
||||
#include <google/protobuf/metadata.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
|
||||
#include <google/protobuf/extension_set.h> // IWYU pragma: export
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
#define PROTOBUF_INTERNAL_EXPORT_hello_2eproto
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
namespace internal {
|
||||
class AnyMetadata;
|
||||
} // namespace internal
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
// Internal implementation detail -- do not use these members.
|
||||
struct TableStruct_hello_2eproto {
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
|
||||
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
|
||||
};
|
||||
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_hello_2eproto;
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
class HelloReply;
|
||||
class HelloReplyDefaultTypeInternal;
|
||||
extern HelloReplyDefaultTypeInternal _HelloReply_default_instance_;
|
||||
class HelloRequest;
|
||||
class HelloRequestDefaultTypeInternal;
|
||||
extern HelloRequestDefaultTypeInternal _HelloRequest_default_instance_;
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> ::milvus::grpc::HelloReply* Arena::CreateMaybeMessage<::milvus::grpc::HelloReply>(Arena*);
|
||||
template<> ::milvus::grpc::HelloRequest* Arena::CreateMaybeMessage<::milvus::grpc::HelloRequest>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
namespace milvus {
|
||||
namespace grpc {
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class HelloRequest :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.HelloRequest) */ {
|
||||
public:
|
||||
HelloRequest();
|
||||
virtual ~HelloRequest();
|
||||
|
||||
HelloRequest(const HelloRequest& from);
|
||||
HelloRequest(HelloRequest&& from) noexcept
|
||||
: HelloRequest() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline HelloRequest& operator=(const HelloRequest& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline HelloRequest& operator=(HelloRequest&& from) noexcept {
|
||||
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
|
||||
if (this != &from) InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
|
||||
return GetDescriptor();
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
|
||||
return GetMetadataStatic().descriptor;
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
|
||||
return GetMetadataStatic().reflection;
|
||||
}
|
||||
static const HelloRequest& default_instance();
|
||||
|
||||
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
|
||||
static inline const HelloRequest* internal_default_instance() {
|
||||
return reinterpret_cast<const HelloRequest*>(
|
||||
&_HelloRequest_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
0;
|
||||
|
||||
friend void swap(HelloRequest& a, HelloRequest& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(HelloRequest* other) {
|
||||
if (other == this) return;
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
inline HelloRequest* New() const final {
|
||||
return CreateMaybeMessage<HelloRequest>(nullptr);
|
||||
}
|
||||
|
||||
HelloRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
|
||||
return CreateMaybeMessage<HelloRequest>(arena);
|
||||
}
|
||||
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void CopyFrom(const HelloRequest& from);
|
||||
void MergeFrom(const HelloRequest& from);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final;
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
void SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
|
||||
int GetCachedSize() const final { return _cached_size_.Get(); }
|
||||
|
||||
private:
|
||||
inline void SharedCtor();
|
||||
inline void SharedDtor();
|
||||
void SetCachedSize(int size) const final;
|
||||
void InternalSwap(HelloRequest* other);
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "milvus.grpc.HelloRequest";
|
||||
}
|
||||
private:
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
|
||||
return nullptr;
|
||||
}
|
||||
inline void* MaybeArenaPtr() const {
|
||||
return nullptr;
|
||||
}
|
||||
public:
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||
private:
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_hello_2eproto);
|
||||
return ::descriptor_table_hello_2eproto.file_level_metadata[kIndexInFileMessages];
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kNameFieldNumber = 1,
|
||||
};
|
||||
// string name = 1;
|
||||
void clear_name();
|
||||
const std::string& name() const;
|
||||
void set_name(const std::string& value);
|
||||
void set_name(std::string&& value);
|
||||
void set_name(const char* value);
|
||||
void set_name(const char* value, size_t size);
|
||||
std::string* mutable_name();
|
||||
std::string* release_name();
|
||||
void set_allocated_name(std::string* name);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:milvus.grpc.HelloRequest)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_hello_2eproto;
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class HelloReply :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.HelloReply) */ {
|
||||
public:
|
||||
HelloReply();
|
||||
virtual ~HelloReply();
|
||||
|
||||
HelloReply(const HelloReply& from);
|
||||
HelloReply(HelloReply&& from) noexcept
|
||||
: HelloReply() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline HelloReply& operator=(const HelloReply& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline HelloReply& operator=(HelloReply&& from) noexcept {
|
||||
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
|
||||
if (this != &from) InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
|
||||
return GetDescriptor();
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
|
||||
return GetMetadataStatic().descriptor;
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
|
||||
return GetMetadataStatic().reflection;
|
||||
}
|
||||
static const HelloReply& default_instance();
|
||||
|
||||
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
|
||||
static inline const HelloReply* internal_default_instance() {
|
||||
return reinterpret_cast<const HelloReply*>(
|
||||
&_HelloReply_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
1;
|
||||
|
||||
friend void swap(HelloReply& a, HelloReply& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(HelloReply* other) {
|
||||
if (other == this) return;
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
inline HelloReply* New() const final {
|
||||
return CreateMaybeMessage<HelloReply>(nullptr);
|
||||
}
|
||||
|
||||
HelloReply* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
|
||||
return CreateMaybeMessage<HelloReply>(arena);
|
||||
}
|
||||
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void CopyFrom(const HelloReply& from);
|
||||
void MergeFrom(const HelloReply& from);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final;
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
void SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
|
||||
int GetCachedSize() const final { return _cached_size_.Get(); }
|
||||
|
||||
private:
|
||||
inline void SharedCtor();
|
||||
inline void SharedDtor();
|
||||
void SetCachedSize(int size) const final;
|
||||
void InternalSwap(HelloReply* other);
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "milvus.grpc.HelloReply";
|
||||
}
|
||||
private:
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
|
||||
return nullptr;
|
||||
}
|
||||
inline void* MaybeArenaPtr() const {
|
||||
return nullptr;
|
||||
}
|
||||
public:
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||
private:
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_hello_2eproto);
|
||||
return ::descriptor_table_hello_2eproto.file_level_metadata[kIndexInFileMessages];
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kMsgFieldNumber = 1,
|
||||
};
|
||||
// string msg = 1;
|
||||
void clear_msg();
|
||||
const std::string& msg() const;
|
||||
void set_msg(const std::string& value);
|
||||
void set_msg(std::string&& value);
|
||||
void set_msg(const char* value);
|
||||
void set_msg(const char* value, size_t size);
|
||||
std::string* mutable_msg();
|
||||
std::string* release_msg();
|
||||
void set_allocated_msg(std::string* msg);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:milvus.grpc.HelloReply)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr msg_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_hello_2eproto;
|
||||
};
|
||||
// ===================================================================
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#endif // __GNUC__
|
||||
// HelloRequest
|
||||
|
||||
// string name = 1;
|
||||
inline void HelloRequest::clear_name() {
|
||||
name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline const std::string& HelloRequest::name() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.HelloRequest.name)
|
||||
return name_.GetNoArena();
|
||||
}
|
||||
inline void HelloRequest::set_name(const std::string& value) {
|
||||
|
||||
name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.HelloRequest.name)
|
||||
}
|
||||
inline void HelloRequest::set_name(std::string&& value) {
|
||||
|
||||
name_.SetNoArena(
|
||||
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
||||
// @@protoc_insertion_point(field_set_rvalue:milvus.grpc.HelloRequest.name)
|
||||
}
|
||||
inline void HelloRequest::set_name(const char* value) {
|
||||
GOOGLE_DCHECK(value != nullptr);
|
||||
|
||||
name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
||||
// @@protoc_insertion_point(field_set_char:milvus.grpc.HelloRequest.name)
|
||||
}
|
||||
inline void HelloRequest::set_name(const char* value, size_t size) {
|
||||
|
||||
name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
::std::string(reinterpret_cast<const char*>(value), size));
|
||||
// @@protoc_insertion_point(field_set_pointer:milvus.grpc.HelloRequest.name)
|
||||
}
|
||||
inline std::string* HelloRequest::mutable_name() {
|
||||
|
||||
// @@protoc_insertion_point(field_mutable:milvus.grpc.HelloRequest.name)
|
||||
return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline std::string* HelloRequest::release_name() {
|
||||
// @@protoc_insertion_point(field_release:milvus.grpc.HelloRequest.name)
|
||||
|
||||
return name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline void HelloRequest::set_allocated_name(std::string* name) {
|
||||
if (name != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name);
|
||||
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.HelloRequest.name)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// HelloReply
|
||||
|
||||
// string msg = 1;
|
||||
inline void HelloReply::clear_msg() {
|
||||
msg_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline const std::string& HelloReply::msg() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.HelloReply.msg)
|
||||
return msg_.GetNoArena();
|
||||
}
|
||||
inline void HelloReply::set_msg(const std::string& value) {
|
||||
|
||||
msg_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.HelloReply.msg)
|
||||
}
|
||||
inline void HelloReply::set_msg(std::string&& value) {
|
||||
|
||||
msg_.SetNoArena(
|
||||
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
||||
// @@protoc_insertion_point(field_set_rvalue:milvus.grpc.HelloReply.msg)
|
||||
}
|
||||
inline void HelloReply::set_msg(const char* value) {
|
||||
GOOGLE_DCHECK(value != nullptr);
|
||||
|
||||
msg_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
||||
// @@protoc_insertion_point(field_set_char:milvus.grpc.HelloReply.msg)
|
||||
}
|
||||
inline void HelloReply::set_msg(const char* value, size_t size) {
|
||||
|
||||
msg_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
::std::string(reinterpret_cast<const char*>(value), size));
|
||||
// @@protoc_insertion_point(field_set_pointer:milvus.grpc.HelloReply.msg)
|
||||
}
|
||||
inline std::string* HelloReply::mutable_msg() {
|
||||
|
||||
// @@protoc_insertion_point(field_mutable:milvus.grpc.HelloReply.msg)
|
||||
return msg_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline std::string* HelloReply::release_msg() {
|
||||
// @@protoc_insertion_point(field_release:milvus.grpc.HelloReply.msg)
|
||||
|
||||
return msg_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline void HelloReply::set_allocated_msg(std::string* msg) {
|
||||
if (msg != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
msg_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), msg);
|
||||
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.HelloReply.msg)
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // __GNUC__
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
} // namespace grpc
|
||||
} // namespace milvus
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
|
||||
#include <google/protobuf/port_undef.inc>
|
||||
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_hello_2eproto
|
|
@ -0,0 +1,125 @@
|
|||
// Generated by the gRPC C++ plugin.
|
||||
// If you make any local change, they will be lost.
|
||||
// source: master.proto
|
||||
|
||||
#include "master.pb.h"
|
||||
#include "master.grpc.pb.h"
|
||||
|
||||
#include <functional>
|
||||
#include <grpcpp/impl/codegen/async_stream.h>
|
||||
#include <grpcpp/impl/codegen/async_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/channel_interface.h>
|
||||
#include <grpcpp/impl/codegen/client_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/client_callback.h>
|
||||
#include <grpcpp/impl/codegen/method_handler_impl.h>
|
||||
#include <grpcpp/impl/codegen/rpc_service_method.h>
|
||||
#include <grpcpp/impl/codegen/server_callback.h>
|
||||
#include <grpcpp/impl/codegen/service_type.h>
|
||||
#include <grpcpp/impl/codegen/sync_stream.h>
|
||||
namespace master {
|
||||
|
||||
static const char* Greeter_method_names[] = {
|
||||
"/master.Greeter/ReportAddress",
|
||||
"/master.Greeter/GetAddress",
|
||||
};
|
||||
|
||||
std::unique_ptr< Greeter::Stub> Greeter::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
|
||||
(void)options;
|
||||
std::unique_ptr< Greeter::Stub> stub(new Greeter::Stub(channel));
|
||||
return stub;
|
||||
}
|
||||
|
||||
Greeter::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
|
||||
: channel_(channel), rpcmethod_ReportAddress_(Greeter_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GetAddress_(Greeter_method_names[1], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
{}
|
||||
|
||||
::grpc::Status Greeter::Stub::ReportAddress(::grpc::ClientContext* context, const ::master::Request& request, ::master::Reply* response) {
|
||||
return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_ReportAddress_, context, request, response);
|
||||
}
|
||||
|
||||
void Greeter::Stub::experimental_async::ReportAddress(::grpc::ClientContext* context, const ::master::Request* request, ::master::Reply* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ReportAddress_, context, request, response, std::move(f));
|
||||
}
|
||||
|
||||
void Greeter::Stub::experimental_async::ReportAddress(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::master::Reply* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ReportAddress_, context, request, response, std::move(f));
|
||||
}
|
||||
|
||||
void Greeter::Stub::experimental_async::ReportAddress(::grpc::ClientContext* context, const ::master::Request* request, ::master::Reply* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
|
||||
::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ReportAddress_, context, request, response, reactor);
|
||||
}
|
||||
|
||||
void Greeter::Stub::experimental_async::ReportAddress(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::master::Reply* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
|
||||
::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ReportAddress_, context, request, response, reactor);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::master::Reply>* Greeter::Stub::AsyncReportAddressRaw(::grpc::ClientContext* context, const ::master::Request& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::master::Reply>::Create(channel_.get(), cq, rpcmethod_ReportAddress_, context, request, true);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::master::Reply>* Greeter::Stub::PrepareAsyncReportAddressRaw(::grpc::ClientContext* context, const ::master::Request& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::master::Reply>::Create(channel_.get(), cq, rpcmethod_ReportAddress_, context, request, false);
|
||||
}
|
||||
|
||||
::grpc::Status Greeter::Stub::GetAddress(::grpc::ClientContext* context, const ::master::EmptyRequest& request, ::master::Request* response) {
|
||||
return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_GetAddress_, context, request, response);
|
||||
}
|
||||
|
||||
void Greeter::Stub::experimental_async::GetAddress(::grpc::ClientContext* context, const ::master::EmptyRequest* request, ::master::Request* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_GetAddress_, context, request, response, std::move(f));
|
||||
}
|
||||
|
||||
void Greeter::Stub::experimental_async::GetAddress(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::master::Request* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_GetAddress_, context, request, response, std::move(f));
|
||||
}
|
||||
|
||||
void Greeter::Stub::experimental_async::GetAddress(::grpc::ClientContext* context, const ::master::EmptyRequest* request, ::master::Request* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
|
||||
::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_GetAddress_, context, request, response, reactor);
|
||||
}
|
||||
|
||||
void Greeter::Stub::experimental_async::GetAddress(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::master::Request* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
|
||||
::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_GetAddress_, context, request, response, reactor);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::master::Request>* Greeter::Stub::AsyncGetAddressRaw(::grpc::ClientContext* context, const ::master::EmptyRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::master::Request>::Create(channel_.get(), cq, rpcmethod_GetAddress_, context, request, true);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::master::Request>* Greeter::Stub::PrepareAsyncGetAddressRaw(::grpc::ClientContext* context, const ::master::EmptyRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::master::Request>::Create(channel_.get(), cq, rpcmethod_GetAddress_, context, request, false);
|
||||
}
|
||||
|
||||
Greeter::Service::Service() {
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Greeter_method_names[0],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< Greeter::Service, ::master::Request, ::master::Reply>(
|
||||
std::mem_fn(&Greeter::Service::ReportAddress), this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Greeter_method_names[1],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< Greeter::Service, ::master::EmptyRequest, ::master::Request>(
|
||||
std::mem_fn(&Greeter::Service::GetAddress), this)));
|
||||
}
|
||||
|
||||
Greeter::Service::~Service() {
|
||||
}
|
||||
|
||||
::grpc::Status Greeter::Service::ReportAddress(::grpc::ServerContext* context, const ::master::Request* request, ::master::Reply* response) {
|
||||
(void) context;
|
||||
(void) request;
|
||||
(void) response;
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
::grpc::Status Greeter::Service::GetAddress(::grpc::ServerContext* context, const ::master::EmptyRequest* request, ::master::Request* response) {
|
||||
(void) context;
|
||||
(void) request;
|
||||
(void) response;
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
|
||||
} // namespace master
|
||||
|
|
@ -0,0 +1,420 @@
|
|||
// Generated by the gRPC C++ plugin.
|
||||
// If you make any local change, they will be lost.
|
||||
// source: master.proto
|
||||
#ifndef GRPC_master_2eproto__INCLUDED
|
||||
#define GRPC_master_2eproto__INCLUDED
|
||||
|
||||
#include "master.pb.h"
|
||||
|
||||
#include <functional>
|
||||
#include <grpcpp/impl/codegen/async_generic_service.h>
|
||||
#include <grpcpp/impl/codegen/async_stream.h>
|
||||
#include <grpcpp/impl/codegen/async_unary_call.h>
|
||||
#include <grpcpp/impl/codegen/client_callback.h>
|
||||
#include <grpcpp/impl/codegen/client_context.h>
|
||||
#include <grpcpp/impl/codegen/completion_queue.h>
|
||||
#include <grpcpp/impl/codegen/method_handler_impl.h>
|
||||
#include <grpcpp/impl/codegen/proto_utils.h>
|
||||
#include <grpcpp/impl/codegen/rpc_method.h>
|
||||
#include <grpcpp/impl/codegen/server_callback.h>
|
||||
#include <grpcpp/impl/codegen/server_context.h>
|
||||
#include <grpcpp/impl/codegen/service_type.h>
|
||||
#include <grpcpp/impl/codegen/status.h>
|
||||
#include <grpcpp/impl/codegen/stub_options.h>
|
||||
#include <grpcpp/impl/codegen/sync_stream.h>
|
||||
|
||||
namespace grpc_impl {
|
||||
class CompletionQueue;
|
||||
class ServerCompletionQueue;
|
||||
class ServerContext;
|
||||
} // namespace grpc_impl
|
||||
|
||||
namespace grpc {
|
||||
namespace experimental {
|
||||
template <typename RequestT, typename ResponseT>
|
||||
class MessageAllocator;
|
||||
} // namespace experimental
|
||||
} // namespace grpc
|
||||
|
||||
namespace master {
|
||||
|
||||
// The greeting service definition.
|
||||
class Greeter final {
|
||||
public:
|
||||
static constexpr char const* service_full_name() {
|
||||
return "master.Greeter";
|
||||
}
|
||||
class StubInterface {
|
||||
public:
|
||||
virtual ~StubInterface() {}
|
||||
// receive a grpc_server address and set to etcd.
|
||||
virtual ::grpc::Status ReportAddress(::grpc::ClientContext* context, const ::master::Request& request, ::master::Reply* response) = 0;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::master::Reply>> AsyncReportAddress(::grpc::ClientContext* context, const ::master::Request& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::master::Reply>>(AsyncReportAddressRaw(context, request, cq));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::master::Reply>> PrepareAsyncReportAddress(::grpc::ClientContext* context, const ::master::Request& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::master::Reply>>(PrepareAsyncReportAddressRaw(context, request, cq));
|
||||
}
|
||||
// send a grpc_server address to client
|
||||
virtual ::grpc::Status GetAddress(::grpc::ClientContext* context, const ::master::EmptyRequest& request, ::master::Request* response) = 0;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::master::Request>> AsyncGetAddress(::grpc::ClientContext* context, const ::master::EmptyRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::master::Request>>(AsyncGetAddressRaw(context, request, cq));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::master::Request>> PrepareAsyncGetAddress(::grpc::ClientContext* context, const ::master::EmptyRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::master::Request>>(PrepareAsyncGetAddressRaw(context, request, cq));
|
||||
}
|
||||
class experimental_async_interface {
|
||||
public:
|
||||
virtual ~experimental_async_interface() {}
|
||||
// receive a grpc_server address and set to etcd.
|
||||
virtual void ReportAddress(::grpc::ClientContext* context, const ::master::Request* request, ::master::Reply* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void ReportAddress(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::master::Reply* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void ReportAddress(::grpc::ClientContext* context, const ::master::Request* request, ::master::Reply* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
|
||||
virtual void ReportAddress(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::master::Reply* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
|
||||
// send a grpc_server address to client
|
||||
virtual void GetAddress(::grpc::ClientContext* context, const ::master::EmptyRequest* request, ::master::Request* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void GetAddress(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::master::Request* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void GetAddress(::grpc::ClientContext* context, const ::master::EmptyRequest* request, ::master::Request* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
|
||||
virtual void GetAddress(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::master::Request* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
|
||||
};
|
||||
virtual class experimental_async_interface* experimental_async() { return nullptr; }
|
||||
private:
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::master::Reply>* AsyncReportAddressRaw(::grpc::ClientContext* context, const ::master::Request& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::master::Reply>* PrepareAsyncReportAddressRaw(::grpc::ClientContext* context, const ::master::Request& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::master::Request>* AsyncGetAddressRaw(::grpc::ClientContext* context, const ::master::EmptyRequest& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::master::Request>* PrepareAsyncGetAddressRaw(::grpc::ClientContext* context, const ::master::EmptyRequest& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
};
|
||||
class Stub final : public StubInterface {
|
||||
public:
|
||||
Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
|
||||
::grpc::Status ReportAddress(::grpc::ClientContext* context, const ::master::Request& request, ::master::Reply* response) override;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::master::Reply>> AsyncReportAddress(::grpc::ClientContext* context, const ::master::Request& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::master::Reply>>(AsyncReportAddressRaw(context, request, cq));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::master::Reply>> PrepareAsyncReportAddress(::grpc::ClientContext* context, const ::master::Request& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::master::Reply>>(PrepareAsyncReportAddressRaw(context, request, cq));
|
||||
}
|
||||
::grpc::Status GetAddress(::grpc::ClientContext* context, const ::master::EmptyRequest& request, ::master::Request* response) override;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::master::Request>> AsyncGetAddress(::grpc::ClientContext* context, const ::master::EmptyRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::master::Request>>(AsyncGetAddressRaw(context, request, cq));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::master::Request>> PrepareAsyncGetAddress(::grpc::ClientContext* context, const ::master::EmptyRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::master::Request>>(PrepareAsyncGetAddressRaw(context, request, cq));
|
||||
}
|
||||
class experimental_async final :
|
||||
public StubInterface::experimental_async_interface {
|
||||
public:
|
||||
void ReportAddress(::grpc::ClientContext* context, const ::master::Request* request, ::master::Reply* response, std::function<void(::grpc::Status)>) override;
|
||||
void ReportAddress(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::master::Reply* response, std::function<void(::grpc::Status)>) override;
|
||||
void ReportAddress(::grpc::ClientContext* context, const ::master::Request* request, ::master::Reply* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
void ReportAddress(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::master::Reply* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
void GetAddress(::grpc::ClientContext* context, const ::master::EmptyRequest* request, ::master::Request* response, std::function<void(::grpc::Status)>) override;
|
||||
void GetAddress(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::master::Request* response, std::function<void(::grpc::Status)>) override;
|
||||
void GetAddress(::grpc::ClientContext* context, const ::master::EmptyRequest* request, ::master::Request* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
void GetAddress(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::master::Request* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
private:
|
||||
friend class Stub;
|
||||
explicit experimental_async(Stub* stub): stub_(stub) { }
|
||||
Stub* stub() { return stub_; }
|
||||
Stub* stub_;
|
||||
};
|
||||
class experimental_async_interface* experimental_async() override { return &async_stub_; }
|
||||
|
||||
private:
|
||||
std::shared_ptr< ::grpc::ChannelInterface> channel_;
|
||||
class experimental_async async_stub_{this};
|
||||
::grpc::ClientAsyncResponseReader< ::master::Reply>* AsyncReportAddressRaw(::grpc::ClientContext* context, const ::master::Request& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::master::Reply>* PrepareAsyncReportAddressRaw(::grpc::ClientContext* context, const ::master::Request& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::master::Request>* AsyncGetAddressRaw(::grpc::ClientContext* context, const ::master::EmptyRequest& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::master::Request>* PrepareAsyncGetAddressRaw(::grpc::ClientContext* context, const ::master::EmptyRequest& request, ::grpc::CompletionQueue* cq) override;
|
||||
const ::grpc::internal::RpcMethod rpcmethod_ReportAddress_;
|
||||
const ::grpc::internal::RpcMethod rpcmethod_GetAddress_;
|
||||
};
|
||||
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
|
||||
|
||||
class Service : public ::grpc::Service {
|
||||
public:
|
||||
Service();
|
||||
virtual ~Service();
|
||||
// receive a grpc_server address and set to etcd.
|
||||
virtual ::grpc::Status ReportAddress(::grpc::ServerContext* context, const ::master::Request* request, ::master::Reply* response);
|
||||
// send a grpc_server address to client
|
||||
virtual ::grpc::Status GetAddress(::grpc::ServerContext* context, const ::master::EmptyRequest* request, ::master::Request* response);
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithAsyncMethod_ReportAddress : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithAsyncMethod_ReportAddress() {
|
||||
::grpc::Service::MarkMethodAsync(0);
|
||||
}
|
||||
~WithAsyncMethod_ReportAddress() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status ReportAddress(::grpc::ServerContext* /*context*/, const ::master::Request* /*request*/, ::master::Reply* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
void RequestReportAddress(::grpc::ServerContext* context, ::master::Request* request, ::grpc::ServerAsyncResponseWriter< ::master::Reply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
|
||||
::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
|
||||
}
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithAsyncMethod_GetAddress : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithAsyncMethod_GetAddress() {
|
||||
::grpc::Service::MarkMethodAsync(1);
|
||||
}
|
||||
~WithAsyncMethod_GetAddress() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status GetAddress(::grpc::ServerContext* /*context*/, const ::master::EmptyRequest* /*request*/, ::master::Request* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
void RequestGetAddress(::grpc::ServerContext* context, ::master::EmptyRequest* request, ::grpc::ServerAsyncResponseWriter< ::master::Request>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
|
||||
::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag);
|
||||
}
|
||||
};
|
||||
typedef WithAsyncMethod_ReportAddress<WithAsyncMethod_GetAddress<Service > > AsyncService;
|
||||
template <class BaseClass>
|
||||
class ExperimentalWithCallbackMethod_ReportAddress : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
ExperimentalWithCallbackMethod_ReportAddress() {
|
||||
::grpc::Service::experimental().MarkMethodCallback(0,
|
||||
new ::grpc_impl::internal::CallbackUnaryHandler< ::master::Request, ::master::Reply>(
|
||||
[this](::grpc::ServerContext* context,
|
||||
const ::master::Request* request,
|
||||
::master::Reply* response,
|
||||
::grpc::experimental::ServerCallbackRpcController* controller) {
|
||||
return this->ReportAddress(context, request, response, controller);
|
||||
}));
|
||||
}
|
||||
void SetMessageAllocatorFor_ReportAddress(
|
||||
::grpc::experimental::MessageAllocator< ::master::Request, ::master::Reply>* allocator) {
|
||||
static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::master::Request, ::master::Reply>*>(
|
||||
::grpc::Service::experimental().GetHandler(0))
|
||||
->SetMessageAllocator(allocator);
|
||||
}
|
||||
~ExperimentalWithCallbackMethod_ReportAddress() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status ReportAddress(::grpc::ServerContext* /*context*/, const ::master::Request* /*request*/, ::master::Reply* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
virtual void ReportAddress(::grpc::ServerContext* /*context*/, const ::master::Request* /*request*/, ::master::Reply* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
|
||||
};
|
||||
template <class BaseClass>
|
||||
class ExperimentalWithCallbackMethod_GetAddress : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
ExperimentalWithCallbackMethod_GetAddress() {
|
||||
::grpc::Service::experimental().MarkMethodCallback(1,
|
||||
new ::grpc_impl::internal::CallbackUnaryHandler< ::master::EmptyRequest, ::master::Request>(
|
||||
[this](::grpc::ServerContext* context,
|
||||
const ::master::EmptyRequest* request,
|
||||
::master::Request* response,
|
||||
::grpc::experimental::ServerCallbackRpcController* controller) {
|
||||
return this->GetAddress(context, request, response, controller);
|
||||
}));
|
||||
}
|
||||
void SetMessageAllocatorFor_GetAddress(
|
||||
::grpc::experimental::MessageAllocator< ::master::EmptyRequest, ::master::Request>* allocator) {
|
||||
static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::master::EmptyRequest, ::master::Request>*>(
|
||||
::grpc::Service::experimental().GetHandler(1))
|
||||
->SetMessageAllocator(allocator);
|
||||
}
|
||||
~ExperimentalWithCallbackMethod_GetAddress() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status GetAddress(::grpc::ServerContext* /*context*/, const ::master::EmptyRequest* /*request*/, ::master::Request* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
virtual void GetAddress(::grpc::ServerContext* /*context*/, const ::master::EmptyRequest* /*request*/, ::master::Request* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
|
||||
};
|
||||
typedef ExperimentalWithCallbackMethod_ReportAddress<ExperimentalWithCallbackMethod_GetAddress<Service > > ExperimentalCallbackService;
|
||||
template <class BaseClass>
|
||||
class WithGenericMethod_ReportAddress : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithGenericMethod_ReportAddress() {
|
||||
::grpc::Service::MarkMethodGeneric(0);
|
||||
}
|
||||
~WithGenericMethod_ReportAddress() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status ReportAddress(::grpc::ServerContext* /*context*/, const ::master::Request* /*request*/, ::master::Reply* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithGenericMethod_GetAddress : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithGenericMethod_GetAddress() {
|
||||
::grpc::Service::MarkMethodGeneric(1);
|
||||
}
|
||||
~WithGenericMethod_GetAddress() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status GetAddress(::grpc::ServerContext* /*context*/, const ::master::EmptyRequest* /*request*/, ::master::Request* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithRawMethod_ReportAddress : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithRawMethod_ReportAddress() {
|
||||
::grpc::Service::MarkMethodRaw(0);
|
||||
}
|
||||
~WithRawMethod_ReportAddress() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status ReportAddress(::grpc::ServerContext* /*context*/, const ::master::Request* /*request*/, ::master::Reply* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
void RequestReportAddress(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
|
||||
::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
|
||||
}
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithRawMethod_GetAddress : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithRawMethod_GetAddress() {
|
||||
::grpc::Service::MarkMethodRaw(1);
|
||||
}
|
||||
~WithRawMethod_GetAddress() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status GetAddress(::grpc::ServerContext* /*context*/, const ::master::EmptyRequest* /*request*/, ::master::Request* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
void RequestGetAddress(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
|
||||
::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag);
|
||||
}
|
||||
};
|
||||
template <class BaseClass>
|
||||
class ExperimentalWithRawCallbackMethod_ReportAddress : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
ExperimentalWithRawCallbackMethod_ReportAddress() {
|
||||
::grpc::Service::experimental().MarkMethodRawCallback(0,
|
||||
new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
|
||||
[this](::grpc::ServerContext* context,
|
||||
const ::grpc::ByteBuffer* request,
|
||||
::grpc::ByteBuffer* response,
|
||||
::grpc::experimental::ServerCallbackRpcController* controller) {
|
||||
this->ReportAddress(context, request, response, controller);
|
||||
}));
|
||||
}
|
||||
~ExperimentalWithRawCallbackMethod_ReportAddress() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status ReportAddress(::grpc::ServerContext* /*context*/, const ::master::Request* /*request*/, ::master::Reply* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
virtual void ReportAddress(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
|
||||
};
|
||||
template <class BaseClass>
|
||||
class ExperimentalWithRawCallbackMethod_GetAddress : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
ExperimentalWithRawCallbackMethod_GetAddress() {
|
||||
::grpc::Service::experimental().MarkMethodRawCallback(1,
|
||||
new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
|
||||
[this](::grpc::ServerContext* context,
|
||||
const ::grpc::ByteBuffer* request,
|
||||
::grpc::ByteBuffer* response,
|
||||
::grpc::experimental::ServerCallbackRpcController* controller) {
|
||||
this->GetAddress(context, request, response, controller);
|
||||
}));
|
||||
}
|
||||
~ExperimentalWithRawCallbackMethod_GetAddress() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status GetAddress(::grpc::ServerContext* /*context*/, const ::master::EmptyRequest* /*request*/, ::master::Request* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
virtual void GetAddress(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithStreamedUnaryMethod_ReportAddress : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithStreamedUnaryMethod_ReportAddress() {
|
||||
::grpc::Service::MarkMethodStreamed(0,
|
||||
new ::grpc::internal::StreamedUnaryHandler< ::master::Request, ::master::Reply>(std::bind(&WithStreamedUnaryMethod_ReportAddress<BaseClass>::StreamedReportAddress, this, std::placeholders::_1, std::placeholders::_2)));
|
||||
}
|
||||
~WithStreamedUnaryMethod_ReportAddress() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable regular version of this method
|
||||
::grpc::Status ReportAddress(::grpc::ServerContext* /*context*/, const ::master::Request* /*request*/, ::master::Reply* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
// replace default version of method with streamed unary
|
||||
virtual ::grpc::Status StreamedReportAddress(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::master::Request,::master::Reply>* server_unary_streamer) = 0;
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithStreamedUnaryMethod_GetAddress : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithStreamedUnaryMethod_GetAddress() {
|
||||
::grpc::Service::MarkMethodStreamed(1,
|
||||
new ::grpc::internal::StreamedUnaryHandler< ::master::EmptyRequest, ::master::Request>(std::bind(&WithStreamedUnaryMethod_GetAddress<BaseClass>::StreamedGetAddress, this, std::placeholders::_1, std::placeholders::_2)));
|
||||
}
|
||||
~WithStreamedUnaryMethod_GetAddress() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable regular version of this method
|
||||
::grpc::Status GetAddress(::grpc::ServerContext* /*context*/, const ::master::EmptyRequest* /*request*/, ::master::Request* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
// replace default version of method with streamed unary
|
||||
virtual ::grpc::Status StreamedGetAddress(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::master::EmptyRequest,::master::Request>* server_unary_streamer) = 0;
|
||||
};
|
||||
typedef WithStreamedUnaryMethod_ReportAddress<WithStreamedUnaryMethod_GetAddress<Service > > StreamedUnaryService;
|
||||
typedef Service SplitStreamedService;
|
||||
typedef WithStreamedUnaryMethod_ReportAddress<WithStreamedUnaryMethod_GetAddress<Service > > StreamedService;
|
||||
};
|
||||
|
||||
} // namespace master
|
||||
|
||||
|
||||
#endif // GRPC_master_2eproto__INCLUDED
|
|
@ -0,0 +1,867 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: master.proto
|
||||
|
||||
#include "master.pb.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/extension_set.h>
|
||||
#include <google/protobuf/wire_format_lite.h>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/reflection_ops.h>
|
||||
#include <google/protobuf/wire_format.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
namespace master {
|
||||
class RequestDefaultTypeInternal {
|
||||
public:
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Request> _instance;
|
||||
} _Request_default_instance_;
|
||||
class EmptyRequestDefaultTypeInternal {
|
||||
public:
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<EmptyRequest> _instance;
|
||||
} _EmptyRequest_default_instance_;
|
||||
class ReplyDefaultTypeInternal {
|
||||
public:
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Reply> _instance;
|
||||
} _Reply_default_instance_;
|
||||
} // namespace master
|
||||
static void InitDefaultsscc_info_EmptyRequest_master_2eproto() {
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
|
||||
{
|
||||
void* ptr = &::master::_EmptyRequest_default_instance_;
|
||||
new (ptr) ::master::EmptyRequest();
|
||||
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
|
||||
}
|
||||
::master::EmptyRequest::InitAsDefaultInstance();
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_EmptyRequest_master_2eproto =
|
||||
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_EmptyRequest_master_2eproto}, {}};
|
||||
|
||||
static void InitDefaultsscc_info_Reply_master_2eproto() {
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
|
||||
{
|
||||
void* ptr = &::master::_Reply_default_instance_;
|
||||
new (ptr) ::master::Reply();
|
||||
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
|
||||
}
|
||||
::master::Reply::InitAsDefaultInstance();
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Reply_master_2eproto =
|
||||
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Reply_master_2eproto}, {}};
|
||||
|
||||
static void InitDefaultsscc_info_Request_master_2eproto() {
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
|
||||
{
|
||||
void* ptr = &::master::_Request_default_instance_;
|
||||
new (ptr) ::master::Request();
|
||||
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
|
||||
}
|
||||
::master::Request::InitAsDefaultInstance();
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Request_master_2eproto =
|
||||
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Request_master_2eproto}, {}};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_master_2eproto[3];
|
||||
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_master_2eproto = nullptr;
|
||||
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_master_2eproto = nullptr;
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_master_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::master::Request, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
PROTOBUF_FIELD_OFFSET(::master::Request, address_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::master::EmptyRequest, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::master::Reply, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
PROTOBUF_FIELD_OFFSET(::master::Reply, status_),
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, sizeof(::master::Request)},
|
||||
{ 6, -1, sizeof(::master::EmptyRequest)},
|
||||
{ 11, -1, sizeof(::master::Reply)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::master::_Request_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::master::_EmptyRequest_default_instance_),
|
||||
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::master::_Reply_default_instance_),
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_master_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
"\n\014master.proto\022\006master\"\032\n\007Request\022\017\n\007add"
|
||||
"ress\030\001 \001(\t\"\016\n\014EmptyRequest\"\027\n\005Reply\022\016\n\006s"
|
||||
"tatus\030\001 \001(\0102s\n\007Greeter\0221\n\rReportAddress\022"
|
||||
"\017.master.Request\032\r.master.Reply\"\000\0225\n\nGet"
|
||||
"Address\022\024.master.EmptyRequest\032\017.master.R"
|
||||
"equest\"\000b\006proto3"
|
||||
;
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_master_2eproto_deps[1] = {
|
||||
};
|
||||
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_master_2eproto_sccs[3] = {
|
||||
&scc_info_EmptyRequest_master_2eproto.base,
|
||||
&scc_info_Reply_master_2eproto.base,
|
||||
&scc_info_Request_master_2eproto.base,
|
||||
};
|
||||
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_master_2eproto_once;
|
||||
static bool descriptor_table_master_2eproto_initialized = false;
|
||||
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_master_2eproto = {
|
||||
&descriptor_table_master_2eproto_initialized, descriptor_table_protodef_master_2eproto, "master.proto", 216,
|
||||
&descriptor_table_master_2eproto_once, descriptor_table_master_2eproto_sccs, descriptor_table_master_2eproto_deps, 3, 0,
|
||||
schemas, file_default_instances, TableStruct_master_2eproto::offsets,
|
||||
file_level_metadata_master_2eproto, 3, file_level_enum_descriptors_master_2eproto, file_level_service_descriptors_master_2eproto,
|
||||
};
|
||||
|
||||
// Force running AddDescriptors() at dynamic initialization time.
|
||||
static bool dynamic_init_dummy_master_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_master_2eproto), true);
|
||||
namespace master {
|
||||
|
||||
// ===================================================================
|
||||
|
||||
void Request::InitAsDefaultInstance() {
|
||||
}
|
||||
class Request::_Internal {
|
||||
public:
|
||||
};
|
||||
|
||||
Request::Request()
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
|
||||
SharedCtor();
|
||||
// @@protoc_insertion_point(constructor:master.Request)
|
||||
}
|
||||
Request::Request(const Request& from)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(),
|
||||
_internal_metadata_(nullptr) {
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
if (!from.address().empty()) {
|
||||
address_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.address_);
|
||||
}
|
||||
// @@protoc_insertion_point(copy_constructor:master.Request)
|
||||
}
|
||||
|
||||
void Request::SharedCtor() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Request_master_2eproto.base);
|
||||
address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
|
||||
Request::~Request() {
|
||||
// @@protoc_insertion_point(destructor:master.Request)
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
void Request::SharedDtor() {
|
||||
address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
|
||||
void Request::SetCachedSize(int size) const {
|
||||
_cached_size_.Set(size);
|
||||
}
|
||||
const Request& Request::default_instance() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Request_master_2eproto.base);
|
||||
return *internal_default_instance();
|
||||
}
|
||||
|
||||
|
||||
void Request::Clear() {
|
||||
// @@protoc_insertion_point(message_clear_start:master.Request)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
address_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
_internal_metadata_.Clear();
|
||||
}
|
||||
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* Request::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
|
||||
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||||
while (!ctx->Done(&ptr)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
|
||||
CHK_(ptr);
|
||||
switch (tag >> 3) {
|
||||
// string address = 1;
|
||||
case 1:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_address(), ptr, ctx, "master.Request.address");
|
||||
CHK_(ptr);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
default: {
|
||||
handle_unusual:
|
||||
if ((tag & 7) == 4 || tag == 0) {
|
||||
ctx->SetLastTag(tag);
|
||||
goto success;
|
||||
}
|
||||
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
|
||||
CHK_(ptr != nullptr);
|
||||
continue;
|
||||
}
|
||||
} // switch
|
||||
} // while
|
||||
success:
|
||||
return ptr;
|
||||
failure:
|
||||
ptr = nullptr;
|
||||
goto success;
|
||||
#undef CHK_
|
||||
}
|
||||
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
bool Request::MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
|
||||
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
||||
// @@protoc_insertion_point(parse_start:master.Request)
|
||||
for (;;) {
|
||||
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
||||
tag = p.first;
|
||||
if (!p.second) goto handle_unusual;
|
||||
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
||||
// string address = 1;
|
||||
case 1: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
||||
input, this->mutable_address()));
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->address().data(), static_cast<int>(this->address().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
||||
"master.Request.address"));
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
handle_unusual:
|
||||
if (tag == 0) {
|
||||
goto success;
|
||||
}
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
|
||||
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
success:
|
||||
// @@protoc_insertion_point(parse_success:master.Request)
|
||||
return true;
|
||||
failure:
|
||||
// @@protoc_insertion_point(parse_failure:master.Request)
|
||||
return false;
|
||||
#undef DO_
|
||||
}
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
|
||||
void Request::SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
|
||||
// @@protoc_insertion_point(serialize_start:master.Request)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string address = 1;
|
||||
if (this->address().size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->address().data(), static_cast<int>(this->address().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"master.Request.address");
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
|
||||
1, this->address(), output);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
|
||||
_internal_metadata_.unknown_fields(), output);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_end:master.Request)
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* Request::InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
|
||||
// @@protoc_insertion_point(serialize_to_array_start:master.Request)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string address = 1;
|
||||
if (this->address().size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->address().data(), static_cast<int>(this->address().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"master.Request.address");
|
||||
target =
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
|
||||
1, this->address(), target);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
|
||||
_internal_metadata_.unknown_fields(), target);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_to_array_end:master.Request)
|
||||
return target;
|
||||
}
|
||||
|
||||
size_t Request::ByteSizeLong() const {
|
||||
// @@protoc_insertion_point(message_byte_size_start:master.Request)
|
||||
size_t total_size = 0;
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
total_size +=
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
|
||||
_internal_metadata_.unknown_fields());
|
||||
}
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string address = 1;
|
||||
if (this->address().size() > 0) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
this->address());
|
||||
}
|
||||
|
||||
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
|
||||
SetCachedSize(cached_size);
|
||||
return total_size;
|
||||
}
|
||||
|
||||
void Request::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
// @@protoc_insertion_point(generalized_merge_from_start:master.Request)
|
||||
GOOGLE_DCHECK_NE(&from, this);
|
||||
const Request* source =
|
||||
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Request>(
|
||||
&from);
|
||||
if (source == nullptr) {
|
||||
// @@protoc_insertion_point(generalized_merge_from_cast_fail:master.Request)
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
|
||||
} else {
|
||||
// @@protoc_insertion_point(generalized_merge_from_cast_success:master.Request)
|
||||
MergeFrom(*source);
|
||||
}
|
||||
}
|
||||
|
||||
void Request::MergeFrom(const Request& from) {
|
||||
// @@protoc_insertion_point(class_specific_merge_from_start:master.Request)
|
||||
GOOGLE_DCHECK_NE(&from, this);
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
if (from.address().size() > 0) {
|
||||
|
||||
address_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.address_);
|
||||
}
|
||||
}
|
||||
|
||||
void Request::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
// @@protoc_insertion_point(generalized_copy_from_start:master.Request)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
void Request::CopyFrom(const Request& from) {
|
||||
// @@protoc_insertion_point(class_specific_copy_from_start:master.Request)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool Request::IsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void Request::InternalSwap(Request* other) {
|
||||
using std::swap;
|
||||
_internal_metadata_.Swap(&other->_internal_metadata_);
|
||||
address_.Swap(&other->address_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
GetArenaNoVirtual());
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata Request::GetMetadata() const {
|
||||
return GetMetadataStatic();
|
||||
}
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
void EmptyRequest::InitAsDefaultInstance() {
|
||||
}
|
||||
class EmptyRequest::_Internal {
|
||||
public:
|
||||
};
|
||||
|
||||
EmptyRequest::EmptyRequest()
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
|
||||
SharedCtor();
|
||||
// @@protoc_insertion_point(constructor:master.EmptyRequest)
|
||||
}
|
||||
EmptyRequest::EmptyRequest(const EmptyRequest& from)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(),
|
||||
_internal_metadata_(nullptr) {
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
// @@protoc_insertion_point(copy_constructor:master.EmptyRequest)
|
||||
}
|
||||
|
||||
void EmptyRequest::SharedCtor() {
|
||||
}
|
||||
|
||||
EmptyRequest::~EmptyRequest() {
|
||||
// @@protoc_insertion_point(destructor:master.EmptyRequest)
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
void EmptyRequest::SharedDtor() {
|
||||
}
|
||||
|
||||
void EmptyRequest::SetCachedSize(int size) const {
|
||||
_cached_size_.Set(size);
|
||||
}
|
||||
const EmptyRequest& EmptyRequest::default_instance() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_EmptyRequest_master_2eproto.base);
|
||||
return *internal_default_instance();
|
||||
}
|
||||
|
||||
|
||||
void EmptyRequest::Clear() {
|
||||
// @@protoc_insertion_point(message_clear_start:master.EmptyRequest)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
_internal_metadata_.Clear();
|
||||
}
|
||||
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* EmptyRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
|
||||
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||||
while (!ctx->Done(&ptr)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
|
||||
CHK_(ptr);
|
||||
switch (tag >> 3) {
|
||||
default: {
|
||||
if ((tag & 7) == 4 || tag == 0) {
|
||||
ctx->SetLastTag(tag);
|
||||
goto success;
|
||||
}
|
||||
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
|
||||
CHK_(ptr != nullptr);
|
||||
continue;
|
||||
}
|
||||
} // switch
|
||||
} // while
|
||||
success:
|
||||
return ptr;
|
||||
failure:
|
||||
ptr = nullptr;
|
||||
goto success;
|
||||
#undef CHK_
|
||||
}
|
||||
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
bool EmptyRequest::MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
|
||||
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
||||
// @@protoc_insertion_point(parse_start:master.EmptyRequest)
|
||||
for (;;) {
|
||||
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
||||
tag = p.first;
|
||||
if (!p.second) goto handle_unusual;
|
||||
handle_unusual:
|
||||
if (tag == 0) {
|
||||
goto success;
|
||||
}
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
|
||||
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
||||
}
|
||||
success:
|
||||
// @@protoc_insertion_point(parse_success:master.EmptyRequest)
|
||||
return true;
|
||||
failure:
|
||||
// @@protoc_insertion_point(parse_failure:master.EmptyRequest)
|
||||
return false;
|
||||
#undef DO_
|
||||
}
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
|
||||
void EmptyRequest::SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
|
||||
// @@protoc_insertion_point(serialize_start:master.EmptyRequest)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
|
||||
_internal_metadata_.unknown_fields(), output);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_end:master.EmptyRequest)
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* EmptyRequest::InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
|
||||
// @@protoc_insertion_point(serialize_to_array_start:master.EmptyRequest)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
|
||||
_internal_metadata_.unknown_fields(), target);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_to_array_end:master.EmptyRequest)
|
||||
return target;
|
||||
}
|
||||
|
||||
size_t EmptyRequest::ByteSizeLong() const {
|
||||
// @@protoc_insertion_point(message_byte_size_start:master.EmptyRequest)
|
||||
size_t total_size = 0;
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
total_size +=
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
|
||||
_internal_metadata_.unknown_fields());
|
||||
}
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
|
||||
SetCachedSize(cached_size);
|
||||
return total_size;
|
||||
}
|
||||
|
||||
void EmptyRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
// @@protoc_insertion_point(generalized_merge_from_start:master.EmptyRequest)
|
||||
GOOGLE_DCHECK_NE(&from, this);
|
||||
const EmptyRequest* source =
|
||||
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<EmptyRequest>(
|
||||
&from);
|
||||
if (source == nullptr) {
|
||||
// @@protoc_insertion_point(generalized_merge_from_cast_fail:master.EmptyRequest)
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
|
||||
} else {
|
||||
// @@protoc_insertion_point(generalized_merge_from_cast_success:master.EmptyRequest)
|
||||
MergeFrom(*source);
|
||||
}
|
||||
}
|
||||
|
||||
void EmptyRequest::MergeFrom(const EmptyRequest& from) {
|
||||
// @@protoc_insertion_point(class_specific_merge_from_start:master.EmptyRequest)
|
||||
GOOGLE_DCHECK_NE(&from, this);
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
}
|
||||
|
||||
void EmptyRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
// @@protoc_insertion_point(generalized_copy_from_start:master.EmptyRequest)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
void EmptyRequest::CopyFrom(const EmptyRequest& from) {
|
||||
// @@protoc_insertion_point(class_specific_copy_from_start:master.EmptyRequest)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool EmptyRequest::IsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void EmptyRequest::InternalSwap(EmptyRequest* other) {
|
||||
using std::swap;
|
||||
_internal_metadata_.Swap(&other->_internal_metadata_);
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata EmptyRequest::GetMetadata() const {
|
||||
return GetMetadataStatic();
|
||||
}
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
void Reply::InitAsDefaultInstance() {
|
||||
}
|
||||
class Reply::_Internal {
|
||||
public:
|
||||
};
|
||||
|
||||
Reply::Reply()
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
|
||||
SharedCtor();
|
||||
// @@protoc_insertion_point(constructor:master.Reply)
|
||||
}
|
||||
Reply::Reply(const Reply& from)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(),
|
||||
_internal_metadata_(nullptr) {
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
status_ = from.status_;
|
||||
// @@protoc_insertion_point(copy_constructor:master.Reply)
|
||||
}
|
||||
|
||||
void Reply::SharedCtor() {
|
||||
status_ = false;
|
||||
}
|
||||
|
||||
Reply::~Reply() {
|
||||
// @@protoc_insertion_point(destructor:master.Reply)
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
void Reply::SharedDtor() {
|
||||
}
|
||||
|
||||
void Reply::SetCachedSize(int size) const {
|
||||
_cached_size_.Set(size);
|
||||
}
|
||||
const Reply& Reply::default_instance() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Reply_master_2eproto.base);
|
||||
return *internal_default_instance();
|
||||
}
|
||||
|
||||
|
||||
void Reply::Clear() {
|
||||
// @@protoc_insertion_point(message_clear_start:master.Reply)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
status_ = false;
|
||||
_internal_metadata_.Clear();
|
||||
}
|
||||
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* Reply::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
|
||||
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||||
while (!ctx->Done(&ptr)) {
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
|
||||
CHK_(ptr);
|
||||
switch (tag >> 3) {
|
||||
// bool status = 1;
|
||||
case 1:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
|
||||
status_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
|
||||
CHK_(ptr);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
default: {
|
||||
handle_unusual:
|
||||
if ((tag & 7) == 4 || tag == 0) {
|
||||
ctx->SetLastTag(tag);
|
||||
goto success;
|
||||
}
|
||||
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
|
||||
CHK_(ptr != nullptr);
|
||||
continue;
|
||||
}
|
||||
} // switch
|
||||
} // while
|
||||
success:
|
||||
return ptr;
|
||||
failure:
|
||||
ptr = nullptr;
|
||||
goto success;
|
||||
#undef CHK_
|
||||
}
|
||||
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
bool Reply::MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
|
||||
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
||||
// @@protoc_insertion_point(parse_start:master.Reply)
|
||||
for (;;) {
|
||||
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
||||
tag = p.first;
|
||||
if (!p.second) goto handle_unusual;
|
||||
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
||||
// bool status = 1;
|
||||
case 1: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
|
||||
|
||||
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
|
||||
bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
|
||||
input, &status_)));
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
handle_unusual:
|
||||
if (tag == 0) {
|
||||
goto success;
|
||||
}
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
|
||||
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
success:
|
||||
// @@protoc_insertion_point(parse_success:master.Reply)
|
||||
return true;
|
||||
failure:
|
||||
// @@protoc_insertion_point(parse_failure:master.Reply)
|
||||
return false;
|
||||
#undef DO_
|
||||
}
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
|
||||
void Reply::SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
|
||||
// @@protoc_insertion_point(serialize_start:master.Reply)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// bool status = 1;
|
||||
if (this->status() != 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(1, this->status(), output);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
|
||||
_internal_metadata_.unknown_fields(), output);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_end:master.Reply)
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* Reply::InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
|
||||
// @@protoc_insertion_point(serialize_to_array_start:master.Reply)
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// bool status = 1;
|
||||
if (this->status() != 0) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->status(), target);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
|
||||
_internal_metadata_.unknown_fields(), target);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_to_array_end:master.Reply)
|
||||
return target;
|
||||
}
|
||||
|
||||
size_t Reply::ByteSizeLong() const {
|
||||
// @@protoc_insertion_point(message_byte_size_start:master.Reply)
|
||||
size_t total_size = 0;
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
total_size +=
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
|
||||
_internal_metadata_.unknown_fields());
|
||||
}
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// bool status = 1;
|
||||
if (this->status() != 0) {
|
||||
total_size += 1 + 1;
|
||||
}
|
||||
|
||||
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
|
||||
SetCachedSize(cached_size);
|
||||
return total_size;
|
||||
}
|
||||
|
||||
void Reply::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
// @@protoc_insertion_point(generalized_merge_from_start:master.Reply)
|
||||
GOOGLE_DCHECK_NE(&from, this);
|
||||
const Reply* source =
|
||||
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Reply>(
|
||||
&from);
|
||||
if (source == nullptr) {
|
||||
// @@protoc_insertion_point(generalized_merge_from_cast_fail:master.Reply)
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
|
||||
} else {
|
||||
// @@protoc_insertion_point(generalized_merge_from_cast_success:master.Reply)
|
||||
MergeFrom(*source);
|
||||
}
|
||||
}
|
||||
|
||||
void Reply::MergeFrom(const Reply& from) {
|
||||
// @@protoc_insertion_point(class_specific_merge_from_start:master.Reply)
|
||||
GOOGLE_DCHECK_NE(&from, this);
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
if (from.status() != 0) {
|
||||
set_status(from.status());
|
||||
}
|
||||
}
|
||||
|
||||
void Reply::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
// @@protoc_insertion_point(generalized_copy_from_start:master.Reply)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
void Reply::CopyFrom(const Reply& from) {
|
||||
// @@protoc_insertion_point(class_specific_copy_from_start:master.Reply)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool Reply::IsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void Reply::InternalSwap(Reply* other) {
|
||||
using std::swap;
|
||||
_internal_metadata_.Swap(&other->_internal_metadata_);
|
||||
swap(status_, other->status_);
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata Reply::GetMetadata() const {
|
||||
return GetMetadataStatic();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
} // namespace master
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE ::master::Request* Arena::CreateMaybeMessage< ::master::Request >(Arena* arena) {
|
||||
return Arena::CreateInternal< ::master::Request >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE ::master::EmptyRequest* Arena::CreateMaybeMessage< ::master::EmptyRequest >(Arena* arena) {
|
||||
return Arena::CreateInternal< ::master::EmptyRequest >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE ::master::Reply* Arena::CreateMaybeMessage< ::master::Reply >(Arena* arena) {
|
||||
return Arena::CreateInternal< ::master::Reply >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
#include <google/protobuf/port_undef.inc>
|
|
@ -0,0 +1,564 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: master.proto
|
||||
|
||||
#ifndef GOOGLE_PROTOBUF_INCLUDED_master_2eproto
|
||||
#define GOOGLE_PROTOBUF_INCLUDED_master_2eproto
|
||||
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
#include <google/protobuf/port_def.inc>
|
||||
#if PROTOBUF_VERSION < 3009000
|
||||
#error This file was generated by a newer version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please update
|
||||
#error your headers.
|
||||
#endif
|
||||
#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
|
||||
#error This file was generated by an older version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please
|
||||
#error regenerate this file with a newer version of protoc.
|
||||
#endif
|
||||
|
||||
#include <google/protobuf/port_undef.inc>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/arena.h>
|
||||
#include <google/protobuf/arenastring.h>
|
||||
#include <google/protobuf/generated_message_table_driven.h>
|
||||
#include <google/protobuf/generated_message_util.h>
|
||||
#include <google/protobuf/inlined_string_field.h>
|
||||
#include <google/protobuf/metadata.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
|
||||
#include <google/protobuf/extension_set.h> // IWYU pragma: export
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
#define PROTOBUF_INTERNAL_EXPORT_master_2eproto
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
namespace internal {
|
||||
class AnyMetadata;
|
||||
} // namespace internal
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
// Internal implementation detail -- do not use these members.
|
||||
struct TableStruct_master_2eproto {
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[3]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
|
||||
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
|
||||
};
|
||||
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_master_2eproto;
|
||||
namespace master {
|
||||
class EmptyRequest;
|
||||
class EmptyRequestDefaultTypeInternal;
|
||||
extern EmptyRequestDefaultTypeInternal _EmptyRequest_default_instance_;
|
||||
class Reply;
|
||||
class ReplyDefaultTypeInternal;
|
||||
extern ReplyDefaultTypeInternal _Reply_default_instance_;
|
||||
class Request;
|
||||
class RequestDefaultTypeInternal;
|
||||
extern RequestDefaultTypeInternal _Request_default_instance_;
|
||||
} // namespace master
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> ::master::EmptyRequest* Arena::CreateMaybeMessage<::master::EmptyRequest>(Arena*);
|
||||
template<> ::master::Reply* Arena::CreateMaybeMessage<::master::Reply>(Arena*);
|
||||
template<> ::master::Request* Arena::CreateMaybeMessage<::master::Request>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
namespace master {
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class Request :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:master.Request) */ {
|
||||
public:
|
||||
Request();
|
||||
virtual ~Request();
|
||||
|
||||
Request(const Request& from);
|
||||
Request(Request&& from) noexcept
|
||||
: Request() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline Request& operator=(const Request& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline Request& operator=(Request&& from) noexcept {
|
||||
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
|
||||
if (this != &from) InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
|
||||
return GetDescriptor();
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
|
||||
return GetMetadataStatic().descriptor;
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
|
||||
return GetMetadataStatic().reflection;
|
||||
}
|
||||
static const Request& default_instance();
|
||||
|
||||
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
|
||||
static inline const Request* internal_default_instance() {
|
||||
return reinterpret_cast<const Request*>(
|
||||
&_Request_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
0;
|
||||
|
||||
friend void swap(Request& a, Request& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(Request* other) {
|
||||
if (other == this) return;
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
inline Request* New() const final {
|
||||
return CreateMaybeMessage<Request>(nullptr);
|
||||
}
|
||||
|
||||
Request* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
|
||||
return CreateMaybeMessage<Request>(arena);
|
||||
}
|
||||
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void CopyFrom(const Request& from);
|
||||
void MergeFrom(const Request& from);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final;
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
void SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
|
||||
int GetCachedSize() const final { return _cached_size_.Get(); }
|
||||
|
||||
private:
|
||||
inline void SharedCtor();
|
||||
inline void SharedDtor();
|
||||
void SetCachedSize(int size) const final;
|
||||
void InternalSwap(Request* other);
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "master.Request";
|
||||
}
|
||||
private:
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
|
||||
return nullptr;
|
||||
}
|
||||
inline void* MaybeArenaPtr() const {
|
||||
return nullptr;
|
||||
}
|
||||
public:
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||
private:
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_master_2eproto);
|
||||
return ::descriptor_table_master_2eproto.file_level_metadata[kIndexInFileMessages];
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kAddressFieldNumber = 1,
|
||||
};
|
||||
// string address = 1;
|
||||
void clear_address();
|
||||
const std::string& address() const;
|
||||
void set_address(const std::string& value);
|
||||
void set_address(std::string&& value);
|
||||
void set_address(const char* value);
|
||||
void set_address(const char* value, size_t size);
|
||||
std::string* mutable_address();
|
||||
std::string* release_address();
|
||||
void set_allocated_address(std::string* address);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:master.Request)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr address_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_master_2eproto;
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class EmptyRequest :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:master.EmptyRequest) */ {
|
||||
public:
|
||||
EmptyRequest();
|
||||
virtual ~EmptyRequest();
|
||||
|
||||
EmptyRequest(const EmptyRequest& from);
|
||||
EmptyRequest(EmptyRequest&& from) noexcept
|
||||
: EmptyRequest() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline EmptyRequest& operator=(const EmptyRequest& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline EmptyRequest& operator=(EmptyRequest&& from) noexcept {
|
||||
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
|
||||
if (this != &from) InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
|
||||
return GetDescriptor();
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
|
||||
return GetMetadataStatic().descriptor;
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
|
||||
return GetMetadataStatic().reflection;
|
||||
}
|
||||
static const EmptyRequest& default_instance();
|
||||
|
||||
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
|
||||
static inline const EmptyRequest* internal_default_instance() {
|
||||
return reinterpret_cast<const EmptyRequest*>(
|
||||
&_EmptyRequest_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
1;
|
||||
|
||||
friend void swap(EmptyRequest& a, EmptyRequest& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(EmptyRequest* other) {
|
||||
if (other == this) return;
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
inline EmptyRequest* New() const final {
|
||||
return CreateMaybeMessage<EmptyRequest>(nullptr);
|
||||
}
|
||||
|
||||
EmptyRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
|
||||
return CreateMaybeMessage<EmptyRequest>(arena);
|
||||
}
|
||||
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void CopyFrom(const EmptyRequest& from);
|
||||
void MergeFrom(const EmptyRequest& from);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final;
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
void SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
|
||||
int GetCachedSize() const final { return _cached_size_.Get(); }
|
||||
|
||||
private:
|
||||
inline void SharedCtor();
|
||||
inline void SharedDtor();
|
||||
void SetCachedSize(int size) const final;
|
||||
void InternalSwap(EmptyRequest* other);
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "master.EmptyRequest";
|
||||
}
|
||||
private:
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
|
||||
return nullptr;
|
||||
}
|
||||
inline void* MaybeArenaPtr() const {
|
||||
return nullptr;
|
||||
}
|
||||
public:
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||
private:
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_master_2eproto);
|
||||
return ::descriptor_table_master_2eproto.file_level_metadata[kIndexInFileMessages];
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
// @@protoc_insertion_point(class_scope:master.EmptyRequest)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_master_2eproto;
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class Reply :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:master.Reply) */ {
|
||||
public:
|
||||
Reply();
|
||||
virtual ~Reply();
|
||||
|
||||
Reply(const Reply& from);
|
||||
Reply(Reply&& from) noexcept
|
||||
: Reply() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline Reply& operator=(const Reply& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline Reply& operator=(Reply&& from) noexcept {
|
||||
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
|
||||
if (this != &from) InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
|
||||
return GetDescriptor();
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
|
||||
return GetMetadataStatic().descriptor;
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
|
||||
return GetMetadataStatic().reflection;
|
||||
}
|
||||
static const Reply& default_instance();
|
||||
|
||||
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
|
||||
static inline const Reply* internal_default_instance() {
|
||||
return reinterpret_cast<const Reply*>(
|
||||
&_Reply_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
2;
|
||||
|
||||
friend void swap(Reply& a, Reply& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(Reply* other) {
|
||||
if (other == this) return;
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
inline Reply* New() const final {
|
||||
return CreateMaybeMessage<Reply>(nullptr);
|
||||
}
|
||||
|
||||
Reply* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
|
||||
return CreateMaybeMessage<Reply>(arena);
|
||||
}
|
||||
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void CopyFrom(const Reply& from);
|
||||
void MergeFrom(const Reply& from);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final;
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
void SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
|
||||
int GetCachedSize() const final { return _cached_size_.Get(); }
|
||||
|
||||
private:
|
||||
inline void SharedCtor();
|
||||
inline void SharedDtor();
|
||||
void SetCachedSize(int size) const final;
|
||||
void InternalSwap(Reply* other);
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "master.Reply";
|
||||
}
|
||||
private:
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
|
||||
return nullptr;
|
||||
}
|
||||
inline void* MaybeArenaPtr() const {
|
||||
return nullptr;
|
||||
}
|
||||
public:
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||
private:
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_master_2eproto);
|
||||
return ::descriptor_table_master_2eproto.file_level_metadata[kIndexInFileMessages];
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kStatusFieldNumber = 1,
|
||||
};
|
||||
// bool status = 1;
|
||||
void clear_status();
|
||||
bool status() const;
|
||||
void set_status(bool value);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:master.Reply)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
bool status_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_master_2eproto;
|
||||
};
|
||||
// ===================================================================
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#endif // __GNUC__
|
||||
// Request
|
||||
|
||||
// string address = 1;
|
||||
inline void Request::clear_address() {
|
||||
address_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline const std::string& Request::address() const {
|
||||
// @@protoc_insertion_point(field_get:master.Request.address)
|
||||
return address_.GetNoArena();
|
||||
}
|
||||
inline void Request::set_address(const std::string& value) {
|
||||
|
||||
address_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
|
||||
// @@protoc_insertion_point(field_set:master.Request.address)
|
||||
}
|
||||
inline void Request::set_address(std::string&& value) {
|
||||
|
||||
address_.SetNoArena(
|
||||
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
||||
// @@protoc_insertion_point(field_set_rvalue:master.Request.address)
|
||||
}
|
||||
inline void Request::set_address(const char* value) {
|
||||
GOOGLE_DCHECK(value != nullptr);
|
||||
|
||||
address_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
||||
// @@protoc_insertion_point(field_set_char:master.Request.address)
|
||||
}
|
||||
inline void Request::set_address(const char* value, size_t size) {
|
||||
|
||||
address_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
::std::string(reinterpret_cast<const char*>(value), size));
|
||||
// @@protoc_insertion_point(field_set_pointer:master.Request.address)
|
||||
}
|
||||
inline std::string* Request::mutable_address() {
|
||||
|
||||
// @@protoc_insertion_point(field_mutable:master.Request.address)
|
||||
return address_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline std::string* Request::release_address() {
|
||||
// @@protoc_insertion_point(field_release:master.Request.address)
|
||||
|
||||
return address_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline void Request::set_allocated_address(std::string* address) {
|
||||
if (address != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
address_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), address);
|
||||
// @@protoc_insertion_point(field_set_allocated:master.Request.address)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// EmptyRequest
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Reply
|
||||
|
||||
// bool status = 1;
|
||||
inline void Reply::clear_status() {
|
||||
status_ = false;
|
||||
}
|
||||
inline bool Reply::status() const {
|
||||
// @@protoc_insertion_point(field_get:master.Reply.status)
|
||||
return status_;
|
||||
}
|
||||
inline void Reply::set_status(bool value) {
|
||||
|
||||
status_ = value;
|
||||
// @@protoc_insertion_point(field_set:master.Reply.status)
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // __GNUC__
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
} // namespace master
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
|
||||
#include <google/protobuf/port_undef.inc>
|
||||
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_master_2eproto
|
|
@ -1290,8 +1290,6 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_message_2eproto::offsets[] PRO
|
|||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchMsg, timestamp_),
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchMsg, client_id_),
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchMsg, extra_params_),
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchMsg, json_),
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchMsg, dsl_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::TimeSyncMsg, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
|
@ -1306,7 +1304,6 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_message_2eproto::offsets[] PRO
|
|||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::Key2SegMsg, uid_),
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::Key2SegMsg, timestamp_),
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::grpc::Key2SegMsg, segment_id_),
|
||||
};
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
|
@ -1355,8 +1352,8 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB
|
|||
{ 324, -1, sizeof(::milvus::grpc::SearchParamPB)},
|
||||
{ 333, -1, sizeof(::milvus::grpc::InsertOrDeleteMsg)},
|
||||
{ 348, -1, sizeof(::milvus::grpc::SearchMsg)},
|
||||
{ 362, -1, sizeof(::milvus::grpc::TimeSyncMsg)},
|
||||
{ 370, -1, sizeof(::milvus::grpc::Key2SegMsg)},
|
||||
{ 360, -1, sizeof(::milvus::grpc::TimeSyncMsg)},
|
||||
{ 368, -1, sizeof(::milvus::grpc::Key2SegMsg)},
|
||||
};
|
||||
|
||||
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
||||
|
@ -1523,83 +1520,82 @@ const char descriptor_table_protodef_message_2eproto[] PROTOBUF_SECTION_VARIABLE
|
|||
"\nsegment_id\030\006 \001(\003\022\022\n\nchannel_id\030\007 \001(\003\022\037\n"
|
||||
"\002op\030\010 \001(\0162\023.milvus.grpc.OpType\022\021\n\tclient"
|
||||
"_id\030\t \001(\003\022/\n\014extra_params\030\n \003(\0132\031.milvus"
|
||||
".grpc.KeyValuePair\"\351\001\n\tSearchMsg\022\027\n\017coll"
|
||||
".grpc.KeyValuePair\"\316\001\n\tSearchMsg\022\027\n\017coll"
|
||||
"ection_name\030\001 \001(\t\022-\n\007records\030\002 \001(\0132\034.mil"
|
||||
"vus.grpc.VectorRowRecord\022\025\n\rpartition_ta"
|
||||
"g\030\003 \003(\t\022\013\n\003uid\030\004 \001(\003\022\021\n\ttimestamp\030\005 \001(\004\022"
|
||||
"g\030\003 \001(\t\022\013\n\003uid\030\004 \001(\003\022\021\n\ttimestamp\030\005 \001(\004\022"
|
||||
"\021\n\tclient_id\030\006 \001(\003\022/\n\014extra_params\030\007 \003(\013"
|
||||
"2\031.milvus.grpc.KeyValuePair\022\014\n\004json\030\010 \003("
|
||||
"\t\022\013\n\003dsl\030\t \001(\t\"[\n\013TimeSyncMsg\022\017\n\007peer_Id"
|
||||
"\030\001 \001(\003\022\021\n\tTimestamp\030\002 \001(\004\022(\n\tsync_type\030\003"
|
||||
" \001(\0162\025.milvus.grpc.SyncType\"@\n\nKey2SegMs"
|
||||
"g\022\013\n\003uid\030\001 \001(\003\022\021\n\ttimestamp\030\002 \001(\004\022\022\n\nseg"
|
||||
"ment_id\030\003 \003(\003*\242\004\n\tErrorCode\022\013\n\007SUCCESS\020\000"
|
||||
"\022\024\n\020UNEXPECTED_ERROR\020\001\022\022\n\016CONNECT_FAILED"
|
||||
"\020\002\022\025\n\021PERMISSION_DENIED\020\003\022\031\n\025COLLECTION_"
|
||||
"NOT_EXISTS\020\004\022\024\n\020ILLEGAL_ARGUMENT\020\005\022\025\n\021IL"
|
||||
"LEGAL_DIMENSION\020\007\022\026\n\022ILLEGAL_INDEX_TYPE\020"
|
||||
"\010\022\033\n\027ILLEGAL_COLLECTION_NAME\020\t\022\020\n\014ILLEGA"
|
||||
"L_TOPK\020\n\022\025\n\021ILLEGAL_ROWRECORD\020\013\022\025\n\021ILLEG"
|
||||
"AL_VECTOR_ID\020\014\022\031\n\025ILLEGAL_SEARCH_RESULT\020"
|
||||
"\r\022\022\n\016FILE_NOT_FOUND\020\016\022\017\n\013META_FAILED\020\017\022\020"
|
||||
"\n\014CACHE_FAILED\020\020\022\030\n\024CANNOT_CREATE_FOLDER"
|
||||
"\020\021\022\026\n\022CANNOT_CREATE_FILE\020\022\022\030\n\024CANNOT_DEL"
|
||||
"ETE_FOLDER\020\023\022\026\n\022CANNOT_DELETE_FILE\020\024\022\025\n\021"
|
||||
"BUILD_INDEX_ERROR\020\025\022\021\n\rILLEGAL_NLIST\020\026\022\027"
|
||||
"\n\023ILLEGAL_METRIC_TYPE\020\027\022\021\n\rOUT_OF_MEMORY"
|
||||
"\020\030*\221\001\n\010DataType\022\010\n\004NONE\020\000\022\010\n\004BOOL\020\001\022\010\n\004I"
|
||||
"NT8\020\002\022\t\n\005INT16\020\003\022\t\n\005INT32\020\004\022\t\n\005INT64\020\005\022\t"
|
||||
"\n\005FLOAT\020\n\022\n\n\006DOUBLE\020\013\022\n\n\006STRING\020\024\022\021\n\rVEC"
|
||||
"TOR_BINARY\020d\022\020\n\014VECTOR_FLOAT\020e*C\n\017Compar"
|
||||
"eOperator\022\006\n\002LT\020\000\022\007\n\003LTE\020\001\022\006\n\002EQ\020\002\022\006\n\002GT"
|
||||
"\020\003\022\007\n\003GTE\020\004\022\006\n\002NE\020\005*8\n\005Occur\022\013\n\007INVALID\020"
|
||||
"\000\022\010\n\004MUST\020\001\022\n\n\006SHOULD\020\002\022\014\n\010MUST_NOT\020\003* \n"
|
||||
"\006OpType\022\n\n\006INSERT\020\000\022\n\n\006DELETE\020\001*\037\n\010SyncT"
|
||||
"ype\022\010\n\004READ\020\000\022\t\n\005WRITE\020\0012\333\r\n\rMilvusServi"
|
||||
"ce\022\?\n\020CreateCollection\022\024.milvus.grpc.Map"
|
||||
"ping\032\023.milvus.grpc.Status\"\000\022F\n\rHasCollec"
|
||||
"tion\022\033.milvus.grpc.CollectionName\032\026.milv"
|
||||
"us.grpc.BoolReply\"\000\022I\n\022DescribeCollectio"
|
||||
"n\022\033.milvus.grpc.CollectionName\032\024.milvus."
|
||||
"grpc.Mapping\"\000\022Q\n\017CountCollection\022\033.milv"
|
||||
"us.grpc.CollectionName\032\037.milvus.grpc.Col"
|
||||
"lectionRowCount\"\000\022J\n\017ShowCollections\022\024.m"
|
||||
"ilvus.grpc.Command\032\037.milvus.grpc.Collect"
|
||||
"ionNameList\"\000\022P\n\022ShowCollectionInfo\022\033.mi"
|
||||
"lvus.grpc.CollectionName\032\033.milvus.grpc.C"
|
||||
"ollectionInfo\"\000\022D\n\016DropCollection\022\033.milv"
|
||||
"us.grpc.CollectionName\032\023.milvus.grpc.Sta"
|
||||
"tus\"\000\022=\n\013CreateIndex\022\027.milvus.grpc.Index"
|
||||
"Param\032\023.milvus.grpc.Status\"\000\022C\n\rDescribe"
|
||||
"Index\022\027.milvus.grpc.IndexParam\032\027.milvus."
|
||||
"grpc.IndexParam\"\000\022;\n\tDropIndex\022\027.milvus."
|
||||
"grpc.IndexParam\032\023.milvus.grpc.Status\"\000\022E"
|
||||
"\n\017CreatePartition\022\033.milvus.grpc.Partitio"
|
||||
"nParam\032\023.milvus.grpc.Status\"\000\022E\n\014HasPart"
|
||||
"ition\022\033.milvus.grpc.PartitionParam\032\026.mil"
|
||||
"vus.grpc.BoolReply\"\000\022K\n\016ShowPartitions\022\033"
|
||||
".milvus.grpc.CollectionName\032\032.milvus.grp"
|
||||
"c.PartitionList\"\000\022C\n\rDropPartition\022\033.mil"
|
||||
"vus.grpc.PartitionParam\032\023.milvus.grpc.St"
|
||||
"atus\"\000\022<\n\006Insert\022\030.milvus.grpc.InsertPar"
|
||||
"am\032\026.milvus.grpc.EntityIds\"\000\022E\n\rGetEntit"
|
||||
"yByID\022\033.milvus.grpc.EntityIdentity\032\025.mil"
|
||||
"vus.grpc.Entities\"\000\022H\n\014GetEntityIDs\022\036.mi"
|
||||
"lvus.grpc.GetEntityIDsParam\032\026.milvus.grp"
|
||||
"c.EntityIds\"\000\022>\n\006Search\022\030.milvus.grpc.Se"
|
||||
"archParam\032\030.milvus.grpc.QueryResult\"\000\022P\n"
|
||||
"\017SearchInSegment\022!.milvus.grpc.SearchInS"
|
||||
"egmentParam\032\030.milvus.grpc.QueryResult\"\000\022"
|
||||
"7\n\003Cmd\022\024.milvus.grpc.Command\032\030.milvus.gr"
|
||||
"pc.StringReply\"\000\022A\n\nDeleteByID\022\034.milvus."
|
||||
"grpc.DeleteByIDParam\032\023.milvus.grpc.Statu"
|
||||
"s\"\000\022G\n\021PreloadCollection\022\033.milvus.grpc.C"
|
||||
"ollectionName\032\023.milvus.grpc.Status\"\000\0227\n\005"
|
||||
"Flush\022\027.milvus.grpc.FlushParam\032\023.milvus."
|
||||
"grpc.Status\"\000\022;\n\007Compact\022\031.milvus.grpc.C"
|
||||
"ompactParam\032\023.milvus.grpc.Status\"\000\022B\n\010Se"
|
||||
"archPB\022\032.milvus.grpc.SearchParamPB\032\030.mil"
|
||||
"vus.grpc.QueryResult\"\000B\007Z\005msgpbb\006proto3"
|
||||
"2\031.milvus.grpc.KeyValuePair\"[\n\013TimeSyncM"
|
||||
"sg\022\017\n\007peer_Id\030\001 \001(\003\022\021\n\tTimestamp\030\002 \001(\004\022("
|
||||
"\n\tsync_type\030\003 \001(\0162\025.milvus.grpc.SyncType"
|
||||
"\"-\n\nKey2SegMsg\022\013\n\003uid\030\001 \001(\003\022\022\n\nsegment_i"
|
||||
"d\030\002 \003(\003*\242\004\n\tErrorCode\022\013\n\007SUCCESS\020\000\022\024\n\020UN"
|
||||
"EXPECTED_ERROR\020\001\022\022\n\016CONNECT_FAILED\020\002\022\025\n\021"
|
||||
"PERMISSION_DENIED\020\003\022\031\n\025COLLECTION_NOT_EX"
|
||||
"ISTS\020\004\022\024\n\020ILLEGAL_ARGUMENT\020\005\022\025\n\021ILLEGAL_"
|
||||
"DIMENSION\020\007\022\026\n\022ILLEGAL_INDEX_TYPE\020\010\022\033\n\027I"
|
||||
"LLEGAL_COLLECTION_NAME\020\t\022\020\n\014ILLEGAL_TOPK"
|
||||
"\020\n\022\025\n\021ILLEGAL_ROWRECORD\020\013\022\025\n\021ILLEGAL_VEC"
|
||||
"TOR_ID\020\014\022\031\n\025ILLEGAL_SEARCH_RESULT\020\r\022\022\n\016F"
|
||||
"ILE_NOT_FOUND\020\016\022\017\n\013META_FAILED\020\017\022\020\n\014CACH"
|
||||
"E_FAILED\020\020\022\030\n\024CANNOT_CREATE_FOLDER\020\021\022\026\n\022"
|
||||
"CANNOT_CREATE_FILE\020\022\022\030\n\024CANNOT_DELETE_FO"
|
||||
"LDER\020\023\022\026\n\022CANNOT_DELETE_FILE\020\024\022\025\n\021BUILD_"
|
||||
"INDEX_ERROR\020\025\022\021\n\rILLEGAL_NLIST\020\026\022\027\n\023ILLE"
|
||||
"GAL_METRIC_TYPE\020\027\022\021\n\rOUT_OF_MEMORY\020\030*\221\001\n"
|
||||
"\010DataType\022\010\n\004NONE\020\000\022\010\n\004BOOL\020\001\022\010\n\004INT8\020\002\022"
|
||||
"\t\n\005INT16\020\003\022\t\n\005INT32\020\004\022\t\n\005INT64\020\005\022\t\n\005FLOA"
|
||||
"T\020\n\022\n\n\006DOUBLE\020\013\022\n\n\006STRING\020\024\022\021\n\rVECTOR_BI"
|
||||
"NARY\020d\022\020\n\014VECTOR_FLOAT\020e*C\n\017CompareOpera"
|
||||
"tor\022\006\n\002LT\020\000\022\007\n\003LTE\020\001\022\006\n\002EQ\020\002\022\006\n\002GT\020\003\022\007\n\003"
|
||||
"GTE\020\004\022\006\n\002NE\020\005*8\n\005Occur\022\013\n\007INVALID\020\000\022\010\n\004M"
|
||||
"UST\020\001\022\n\n\006SHOULD\020\002\022\014\n\010MUST_NOT\020\003* \n\006OpTyp"
|
||||
"e\022\n\n\006INSERT\020\000\022\n\n\006DELETE\020\001*\037\n\010SyncType\022\010\n"
|
||||
"\004READ\020\000\022\t\n\005WRITE\020\0012\333\r\n\rMilvusService\022\?\n\020"
|
||||
"CreateCollection\022\024.milvus.grpc.Mapping\032\023"
|
||||
".milvus.grpc.Status\"\000\022F\n\rHasCollection\022\033"
|
||||
".milvus.grpc.CollectionName\032\026.milvus.grp"
|
||||
"c.BoolReply\"\000\022I\n\022DescribeCollection\022\033.mi"
|
||||
"lvus.grpc.CollectionName\032\024.milvus.grpc.M"
|
||||
"apping\"\000\022Q\n\017CountCollection\022\033.milvus.grp"
|
||||
"c.CollectionName\032\037.milvus.grpc.Collectio"
|
||||
"nRowCount\"\000\022J\n\017ShowCollections\022\024.milvus."
|
||||
"grpc.Command\032\037.milvus.grpc.CollectionNam"
|
||||
"eList\"\000\022P\n\022ShowCollectionInfo\022\033.milvus.g"
|
||||
"rpc.CollectionName\032\033.milvus.grpc.Collect"
|
||||
"ionInfo\"\000\022D\n\016DropCollection\022\033.milvus.grp"
|
||||
"c.CollectionName\032\023.milvus.grpc.Status\"\000\022"
|
||||
"=\n\013CreateIndex\022\027.milvus.grpc.IndexParam\032"
|
||||
"\023.milvus.grpc.Status\"\000\022C\n\rDescribeIndex\022"
|
||||
"\027.milvus.grpc.IndexParam\032\027.milvus.grpc.I"
|
||||
"ndexParam\"\000\022;\n\tDropIndex\022\027.milvus.grpc.I"
|
||||
"ndexParam\032\023.milvus.grpc.Status\"\000\022E\n\017Crea"
|
||||
"tePartition\022\033.milvus.grpc.PartitionParam"
|
||||
"\032\023.milvus.grpc.Status\"\000\022E\n\014HasPartition\022"
|
||||
"\033.milvus.grpc.PartitionParam\032\026.milvus.gr"
|
||||
"pc.BoolReply\"\000\022K\n\016ShowPartitions\022\033.milvu"
|
||||
"s.grpc.CollectionName\032\032.milvus.grpc.Part"
|
||||
"itionList\"\000\022C\n\rDropPartition\022\033.milvus.gr"
|
||||
"pc.PartitionParam\032\023.milvus.grpc.Status\"\000"
|
||||
"\022<\n\006Insert\022\030.milvus.grpc.InsertParam\032\026.m"
|
||||
"ilvus.grpc.EntityIds\"\000\022E\n\rGetEntityByID\022"
|
||||
"\033.milvus.grpc.EntityIdentity\032\025.milvus.gr"
|
||||
"pc.Entities\"\000\022H\n\014GetEntityIDs\022\036.milvus.g"
|
||||
"rpc.GetEntityIDsParam\032\026.milvus.grpc.Enti"
|
||||
"tyIds\"\000\022>\n\006Search\022\030.milvus.grpc.SearchPa"
|
||||
"ram\032\030.milvus.grpc.QueryResult\"\000\022P\n\017Searc"
|
||||
"hInSegment\022!.milvus.grpc.SearchInSegment"
|
||||
"Param\032\030.milvus.grpc.QueryResult\"\000\0227\n\003Cmd"
|
||||
"\022\024.milvus.grpc.Command\032\030.milvus.grpc.Str"
|
||||
"ingReply\"\000\022A\n\nDeleteByID\022\034.milvus.grpc.D"
|
||||
"eleteByIDParam\032\023.milvus.grpc.Status\"\000\022G\n"
|
||||
"\021PreloadCollection\022\033.milvus.grpc.Collect"
|
||||
"ionName\032\023.milvus.grpc.Status\"\000\0227\n\005Flush\022"
|
||||
"\027.milvus.grpc.FlushParam\032\023.milvus.grpc.S"
|
||||
"tatus\"\000\022;\n\007Compact\022\031.milvus.grpc.Compact"
|
||||
"Param\032\023.milvus.grpc.Status\"\000\022B\n\010SearchPB"
|
||||
"\022\032.milvus.grpc.SearchParamPB\032\030.milvus.gr"
|
||||
"pc.QueryResult\"\000B\007Z\005msgpbb\006proto3"
|
||||
;
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_message_2eproto_deps[1] = {
|
||||
};
|
||||
|
@ -1654,7 +1650,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_mes
|
|||
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_message_2eproto_once;
|
||||
static bool descriptor_table_message_2eproto_initialized = false;
|
||||
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_message_2eproto = {
|
||||
&descriptor_table_message_2eproto_initialized, descriptor_table_protodef_message_2eproto, "message.proto", 7599,
|
||||
&descriptor_table_message_2eproto_initialized, descriptor_table_protodef_message_2eproto, "message.proto", 7553,
|
||||
&descriptor_table_message_2eproto_once, descriptor_table_message_2eproto_sccs, descriptor_table_message_2eproto_deps, 46, 0,
|
||||
schemas, file_default_instances, TableStruct_message_2eproto::offsets,
|
||||
file_level_metadata_message_2eproto, 47, file_level_enum_descriptors_message_2eproto, file_level_service_descriptors_message_2eproto,
|
||||
|
@ -18203,17 +18199,15 @@ SearchMsg::SearchMsg()
|
|||
SearchMsg::SearchMsg(const SearchMsg& from)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(),
|
||||
_internal_metadata_(nullptr),
|
||||
partition_tag_(from.partition_tag_),
|
||||
extra_params_(from.extra_params_),
|
||||
json_(from.json_) {
|
||||
extra_params_(from.extra_params_) {
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
if (!from.collection_name().empty()) {
|
||||
collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_);
|
||||
}
|
||||
dsl_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
if (!from.dsl().empty()) {
|
||||
dsl_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.dsl_);
|
||||
partition_tag_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
if (!from.partition_tag().empty()) {
|
||||
partition_tag_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.partition_tag_);
|
||||
}
|
||||
if (from.has_records()) {
|
||||
records_ = new ::milvus::grpc::VectorRowRecord(*from.records_);
|
||||
|
@ -18229,7 +18223,7 @@ SearchMsg::SearchMsg(const SearchMsg& from)
|
|||
void SearchMsg::SharedCtor() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SearchMsg_message_2eproto.base);
|
||||
collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
dsl_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
partition_tag_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
::memset(&records_, 0, static_cast<size_t>(
|
||||
reinterpret_cast<char*>(&client_id_) -
|
||||
reinterpret_cast<char*>(&records_)) + sizeof(client_id_));
|
||||
|
@ -18242,7 +18236,7 @@ SearchMsg::~SearchMsg() {
|
|||
|
||||
void SearchMsg::SharedDtor() {
|
||||
collection_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
dsl_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
partition_tag_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
if (this != internal_default_instance()) delete records_;
|
||||
}
|
||||
|
||||
|
@ -18261,11 +18255,9 @@ void SearchMsg::Clear() {
|
|||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
partition_tag_.Clear();
|
||||
extra_params_.Clear();
|
||||
json_.Clear();
|
||||
collection_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
dsl_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
partition_tag_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
if (GetArenaNoVirtual() == nullptr && records_ != nullptr) {
|
||||
delete records_;
|
||||
}
|
||||
|
@ -18298,16 +18290,11 @@ const char* SearchMsg::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::
|
|||
CHK_(ptr);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
// repeated string partition_tag = 3;
|
||||
// string partition_tag = 3;
|
||||
case 3:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
|
||||
ptr -= 1;
|
||||
do {
|
||||
ptr += 1;
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_partition_tag(), ptr, ctx, "milvus.grpc.SearchMsg.partition_tag");
|
||||
CHK_(ptr);
|
||||
if (!ctx->DataAvailable(ptr)) break;
|
||||
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26);
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_partition_tag(), ptr, ctx, "milvus.grpc.SearchMsg.partition_tag");
|
||||
CHK_(ptr);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
// int64 uid = 4;
|
||||
|
@ -18343,25 +18330,6 @@ const char* SearchMsg::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::
|
|||
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 58);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
// repeated string json = 8;
|
||||
case 8:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
|
||||
ptr -= 1;
|
||||
do {
|
||||
ptr += 1;
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_json(), ptr, ctx, "milvus.grpc.SearchMsg.json");
|
||||
CHK_(ptr);
|
||||
if (!ctx->DataAvailable(ptr)) break;
|
||||
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 66);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
// string dsl = 9;
|
||||
case 9:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) {
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_dsl(), ptr, ctx, "milvus.grpc.SearchMsg.dsl");
|
||||
CHK_(ptr);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
default: {
|
||||
handle_unusual:
|
||||
if ((tag & 7) == 4 || tag == 0) {
|
||||
|
@ -18418,14 +18386,13 @@ bool SearchMsg::MergePartialFromCodedStream(
|
|||
break;
|
||||
}
|
||||
|
||||
// repeated string partition_tag = 3;
|
||||
// string partition_tag = 3;
|
||||
case 3: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
||||
input, this->add_partition_tag()));
|
||||
input, this->mutable_partition_tag()));
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->partition_tag(this->partition_tag_size() - 1).data(),
|
||||
static_cast<int>(this->partition_tag(this->partition_tag_size() - 1).length()),
|
||||
this->partition_tag().data(), static_cast<int>(this->partition_tag().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
||||
"milvus.grpc.SearchMsg.partition_tag"));
|
||||
} else {
|
||||
|
@ -18484,37 +18451,6 @@ bool SearchMsg::MergePartialFromCodedStream(
|
|||
break;
|
||||
}
|
||||
|
||||
// repeated string json = 8;
|
||||
case 8: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) {
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
||||
input, this->add_json()));
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->json(this->json_size() - 1).data(),
|
||||
static_cast<int>(this->json(this->json_size() - 1).length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
||||
"milvus.grpc.SearchMsg.json"));
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// string dsl = 9;
|
||||
case 9: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (74 & 0xFF)) {
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
||||
input, this->mutable_dsl()));
|
||||
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->dsl().data(), static_cast<int>(this->dsl().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
||||
"milvus.grpc.SearchMsg.dsl"));
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
handle_unusual:
|
||||
if (tag == 0) {
|
||||
|
@ -18558,14 +18494,14 @@ void SearchMsg::SerializeWithCachedSizes(
|
|||
2, _Internal::records(this), output);
|
||||
}
|
||||
|
||||
// repeated string partition_tag = 3;
|
||||
for (int i = 0, n = this->partition_tag_size(); i < n; i++) {
|
||||
// string partition_tag = 3;
|
||||
if (this->partition_tag().size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->partition_tag(i).data(), static_cast<int>(this->partition_tag(i).length()),
|
||||
this->partition_tag().data(), static_cast<int>(this->partition_tag().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"milvus.grpc.SearchMsg.partition_tag");
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
|
||||
3, this->partition_tag(i), output);
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
|
||||
3, this->partition_tag(), output);
|
||||
}
|
||||
|
||||
// int64 uid = 4;
|
||||
|
@ -18592,26 +18528,6 @@ void SearchMsg::SerializeWithCachedSizes(
|
|||
output);
|
||||
}
|
||||
|
||||
// repeated string json = 8;
|
||||
for (int i = 0, n = this->json_size(); i < n; i++) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->json(i).data(), static_cast<int>(this->json(i).length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"milvus.grpc.SearchMsg.json");
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
|
||||
8, this->json(i), output);
|
||||
}
|
||||
|
||||
// string dsl = 9;
|
||||
if (this->dsl().size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->dsl().data(), static_cast<int>(this->dsl().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"milvus.grpc.SearchMsg.dsl");
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
|
||||
9, this->dsl(), output);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
|
||||
_internal_metadata_.unknown_fields(), output);
|
||||
|
@ -18643,14 +18559,15 @@ void SearchMsg::SerializeWithCachedSizes(
|
|||
2, _Internal::records(this), target);
|
||||
}
|
||||
|
||||
// repeated string partition_tag = 3;
|
||||
for (int i = 0, n = this->partition_tag_size(); i < n; i++) {
|
||||
// string partition_tag = 3;
|
||||
if (this->partition_tag().size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->partition_tag(i).data(), static_cast<int>(this->partition_tag(i).length()),
|
||||
this->partition_tag().data(), static_cast<int>(this->partition_tag().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"milvus.grpc.SearchMsg.partition_tag");
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
||||
WriteStringToArray(3, this->partition_tag(i), target);
|
||||
target =
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
|
||||
3, this->partition_tag(), target);
|
||||
}
|
||||
|
||||
// int64 uid = 4;
|
||||
|
@ -18676,27 +18593,6 @@ void SearchMsg::SerializeWithCachedSizes(
|
|||
7, this->extra_params(static_cast<int>(i)), target);
|
||||
}
|
||||
|
||||
// repeated string json = 8;
|
||||
for (int i = 0, n = this->json_size(); i < n; i++) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->json(i).data(), static_cast<int>(this->json(i).length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"milvus.grpc.SearchMsg.json");
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
||||
WriteStringToArray(8, this->json(i), target);
|
||||
}
|
||||
|
||||
// string dsl = 9;
|
||||
if (this->dsl().size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->dsl().data(), static_cast<int>(this->dsl().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"milvus.grpc.SearchMsg.dsl");
|
||||
target =
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
|
||||
9, this->dsl(), target);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
|
||||
_internal_metadata_.unknown_fields(), target);
|
||||
|
@ -18718,14 +18614,6 @@ size_t SearchMsg::ByteSizeLong() const {
|
|||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// repeated string partition_tag = 3;
|
||||
total_size += 1 *
|
||||
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->partition_tag_size());
|
||||
for (int i = 0, n = this->partition_tag_size(); i < n; i++) {
|
||||
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
this->partition_tag(i));
|
||||
}
|
||||
|
||||
// repeated .milvus.grpc.KeyValuePair extra_params = 7;
|
||||
{
|
||||
unsigned int count = static_cast<unsigned int>(this->extra_params_size());
|
||||
|
@ -18737,14 +18625,6 @@ size_t SearchMsg::ByteSizeLong() const {
|
|||
}
|
||||
}
|
||||
|
||||
// repeated string json = 8;
|
||||
total_size += 1 *
|
||||
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->json_size());
|
||||
for (int i = 0, n = this->json_size(); i < n; i++) {
|
||||
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
this->json(i));
|
||||
}
|
||||
|
||||
// string collection_name = 1;
|
||||
if (this->collection_name().size() > 0) {
|
||||
total_size += 1 +
|
||||
|
@ -18752,11 +18632,11 @@ size_t SearchMsg::ByteSizeLong() const {
|
|||
this->collection_name());
|
||||
}
|
||||
|
||||
// string dsl = 9;
|
||||
if (this->dsl().size() > 0) {
|
||||
// string partition_tag = 3;
|
||||
if (this->partition_tag().size() > 0) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
this->dsl());
|
||||
this->partition_tag());
|
||||
}
|
||||
|
||||
// .milvus.grpc.VectorRowRecord records = 2;
|
||||
|
@ -18814,16 +18694,14 @@ void SearchMsg::MergeFrom(const SearchMsg& from) {
|
|||
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
partition_tag_.MergeFrom(from.partition_tag_);
|
||||
extra_params_.MergeFrom(from.extra_params_);
|
||||
json_.MergeFrom(from.json_);
|
||||
if (from.collection_name().size() > 0) {
|
||||
|
||||
collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_);
|
||||
}
|
||||
if (from.dsl().size() > 0) {
|
||||
if (from.partition_tag().size() > 0) {
|
||||
|
||||
dsl_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.dsl_);
|
||||
partition_tag_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.partition_tag_);
|
||||
}
|
||||
if (from.has_records()) {
|
||||
mutable_records()->::milvus::grpc::VectorRowRecord::MergeFrom(from.records());
|
||||
|
@ -18860,12 +18738,10 @@ bool SearchMsg::IsInitialized() const {
|
|||
void SearchMsg::InternalSwap(SearchMsg* other) {
|
||||
using std::swap;
|
||||
_internal_metadata_.Swap(&other->_internal_metadata_);
|
||||
partition_tag_.InternalSwap(CastToBase(&other->partition_tag_));
|
||||
CastToBase(&extra_params_)->InternalSwap(CastToBase(&other->extra_params_));
|
||||
json_.InternalSwap(CastToBase(&other->json_));
|
||||
collection_name_.Swap(&other->collection_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
GetArenaNoVirtual());
|
||||
dsl_.Swap(&other->dsl_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
partition_tag_.Swap(&other->partition_tag_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
GetArenaNoVirtual());
|
||||
swap(records_, other->records_);
|
||||
swap(uid_, other->uid_);
|
||||
|
@ -19236,16 +19112,12 @@ Key2SegMsg::Key2SegMsg(const Key2SegMsg& from)
|
|||
_internal_metadata_(nullptr),
|
||||
segment_id_(from.segment_id_) {
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
::memcpy(&uid_, &from.uid_,
|
||||
static_cast<size_t>(reinterpret_cast<char*>(×tamp_) -
|
||||
reinterpret_cast<char*>(&uid_)) + sizeof(timestamp_));
|
||||
uid_ = from.uid_;
|
||||
// @@protoc_insertion_point(copy_constructor:milvus.grpc.Key2SegMsg)
|
||||
}
|
||||
|
||||
void Key2SegMsg::SharedCtor() {
|
||||
::memset(&uid_, 0, static_cast<size_t>(
|
||||
reinterpret_cast<char*>(×tamp_) -
|
||||
reinterpret_cast<char*>(&uid_)) + sizeof(timestamp_));
|
||||
uid_ = PROTOBUF_LONGLONG(0);
|
||||
}
|
||||
|
||||
Key2SegMsg::~Key2SegMsg() {
|
||||
|
@ -19272,9 +19144,7 @@ void Key2SegMsg::Clear() {
|
|||
(void) cached_has_bits;
|
||||
|
||||
segment_id_.Clear();
|
||||
::memset(&uid_, 0, static_cast<size_t>(
|
||||
reinterpret_cast<char*>(×tamp_) -
|
||||
reinterpret_cast<char*>(&uid_)) + sizeof(timestamp_));
|
||||
uid_ = PROTOBUF_LONGLONG(0);
|
||||
_internal_metadata_.Clear();
|
||||
}
|
||||
|
||||
|
@ -19293,19 +19163,12 @@ const char* Key2SegMsg::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:
|
|||
CHK_(ptr);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
// uint64 timestamp = 2;
|
||||
// repeated int64 segment_id = 2;
|
||||
case 2:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
|
||||
timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
|
||||
CHK_(ptr);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
// repeated int64 segment_id = 3;
|
||||
case 3:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
|
||||
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(mutable_segment_id(), ptr, ctx);
|
||||
CHK_(ptr);
|
||||
} else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24) {
|
||||
} else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) {
|
||||
add_segment_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr));
|
||||
CHK_(ptr);
|
||||
} else goto handle_unusual;
|
||||
|
@ -19353,29 +19216,16 @@ bool Key2SegMsg::MergePartialFromCodedStream(
|
|||
break;
|
||||
}
|
||||
|
||||
// uint64 timestamp = 2;
|
||||
// repeated int64 segment_id = 2;
|
||||
case 2: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
|
||||
|
||||
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
|
||||
::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
|
||||
input, ×tamp_)));
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// repeated int64 segment_id = 3;
|
||||
case 3: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
|
||||
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive<
|
||||
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
|
||||
input, this->mutable_segment_id())));
|
||||
} else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
|
||||
} else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
|
||||
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
|
||||
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
|
||||
1, 26u, input, this->mutable_segment_id())));
|
||||
1, 18u, input, this->mutable_segment_id())));
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
|
@ -19414,14 +19264,9 @@ void Key2SegMsg::SerializeWithCachedSizes(
|
|||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->uid(), output);
|
||||
}
|
||||
|
||||
// uint64 timestamp = 2;
|
||||
if (this->timestamp() != 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(2, this->timestamp(), output);
|
||||
}
|
||||
|
||||
// repeated int64 segment_id = 3;
|
||||
// repeated int64 segment_id = 2;
|
||||
if (this->segment_id_size() > 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(3, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(2, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
|
||||
output->WriteVarint32(_segment_id_cached_byte_size_.load(
|
||||
std::memory_order_relaxed));
|
||||
}
|
||||
|
@ -19448,15 +19293,10 @@ void Key2SegMsg::SerializeWithCachedSizes(
|
|||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->uid(), target);
|
||||
}
|
||||
|
||||
// uint64 timestamp = 2;
|
||||
if (this->timestamp() != 0) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(2, this->timestamp(), target);
|
||||
}
|
||||
|
||||
// repeated int64 segment_id = 3;
|
||||
// repeated int64 segment_id = 2;
|
||||
if (this->segment_id_size() > 0) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray(
|
||||
3,
|
||||
2,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
|
||||
target);
|
||||
target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray(
|
||||
|
@ -19487,7 +19327,7 @@ size_t Key2SegMsg::ByteSizeLong() const {
|
|||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// repeated int64 segment_id = 3;
|
||||
// repeated int64 segment_id = 2;
|
||||
{
|
||||
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
||||
Int64Size(this->segment_id_);
|
||||
|
@ -19509,13 +19349,6 @@ size_t Key2SegMsg::ByteSizeLong() const {
|
|||
this->uid());
|
||||
}
|
||||
|
||||
// uint64 timestamp = 2;
|
||||
if (this->timestamp() != 0) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
|
||||
this->timestamp());
|
||||
}
|
||||
|
||||
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
|
||||
SetCachedSize(cached_size);
|
||||
return total_size;
|
||||
|
@ -19547,9 +19380,6 @@ void Key2SegMsg::MergeFrom(const Key2SegMsg& from) {
|
|||
if (from.uid() != 0) {
|
||||
set_uid(from.uid());
|
||||
}
|
||||
if (from.timestamp() != 0) {
|
||||
set_timestamp(from.timestamp());
|
||||
}
|
||||
}
|
||||
|
||||
void Key2SegMsg::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
|
@ -19575,7 +19405,6 @@ void Key2SegMsg::InternalSwap(Key2SegMsg* other) {
|
|||
_internal_metadata_.Swap(&other->_internal_metadata_);
|
||||
segment_id_.InternalSwap(&other->segment_id_);
|
||||
swap(uid_, other->uid_);
|
||||
swap(timestamp_, other->timestamp_);
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata Key2SegMsg::GetMetadata() const {
|
||||
|
|
|
@ -7510,33 +7510,14 @@ class SearchMsg :
|
|||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kPartitionTagFieldNumber = 3,
|
||||
kExtraParamsFieldNumber = 7,
|
||||
kJsonFieldNumber = 8,
|
||||
kCollectionNameFieldNumber = 1,
|
||||
kDslFieldNumber = 9,
|
||||
kPartitionTagFieldNumber = 3,
|
||||
kRecordsFieldNumber = 2,
|
||||
kUidFieldNumber = 4,
|
||||
kTimestampFieldNumber = 5,
|
||||
kClientIdFieldNumber = 6,
|
||||
};
|
||||
// repeated string partition_tag = 3;
|
||||
int partition_tag_size() const;
|
||||
void clear_partition_tag();
|
||||
const std::string& partition_tag(int index) const;
|
||||
std::string* mutable_partition_tag(int index);
|
||||
void set_partition_tag(int index, const std::string& value);
|
||||
void set_partition_tag(int index, std::string&& value);
|
||||
void set_partition_tag(int index, const char* value);
|
||||
void set_partition_tag(int index, const char* value, size_t size);
|
||||
std::string* add_partition_tag();
|
||||
void add_partition_tag(const std::string& value);
|
||||
void add_partition_tag(std::string&& value);
|
||||
void add_partition_tag(const char* value);
|
||||
void add_partition_tag(const char* value, size_t size);
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& partition_tag() const;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_partition_tag();
|
||||
|
||||
// repeated .milvus.grpc.KeyValuePair extra_params = 7;
|
||||
int extra_params_size() const;
|
||||
void clear_extra_params();
|
||||
|
@ -7548,23 +7529,6 @@ class SearchMsg :
|
|||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair >&
|
||||
extra_params() const;
|
||||
|
||||
// repeated string json = 8;
|
||||
int json_size() const;
|
||||
void clear_json();
|
||||
const std::string& json(int index) const;
|
||||
std::string* mutable_json(int index);
|
||||
void set_json(int index, const std::string& value);
|
||||
void set_json(int index, std::string&& value);
|
||||
void set_json(int index, const char* value);
|
||||
void set_json(int index, const char* value, size_t size);
|
||||
std::string* add_json();
|
||||
void add_json(const std::string& value);
|
||||
void add_json(std::string&& value);
|
||||
void add_json(const char* value);
|
||||
void add_json(const char* value, size_t size);
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& json() const;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_json();
|
||||
|
||||
// string collection_name = 1;
|
||||
void clear_collection_name();
|
||||
const std::string& collection_name() const;
|
||||
|
@ -7576,16 +7540,16 @@ class SearchMsg :
|
|||
std::string* release_collection_name();
|
||||
void set_allocated_collection_name(std::string* collection_name);
|
||||
|
||||
// string dsl = 9;
|
||||
void clear_dsl();
|
||||
const std::string& dsl() const;
|
||||
void set_dsl(const std::string& value);
|
||||
void set_dsl(std::string&& value);
|
||||
void set_dsl(const char* value);
|
||||
void set_dsl(const char* value, size_t size);
|
||||
std::string* mutable_dsl();
|
||||
std::string* release_dsl();
|
||||
void set_allocated_dsl(std::string* dsl);
|
||||
// string partition_tag = 3;
|
||||
void clear_partition_tag();
|
||||
const std::string& partition_tag() const;
|
||||
void set_partition_tag(const std::string& value);
|
||||
void set_partition_tag(std::string&& value);
|
||||
void set_partition_tag(const char* value);
|
||||
void set_partition_tag(const char* value, size_t size);
|
||||
std::string* mutable_partition_tag();
|
||||
std::string* release_partition_tag();
|
||||
void set_allocated_partition_tag(std::string* partition_tag);
|
||||
|
||||
// .milvus.grpc.VectorRowRecord records = 2;
|
||||
bool has_records() const;
|
||||
|
@ -7615,11 +7579,9 @@ class SearchMsg :
|
|||
class _Internal;
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> partition_tag_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair > extra_params_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> json_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr collection_name_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr dsl_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr partition_tag_;
|
||||
::milvus::grpc::VectorRowRecord* records_;
|
||||
::PROTOBUF_NAMESPACE_ID::int64 uid_;
|
||||
::PROTOBUF_NAMESPACE_ID::uint64 timestamp_;
|
||||
|
@ -7887,11 +7849,10 @@ class Key2SegMsg :
|
|||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kSegmentIdFieldNumber = 3,
|
||||
kSegmentIdFieldNumber = 2,
|
||||
kUidFieldNumber = 1,
|
||||
kTimestampFieldNumber = 2,
|
||||
};
|
||||
// repeated int64 segment_id = 3;
|
||||
// repeated int64 segment_id = 2;
|
||||
int segment_id_size() const;
|
||||
void clear_segment_id();
|
||||
::PROTOBUF_NAMESPACE_ID::int64 segment_id(int index) const;
|
||||
|
@ -7907,11 +7868,6 @@ class Key2SegMsg :
|
|||
::PROTOBUF_NAMESPACE_ID::int64 uid() const;
|
||||
void set_uid(::PROTOBUF_NAMESPACE_ID::int64 value);
|
||||
|
||||
// uint64 timestamp = 2;
|
||||
void clear_timestamp();
|
||||
::PROTOBUF_NAMESPACE_ID::uint64 timestamp() const;
|
||||
void set_timestamp(::PROTOBUF_NAMESPACE_ID::uint64 value);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:milvus.grpc.Key2SegMsg)
|
||||
private:
|
||||
class _Internal;
|
||||
|
@ -7920,7 +7876,6 @@ class Key2SegMsg :
|
|||
::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 > segment_id_;
|
||||
mutable std::atomic<int> _segment_id_cached_byte_size_;
|
||||
::PROTOBUF_NAMESPACE_ID::int64 uid_;
|
||||
::PROTOBUF_NAMESPACE_ID::uint64 timestamp_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_message_2eproto;
|
||||
};
|
||||
|
@ -13028,69 +12983,55 @@ inline void SearchMsg::set_allocated_records(::milvus::grpc::VectorRowRecord* re
|
|||
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.SearchMsg.records)
|
||||
}
|
||||
|
||||
// repeated string partition_tag = 3;
|
||||
inline int SearchMsg::partition_tag_size() const {
|
||||
return partition_tag_.size();
|
||||
}
|
||||
// string partition_tag = 3;
|
||||
inline void SearchMsg::clear_partition_tag() {
|
||||
partition_tag_.Clear();
|
||||
partition_tag_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline const std::string& SearchMsg::partition_tag(int index) const {
|
||||
inline const std::string& SearchMsg::partition_tag() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.SearchMsg.partition_tag)
|
||||
return partition_tag_.Get(index);
|
||||
return partition_tag_.GetNoArena();
|
||||
}
|
||||
inline std::string* SearchMsg::mutable_partition_tag(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:milvus.grpc.SearchMsg.partition_tag)
|
||||
return partition_tag_.Mutable(index);
|
||||
}
|
||||
inline void SearchMsg::set_partition_tag(int index, const std::string& value) {
|
||||
inline void SearchMsg::set_partition_tag(const std::string& value) {
|
||||
|
||||
partition_tag_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.SearchMsg.partition_tag)
|
||||
partition_tag_.Mutable(index)->assign(value);
|
||||
}
|
||||
inline void SearchMsg::set_partition_tag(int index, std::string&& value) {
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.SearchMsg.partition_tag)
|
||||
partition_tag_.Mutable(index)->assign(std::move(value));
|
||||
inline void SearchMsg::set_partition_tag(std::string&& value) {
|
||||
|
||||
partition_tag_.SetNoArena(
|
||||
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
||||
// @@protoc_insertion_point(field_set_rvalue:milvus.grpc.SearchMsg.partition_tag)
|
||||
}
|
||||
inline void SearchMsg::set_partition_tag(int index, const char* value) {
|
||||
inline void SearchMsg::set_partition_tag(const char* value) {
|
||||
GOOGLE_DCHECK(value != nullptr);
|
||||
partition_tag_.Mutable(index)->assign(value);
|
||||
|
||||
partition_tag_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
||||
// @@protoc_insertion_point(field_set_char:milvus.grpc.SearchMsg.partition_tag)
|
||||
}
|
||||
inline void SearchMsg::set_partition_tag(int index, const char* value, size_t size) {
|
||||
partition_tag_.Mutable(index)->assign(
|
||||
reinterpret_cast<const char*>(value), size);
|
||||
inline void SearchMsg::set_partition_tag(const char* value, size_t size) {
|
||||
|
||||
partition_tag_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
::std::string(reinterpret_cast<const char*>(value), size));
|
||||
// @@protoc_insertion_point(field_set_pointer:milvus.grpc.SearchMsg.partition_tag)
|
||||
}
|
||||
inline std::string* SearchMsg::add_partition_tag() {
|
||||
// @@protoc_insertion_point(field_add_mutable:milvus.grpc.SearchMsg.partition_tag)
|
||||
return partition_tag_.Add();
|
||||
inline std::string* SearchMsg::mutable_partition_tag() {
|
||||
|
||||
// @@protoc_insertion_point(field_mutable:milvus.grpc.SearchMsg.partition_tag)
|
||||
return partition_tag_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline void SearchMsg::add_partition_tag(const std::string& value) {
|
||||
partition_tag_.Add()->assign(value);
|
||||
// @@protoc_insertion_point(field_add:milvus.grpc.SearchMsg.partition_tag)
|
||||
inline std::string* SearchMsg::release_partition_tag() {
|
||||
// @@protoc_insertion_point(field_release:milvus.grpc.SearchMsg.partition_tag)
|
||||
|
||||
return partition_tag_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline void SearchMsg::add_partition_tag(std::string&& value) {
|
||||
partition_tag_.Add(std::move(value));
|
||||
// @@protoc_insertion_point(field_add:milvus.grpc.SearchMsg.partition_tag)
|
||||
}
|
||||
inline void SearchMsg::add_partition_tag(const char* value) {
|
||||
GOOGLE_DCHECK(value != nullptr);
|
||||
partition_tag_.Add()->assign(value);
|
||||
// @@protoc_insertion_point(field_add_char:milvus.grpc.SearchMsg.partition_tag)
|
||||
}
|
||||
inline void SearchMsg::add_partition_tag(const char* value, size_t size) {
|
||||
partition_tag_.Add()->assign(reinterpret_cast<const char*>(value), size);
|
||||
// @@protoc_insertion_point(field_add_pointer:milvus.grpc.SearchMsg.partition_tag)
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>&
|
||||
SearchMsg::partition_tag() const {
|
||||
// @@protoc_insertion_point(field_list:milvus.grpc.SearchMsg.partition_tag)
|
||||
return partition_tag_;
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>*
|
||||
SearchMsg::mutable_partition_tag() {
|
||||
// @@protoc_insertion_point(field_mutable_list:milvus.grpc.SearchMsg.partition_tag)
|
||||
return &partition_tag_;
|
||||
inline void SearchMsg::set_allocated_partition_tag(std::string* partition_tag) {
|
||||
if (partition_tag != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
partition_tag_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), partition_tag);
|
||||
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.SearchMsg.partition_tag)
|
||||
}
|
||||
|
||||
// int64 uid = 4;
|
||||
|
@ -13165,122 +13106,6 @@ SearchMsg::extra_params() const {
|
|||
return extra_params_;
|
||||
}
|
||||
|
||||
// repeated string json = 8;
|
||||
inline int SearchMsg::json_size() const {
|
||||
return json_.size();
|
||||
}
|
||||
inline void SearchMsg::clear_json() {
|
||||
json_.Clear();
|
||||
}
|
||||
inline const std::string& SearchMsg::json(int index) const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.SearchMsg.json)
|
||||
return json_.Get(index);
|
||||
}
|
||||
inline std::string* SearchMsg::mutable_json(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:milvus.grpc.SearchMsg.json)
|
||||
return json_.Mutable(index);
|
||||
}
|
||||
inline void SearchMsg::set_json(int index, const std::string& value) {
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.SearchMsg.json)
|
||||
json_.Mutable(index)->assign(value);
|
||||
}
|
||||
inline void SearchMsg::set_json(int index, std::string&& value) {
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.SearchMsg.json)
|
||||
json_.Mutable(index)->assign(std::move(value));
|
||||
}
|
||||
inline void SearchMsg::set_json(int index, const char* value) {
|
||||
GOOGLE_DCHECK(value != nullptr);
|
||||
json_.Mutable(index)->assign(value);
|
||||
// @@protoc_insertion_point(field_set_char:milvus.grpc.SearchMsg.json)
|
||||
}
|
||||
inline void SearchMsg::set_json(int index, const char* value, size_t size) {
|
||||
json_.Mutable(index)->assign(
|
||||
reinterpret_cast<const char*>(value), size);
|
||||
// @@protoc_insertion_point(field_set_pointer:milvus.grpc.SearchMsg.json)
|
||||
}
|
||||
inline std::string* SearchMsg::add_json() {
|
||||
// @@protoc_insertion_point(field_add_mutable:milvus.grpc.SearchMsg.json)
|
||||
return json_.Add();
|
||||
}
|
||||
inline void SearchMsg::add_json(const std::string& value) {
|
||||
json_.Add()->assign(value);
|
||||
// @@protoc_insertion_point(field_add:milvus.grpc.SearchMsg.json)
|
||||
}
|
||||
inline void SearchMsg::add_json(std::string&& value) {
|
||||
json_.Add(std::move(value));
|
||||
// @@protoc_insertion_point(field_add:milvus.grpc.SearchMsg.json)
|
||||
}
|
||||
inline void SearchMsg::add_json(const char* value) {
|
||||
GOOGLE_DCHECK(value != nullptr);
|
||||
json_.Add()->assign(value);
|
||||
// @@protoc_insertion_point(field_add_char:milvus.grpc.SearchMsg.json)
|
||||
}
|
||||
inline void SearchMsg::add_json(const char* value, size_t size) {
|
||||
json_.Add()->assign(reinterpret_cast<const char*>(value), size);
|
||||
// @@protoc_insertion_point(field_add_pointer:milvus.grpc.SearchMsg.json)
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>&
|
||||
SearchMsg::json() const {
|
||||
// @@protoc_insertion_point(field_list:milvus.grpc.SearchMsg.json)
|
||||
return json_;
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>*
|
||||
SearchMsg::mutable_json() {
|
||||
// @@protoc_insertion_point(field_mutable_list:milvus.grpc.SearchMsg.json)
|
||||
return &json_;
|
||||
}
|
||||
|
||||
// string dsl = 9;
|
||||
inline void SearchMsg::clear_dsl() {
|
||||
dsl_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline const std::string& SearchMsg::dsl() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.SearchMsg.dsl)
|
||||
return dsl_.GetNoArena();
|
||||
}
|
||||
inline void SearchMsg::set_dsl(const std::string& value) {
|
||||
|
||||
dsl_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.SearchMsg.dsl)
|
||||
}
|
||||
inline void SearchMsg::set_dsl(std::string&& value) {
|
||||
|
||||
dsl_.SetNoArena(
|
||||
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
||||
// @@protoc_insertion_point(field_set_rvalue:milvus.grpc.SearchMsg.dsl)
|
||||
}
|
||||
inline void SearchMsg::set_dsl(const char* value) {
|
||||
GOOGLE_DCHECK(value != nullptr);
|
||||
|
||||
dsl_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
||||
// @@protoc_insertion_point(field_set_char:milvus.grpc.SearchMsg.dsl)
|
||||
}
|
||||
inline void SearchMsg::set_dsl(const char* value, size_t size) {
|
||||
|
||||
dsl_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
||||
::std::string(reinterpret_cast<const char*>(value), size));
|
||||
// @@protoc_insertion_point(field_set_pointer:milvus.grpc.SearchMsg.dsl)
|
||||
}
|
||||
inline std::string* SearchMsg::mutable_dsl() {
|
||||
|
||||
// @@protoc_insertion_point(field_mutable:milvus.grpc.SearchMsg.dsl)
|
||||
return dsl_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline std::string* SearchMsg::release_dsl() {
|
||||
// @@protoc_insertion_point(field_release:milvus.grpc.SearchMsg.dsl)
|
||||
|
||||
return dsl_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
inline void SearchMsg::set_allocated_dsl(std::string* dsl) {
|
||||
if (dsl != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
dsl_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), dsl);
|
||||
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.SearchMsg.dsl)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// TimeSyncMsg
|
||||
|
@ -13345,21 +13170,7 @@ inline void Key2SegMsg::set_uid(::PROTOBUF_NAMESPACE_ID::int64 value) {
|
|||
// @@protoc_insertion_point(field_set:milvus.grpc.Key2SegMsg.uid)
|
||||
}
|
||||
|
||||
// uint64 timestamp = 2;
|
||||
inline void Key2SegMsg::clear_timestamp() {
|
||||
timestamp_ = PROTOBUF_ULONGLONG(0);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::uint64 Key2SegMsg::timestamp() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.Key2SegMsg.timestamp)
|
||||
return timestamp_;
|
||||
}
|
||||
inline void Key2SegMsg::set_timestamp(::PROTOBUF_NAMESPACE_ID::uint64 value) {
|
||||
|
||||
timestamp_ = value;
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.Key2SegMsg.timestamp)
|
||||
}
|
||||
|
||||
// repeated int64 segment_id = 3;
|
||||
// repeated int64 segment_id = 2;
|
||||
inline int Key2SegMsg::segment_id_size() const {
|
||||
return segment_id_.size();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,164 @@
|
|||
syntax = "proto3";
|
||||
package etcdserverpb;
|
||||
|
||||
service Watch {
|
||||
// Watch watches for events happening or that have happened. Both input and output
|
||||
// are streams; the input stream is for creating and canceling watchers and the output
|
||||
// stream sends events. One watch RPC can watch on multiple key ranges, streaming events
|
||||
// for several watches at once. The entire event history can be watched starting from the
|
||||
// last compaction revision.
|
||||
rpc Watch(stream WatchRequest) returns (stream WatchResponse) {
|
||||
}
|
||||
}
|
||||
|
||||
message WatchRequest {
|
||||
// request_union is a request to either create a new watcher or cancel an existing watcher.
|
||||
oneof request_union {
|
||||
WatchCreateRequest create_request = 1;
|
||||
WatchCancelRequest cancel_request = 2;
|
||||
WatchProgressRequest progress_request = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message WatchCreateRequest {
|
||||
// key is the key to register for watching.
|
||||
bytes key = 1;
|
||||
|
||||
// range_end is the end of the range [key, range_end) to watch. If range_end is not given,
|
||||
// only the key argument is watched. If range_end is equal to '\0', all keys greater than
|
||||
// or equal to the key argument are watched.
|
||||
// If the range_end is one bit larger than the given key,
|
||||
// then all keys with the prefix (the given key) will be watched.
|
||||
bytes range_end = 2;
|
||||
|
||||
// start_revision is an optional revision to watch from (inclusive). No start_revision is "now".
|
||||
int64 start_revision = 3;
|
||||
|
||||
// progress_notify is set so that the etcd server will periodically send a WatchResponse with
|
||||
// no events to the new watcher if there are no recent events. It is useful when clients
|
||||
// wish to recover a disconnected watcher starting from a recent known revision.
|
||||
// The etcd server may decide how often it will send notifications based on current load.
|
||||
bool progress_notify = 4;
|
||||
|
||||
enum FilterType {
|
||||
// filter out put event.
|
||||
NOPUT = 0;
|
||||
// filter out delete event.
|
||||
NODELETE = 1;
|
||||
}
|
||||
|
||||
// filters filter the events at server side before it sends back to the watcher.
|
||||
repeated FilterType filters = 5;
|
||||
|
||||
// If prev_kv is set, created watcher gets the previous KV before the event happens.
|
||||
// If the previous KV is already compacted, nothing will be returned.
|
||||
bool prev_kv = 6;
|
||||
|
||||
// If watch_id is provided and non-zero, it will be assigned to this watcher.
|
||||
// Since creating a watcher in etcd is not a synchronous operation,
|
||||
// this can be used ensure that ordering is correct when creating multiple
|
||||
// watchers on the same stream. Creating a watcher with an ID already in
|
||||
// use on the stream will cause an error to be returned.
|
||||
int64 watch_id = 7;
|
||||
|
||||
// fragment enables splitting large revisions into multiple watch responses.
|
||||
bool fragment = 8;
|
||||
}
|
||||
|
||||
message WatchCancelRequest {
|
||||
// watch_id is the watcher id to cancel so that no more events are transmitted.
|
||||
int64 watch_id = 1;
|
||||
}
|
||||
|
||||
// Requests the a watch stream progress status be sent in the watch response stream as soon as
|
||||
// possible.
|
||||
message WatchProgressRequest {
|
||||
}
|
||||
|
||||
message WatchResponse {
|
||||
ResponseHeader header = 1;
|
||||
// watch_id is the ID of the watcher that corresponds to the response.
|
||||
int64 watch_id = 2;
|
||||
|
||||
// created is set to true if the response is for a create watch request.
|
||||
// The client should record the watch_id and expect to receive events for
|
||||
// the created watcher from the same stream.
|
||||
// All events sent to the created watcher will attach with the same watch_id.
|
||||
bool created = 3;
|
||||
|
||||
// canceled is set to true if the response is for a cancel watch request.
|
||||
// No further events will be sent to the canceled watcher.
|
||||
bool canceled = 4;
|
||||
|
||||
// compact_revision is set to the minimum index if a watcher tries to watch
|
||||
// at a compacted index.
|
||||
//
|
||||
// This happens when creating a watcher at a compacted revision or the watcher cannot
|
||||
// catch up with the progress of the key-value store.
|
||||
//
|
||||
// The client should treat the watcher as canceled and should not try to create any
|
||||
// watcher with the same start_revision again.
|
||||
int64 compact_revision = 5;
|
||||
|
||||
// cancel_reason indicates the reason for canceling the watcher.
|
||||
string cancel_reason = 6;
|
||||
|
||||
// framgment is true if large watch response was split over multiple responses.
|
||||
bool fragment = 7;
|
||||
|
||||
repeated Event events = 11;
|
||||
}
|
||||
|
||||
message ResponseHeader {
|
||||
// cluster_id is the ID of the cluster which sent the response.
|
||||
uint64 cluster_id = 1;
|
||||
// member_id is the ID of the member which sent the response.
|
||||
uint64 member_id = 2;
|
||||
// revision is the key-value store revision when the request was applied.
|
||||
// For watch progress responses, the header.revision indicates progress. All future events
|
||||
// recieved in this stream are guaranteed to have a higher revision number than the
|
||||
// header.revision number.
|
||||
int64 revision = 3;
|
||||
// raft_term is the raft term when the request was applied.
|
||||
uint64 raft_term = 4;
|
||||
}
|
||||
|
||||
|
||||
message KeyValue {
|
||||
// key is the key in bytes. An empty key is not allowed.
|
||||
bytes key = 1;
|
||||
// create_revision is the revision of last creation on this key.
|
||||
int64 create_revision = 2;
|
||||
// mod_revision is the revision of last modification on this key.
|
||||
int64 mod_revision = 3;
|
||||
// version is the version of the key. A deletion resets
|
||||
// the version to zero and any modification of the key
|
||||
// increases its version.
|
||||
int64 version = 4;
|
||||
// value is the value held by the key, in bytes.
|
||||
bytes value = 5;
|
||||
// lease is the ID of the lease that attached to key.
|
||||
// When the attached lease expires, the key will be deleted.
|
||||
// If lease is 0, then no lease is attached to the key.
|
||||
int64 lease = 6;
|
||||
}
|
||||
|
||||
message Event {
|
||||
enum EventType {
|
||||
PUT = 0;
|
||||
DELETE = 1;
|
||||
}
|
||||
// type is the kind of event. If type is a PUT, it indicates
|
||||
// new data has been stored to the key. If type is a DELETE,
|
||||
// it indicates the key was deleted.
|
||||
EventType type = 1;
|
||||
// kv holds the KeyValue for the event.
|
||||
// A PUT event contains current kv pair.
|
||||
// A PUT event with kv.Version=1 indicates the creation of a key.
|
||||
// A DELETE/EXPIRE event contains the deleted key with
|
||||
// its modification revision set to the revision of deletion.
|
||||
KeyValue kv = 2;
|
||||
|
||||
// prev_kv holds the key-value pair before the event happens.
|
||||
KeyValue prev_kv = 3;
|
||||
}
|
|
@ -22,6 +22,7 @@
|
|||
#include "utils/SignalHandler.h"
|
||||
#include "utils/Status.h"
|
||||
#include "message_client/Client.h"
|
||||
#include "etcd_watcher/etcd_watcher.h"
|
||||
|
||||
INITIALIZE_EASYLOGGINGPP
|
||||
|
||||
|
|
|
@ -2,130 +2,126 @@
|
|||
#include "pulsar/Result.h"
|
||||
#include "PartitionPolicy.h"
|
||||
#include "utils/CommonUtil.h"
|
||||
#include <omp.h>
|
||||
|
||||
namespace milvus::message_client {
|
||||
|
||||
std::map<int64_t, std::vector<std::shared_ptr<grpc::QueryResult>>> total_results;
|
||||
|
||||
MsgClientV2::MsgClientV2(int64_t client_id, const std::string &service_url, const uint32_t mut_parallelism, const pulsar::ClientConfiguration &config)
|
||||
: client_id_(client_id), service_url_(service_url), mut_parallelism_(mut_parallelism) {}
|
||||
MsgClientV2::MsgClientV2(int64_t client_id, std::string &service_url, const pulsar::ClientConfiguration &config)
|
||||
: client_id_(client_id), service_url_(service_url) {}
|
||||
|
||||
Status MsgClientV2::Init(const std::string &insert_delete,
|
||||
const std::string &search,
|
||||
const std::string &time_sync,
|
||||
const std::string &search_by_id,
|
||||
const std::string &search_result) {
|
||||
const std::string &search,
|
||||
const std::string &time_sync,
|
||||
const std::string &search_by_id,
|
||||
const std::string &search_result) {
|
||||
//create pulsar client
|
||||
auto pulsar_client = std::make_shared<MsgClient>(service_url_);
|
||||
//create pulsar producer
|
||||
ProducerConfiguration producerConfiguration;
|
||||
producerConfiguration.setPartitionsRoutingMode(ProducerConfiguration::CustomPartition);
|
||||
producerConfiguration.setMessageRouter(std::make_shared<PartitionPolicy>());
|
||||
// insert_delete_producer_ = std::make_shared<MsgProducer>(pulsar_client, insert_delete, producerConfiguration);
|
||||
insert_delete_producer_ = std::make_shared<MsgProducer>(pulsar_client, insert_delete, producerConfiguration);
|
||||
search_producer_ = std::make_shared<MsgProducer>(pulsar_client, search, producerConfiguration);
|
||||
search_by_id_producer_ = std::make_shared<MsgProducer>(pulsar_client, search_by_id, producerConfiguration);
|
||||
time_sync_producer_ = std::make_shared<MsgProducer>(pulsar_client, time_sync);
|
||||
|
||||
for (auto i = 0; i < mut_parallelism_; i++) {
|
||||
paralle_mut_producers_.emplace_back(std::make_shared<MsgProducer>(pulsar_client,
|
||||
insert_delete,
|
||||
producerConfiguration));
|
||||
}
|
||||
//create pulsar consumer
|
||||
std::string subscribe_name = std::to_string(CommonUtil::RandomUINT64());
|
||||
consumer_ = std::make_shared<MsgConsumer>(pulsar_client, search_result + subscribe_name);
|
||||
consumer_ = std::make_shared<MsgConsumer>(pulsar_client, search_result+subscribe_name);
|
||||
|
||||
auto result = consumer_->subscribe(search_result);
|
||||
if (result != pulsar::Result::ResultOk) {
|
||||
return Status(SERVER_UNEXPECTED_ERROR,
|
||||
"Pulsar message client init occur error, " + std::string(pulsar::strResult(result)));
|
||||
return Status(SERVER_UNEXPECTED_ERROR, "Pulsar message client init occur error, " + std::string(pulsar::strResult(result)));
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
int64_t GetQueryNodeNum() {
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
|
||||
milvus::grpc::QueryResult Aggregation(std::vector<std::shared_ptr<grpc::QueryResult>> &results) {
|
||||
//TODO: QueryNode has only one
|
||||
int64_t length = results.size();
|
||||
std::vector<float> all_scores;
|
||||
std::vector<float> all_distance;
|
||||
std::vector<grpc::KeyValuePair> all_kv_pairs;
|
||||
std::vector<int> index(length * results[0]->distances_size());
|
||||
milvus::grpc::QueryResult Aggregation(std::vector<std::shared_ptr<grpc::QueryResult>> &results){
|
||||
//TODO: QueryNode has only one
|
||||
int64_t length = results.size();
|
||||
std::vector<float> all_scores;
|
||||
std::vector<float> all_distance;
|
||||
std::vector<grpc::KeyValuePair> all_kv_pairs;
|
||||
std::vector<int> index(length * results[0]->scores_size());
|
||||
|
||||
for (int n = 0; n < length * results[0]->distances_size(); ++n) {
|
||||
index[n] = n;
|
||||
}
|
||||
|
||||
for (int i = 0; i < length; i++) {
|
||||
for (int j = 0; j < results[i]->distances_size(); j++) {
|
||||
// all_scores.push_back(results[i]->scores()[j]);
|
||||
all_distance.push_back(results[i]->distances()[j]);
|
||||
// all_kv_pairs.push_back(results[i]->extra_params()[j]);
|
||||
for (int n = 0; n < length * results[0]->scores_size(); ++n) {
|
||||
index[n] = n;
|
||||
}
|
||||
}
|
||||
|
||||
for (int k = 0; k < all_distance.size() - 1; ++k) {
|
||||
for (int l = k + 1; l < all_distance.size(); ++l) {
|
||||
|
||||
if (all_distance[l] > all_distance[k]) {
|
||||
float distance_temp = all_distance[k];
|
||||
all_distance[k] = all_distance[l];
|
||||
all_distance[l] = distance_temp;
|
||||
|
||||
int index_temp = index[k];
|
||||
index[k] = index[l];
|
||||
index[l] = index_temp;
|
||||
}
|
||||
for (int i = 0; i < length; i++){
|
||||
for (int j = 0; j < results[i]->scores_size(); j++){
|
||||
all_scores.push_back(results[i]->scores()[j]);
|
||||
all_distance.push_back(results[i]->distances()[j]);
|
||||
all_kv_pairs.push_back(results[i]->extra_params()[j]);
|
||||
}
|
||||
}
|
||||
|
||||
for (int k = 0; k < all_distance.size() - 1; ++k) {
|
||||
for (int l = k + 1; l < all_distance.size(); ++l) {
|
||||
|
||||
if (all_distance[l] > all_distance[k]){
|
||||
float distance_temp = all_distance[k];
|
||||
all_distance[k] = all_distance[l];
|
||||
all_distance[l] = distance_temp;
|
||||
|
||||
int index_temp = index[k];
|
||||
index[k] = index[l];
|
||||
index[l] = index_temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
grpc::QueryResult result;
|
||||
|
||||
// result_prt->set_allocated_status(const_cast<milvus::grpc::Status*>(&results[0]->status()));
|
||||
result.mutable_status()->CopyFrom(results[0]->status());
|
||||
result.mutable_entities()->CopyFrom(results[0]->entities());
|
||||
result.set_row_num(results[0]->row_num());
|
||||
|
||||
for (int m = 0; m < results[0]->distances_size(); ++m) {
|
||||
// result.add_scores(all_scores[index[m]]);
|
||||
for (int m = 0; m < results[0]->scores_size(); ++m) {
|
||||
result.add_scores(all_scores[index[m]]);
|
||||
result.add_distances(all_distance[m]);
|
||||
// result.add_extra_params();
|
||||
// result.mutable_extra_params(m)->CopyFrom(all_kv_pairs[index[m]]);
|
||||
result.add_extra_params();
|
||||
result.mutable_extra_params(m)->CopyFrom(all_kv_pairs[index[m]]);
|
||||
}
|
||||
|
||||
// result.set_query_id(results[0]->query_id());
|
||||
// result.set_client_id(results[0]->client_id());
|
||||
result.set_query_id(results[0]->query_id());
|
||||
result.set_client_id(results[0]->client_id());
|
||||
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
Status MsgClientV2::GetQueryResult(int64_t query_id, milvus::grpc::QueryResult* result) {
|
||||
milvus::grpc::QueryResult MsgClientV2::GetQueryResult(int64_t query_id) {
|
||||
// Result result = MsgProducer::createProducer("result-partition-0");
|
||||
auto client = std::make_shared<MsgClient>("pulsar://localhost:6650");
|
||||
MsgConsumer consumer(client, "my_consumer");
|
||||
consumer.subscribe("result");
|
||||
|
||||
std::vector<std::shared_ptr<grpc::QueryResult>> results;
|
||||
|
||||
int64_t query_node_num = GetQueryNodeNum();
|
||||
|
||||
std::map<int64_t, std::vector<std::shared_ptr<grpc::QueryResult>>> total_results;
|
||||
|
||||
while (true) {
|
||||
auto received_result = total_results[query_id];
|
||||
if (received_result.size() == query_node_num) {
|
||||
break;
|
||||
}
|
||||
Message msg;
|
||||
consumer_->receive(msg);
|
||||
consumer.receive(msg);
|
||||
|
||||
grpc::QueryResult search_res_msg;
|
||||
auto status = search_res_msg.ParseFromString(msg.getDataAsString());
|
||||
if (status) {
|
||||
auto message = std::make_shared<grpc::QueryResult>(search_res_msg);
|
||||
total_results[message->query_id()].push_back(message);
|
||||
consumer_->acknowledge(msg);
|
||||
} else {
|
||||
return Status(DB_ERROR, "can't parse message which from pulsar!");
|
||||
consumer.acknowledge(msg);
|
||||
}
|
||||
}
|
||||
*result = Aggregation(total_results[query_id]);
|
||||
return Status::OK();
|
||||
|
||||
return Aggregation(total_results[query_id]);
|
||||
}
|
||||
|
||||
Status MsgClientV2::SendMutMessage(const milvus::grpc::InsertParam &request, uint64_t timestamp) {
|
||||
|
@ -133,12 +129,8 @@ Status MsgClientV2::SendMutMessage(const milvus::grpc::InsertParam &request, uin
|
|||
auto row_count = request.rows_data_size();
|
||||
// TODO: Get the segment from master
|
||||
int64_t segment = 0;
|
||||
auto stats = std::vector<pulsar::Result>(ParallelNum);
|
||||
|
||||
#pragma omp parallel for default(none), shared(row_count, request, timestamp, segment, stats), num_threads(ParallelNum)
|
||||
milvus::grpc::InsertOrDeleteMsg mut_msg;
|
||||
for (auto i = 0; i < row_count; i++) {
|
||||
milvus::grpc::InsertOrDeleteMsg mut_msg;
|
||||
int this_thread = omp_get_thread_num();
|
||||
mut_msg.set_op(milvus::grpc::OpType::INSERT);
|
||||
mut_msg.set_uid(request.entity_id_array(i));
|
||||
mut_msg.set_client_id(client_id_);
|
||||
|
@ -149,160 +141,36 @@ Status MsgClientV2::SendMutMessage(const milvus::grpc::InsertParam &request, uin
|
|||
mut_msg.mutable_rows_data()->CopyFrom(request.rows_data(i));
|
||||
mut_msg.mutable_extra_params()->CopyFrom(request.extra_params());
|
||||
|
||||
auto result = paralle_mut_producers_[this_thread]->send(mut_msg);
|
||||
auto result = insert_delete_producer_->send(mut_msg);
|
||||
if (result != pulsar::ResultOk) {
|
||||
stats[this_thread] = result;
|
||||
}
|
||||
}
|
||||
for (auto &stat : stats) {
|
||||
if (stat == pulsar::ResultOk) {
|
||||
return Status(DB_ERROR, pulsar::strResult(stat));
|
||||
// TODO: error code
|
||||
return Status(DB_ERROR, pulsar::strResult(result));
|
||||
}
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
Status MsgClientV2::SendMutMessage(const milvus::grpc::DeleteByIDParam &request, uint64_t timestamp) {
|
||||
auto stats = std::vector<pulsar::Result>(ParallelNum);
|
||||
#pragma omp parallel for default(none), shared( request, timestamp, stats), num_threads(ParallelNum)
|
||||
for (auto i = 0; i < request.id_array_size(); i++) {
|
||||
milvus::grpc::InsertOrDeleteMsg mut_msg;
|
||||
milvus::grpc::InsertOrDeleteMsg mut_msg;
|
||||
for (auto id: request.id_array()) {
|
||||
mut_msg.set_op(milvus::grpc::OpType::DELETE);
|
||||
mut_msg.set_uid(GetUniqueQId());
|
||||
mut_msg.set_client_id(client_id_);
|
||||
mut_msg.set_uid(request.id_array(i));
|
||||
mut_msg.set_uid(id);
|
||||
mut_msg.set_collection_name(request.collection_name());
|
||||
mut_msg.set_timestamp(timestamp);
|
||||
|
||||
int this_thread = omp_get_thread_num();
|
||||
auto result = paralle_mut_producers_[this_thread]->send(mut_msg);
|
||||
auto result = insert_delete_producer_->send(mut_msg);
|
||||
if (result != pulsar::ResultOk) {
|
||||
stats[this_thread] = result;
|
||||
}
|
||||
}
|
||||
for (auto &stat : stats) {
|
||||
if (stat == pulsar::ResultOk) {
|
||||
return Status(DB_ERROR, pulsar::strResult(stat));
|
||||
// TODO: error code
|
||||
return Status(DB_ERROR, pulsar::strResult(result));
|
||||
}
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
Status MsgClientV2::SendQueryMessage(const milvus::grpc::SearchParam &request, uint64_t timestamp, int64_t &query_id) {
|
||||
milvus::grpc::SearchMsg search_msg;
|
||||
|
||||
query_id = GetUniqueQId();
|
||||
search_msg.set_collection_name(request.collection_name());
|
||||
search_msg.set_uid(query_id);
|
||||
//TODO: get client id from master
|
||||
search_msg.set_client_id(1);
|
||||
search_msg.set_timestamp(timestamp);
|
||||
search_msg.set_dsl(request.dsl());
|
||||
|
||||
//TODO: get data type from master
|
||||
milvus::grpc::VectorRowRecord vector_row_recode;
|
||||
std::vector<float> vectors_records;
|
||||
for (int i = 0; i < request.vector_param_size(); ++i) {
|
||||
search_msg.add_json(request.vector_param(i).json());
|
||||
for (int j = 0; j < request.vector_param(i).row_record().records_size(); ++j) {
|
||||
for (int k = 0; k < request.vector_param(i).row_record().records(j).float_data_size(); ++k) {
|
||||
vector_row_recode.add_float_data(request.vector_param(i).row_record().records(j).float_data(k));
|
||||
}
|
||||
vector_row_recode.set_binary_data(request.vector_param(i).row_record().records(j).binary_data());
|
||||
}
|
||||
}
|
||||
|
||||
search_msg.mutable_records()->CopyFrom(vector_row_recode);
|
||||
|
||||
for (int m = 0; m < request.partition_tag_size(); ++m) {
|
||||
search_msg.add_partition_tag(request.partition_tag(m));
|
||||
}
|
||||
|
||||
for (int l = 0; l < request.extra_params_size(); ++l) {
|
||||
search_msg.mutable_extra_params(l)->CopyFrom(request.extra_params(l));
|
||||
}
|
||||
|
||||
std::cout << search_msg.collection_name() << std::endl;
|
||||
auto result = search_producer_->send(search_msg);
|
||||
if (result != pulsar::Result::ResultOk) {
|
||||
return Status(DB_ERROR, pulsar::strResult(result));
|
||||
}
|
||||
|
||||
return Status::OK();
|
||||
|
||||
// milvus::grpc::QueryResult fake_message;
|
||||
// milvus::grpc::QueryResult fake_message2;
|
||||
//
|
||||
// milvus::grpc::Status fake_status;
|
||||
// fake_status.set_error_code(milvus::grpc::ErrorCode::SUCCESS);
|
||||
// std::string aaa = "hahaha";
|
||||
// fake_status.set_reason(aaa);
|
||||
//
|
||||
// milvus::grpc::RowData fake_row_data;
|
||||
// fake_row_data.set_blob("fake_row_data");
|
||||
//
|
||||
// milvus::grpc::Entities fake_entities;
|
||||
//// fake_entities.set_allocated_status(&fake_status);
|
||||
// fake_entities.mutable_status()->CopyFrom(fake_status);
|
||||
// for (int i = 0; i < 10; i++){
|
||||
// fake_entities.add_ids(i);
|
||||
// fake_entities.add_valid_row(true);
|
||||
// fake_entities.add_rows_data()->CopyFrom(fake_row_data);
|
||||
// }
|
||||
//
|
||||
// int64_t fake_row_num = 10;
|
||||
//
|
||||
// float fake_scores[10] = {1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 0.0};
|
||||
// float fake_distance[10] = {9.7, 9.6, 9.5, 9.8, 8.7, 8.8, 9.9, 8.8, 9.7, 8.9};
|
||||
//
|
||||
// std::vector<milvus::grpc::KeyValuePair> fake_extra_params;
|
||||
// milvus::grpc::KeyValuePair keyValuePair;
|
||||
// for (int i = 0; i < 10; ++i) {
|
||||
// keyValuePair.set_key(std::to_string(i));
|
||||
// keyValuePair.set_value(std::to_string(i + 10));
|
||||
// fake_extra_params.push_back(keyValuePair);
|
||||
// }
|
||||
//
|
||||
// int64_t fake_query_id = 10;
|
||||
// int64_t fake_client_id = 1;
|
||||
//
|
||||
// fake_message.mutable_status()->CopyFrom(fake_status);
|
||||
// fake_message.mutable_entities()->CopyFrom(fake_entities);
|
||||
// fake_message.set_row_num(fake_row_num);
|
||||
// for (int i = 0; i < 10; i++) {
|
||||
// fake_message.add_scores(fake_scores[i]);
|
||||
// fake_message.add_distances(fake_distance[i]);
|
||||
// fake_message.add_extra_params()->CopyFrom(fake_extra_params[i]);
|
||||
// }
|
||||
//
|
||||
// fake_message.set_query_id(fake_query_id);
|
||||
// fake_message.set_client_id(fake_client_id);
|
||||
//
|
||||
// float fake_scores2[10] = {2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 0.0, 1.1};
|
||||
// float fake_distance2[10] = {9.8, 8.6, 9.6, 9.7, 8.9, 8.8, 9.0, 9.8, 9.7, 8.9};
|
||||
//
|
||||
// fake_message2.mutable_status()->CopyFrom(fake_status);
|
||||
// fake_message2.mutable_entities()->CopyFrom(fake_entities);
|
||||
// fake_message2.set_row_num(fake_row_num);
|
||||
// for (int j = 0; j < 10; ++j) {
|
||||
// fake_message2.add_scores(fake_scores2[j]);
|
||||
// fake_message2.add_distances(fake_distance2[j]);
|
||||
// fake_message2.add_extra_params()->CopyFrom(fake_extra_params[j]);
|
||||
// }
|
||||
//
|
||||
// fake_message2.set_query_id(fake_query_id);
|
||||
// fake_message2.set_client_id(fake_client_id);
|
||||
//
|
||||
// search_by_id_producer_->send(fake_message.SerializeAsString());
|
||||
// search_by_id_producer_->send(fake_message2.SerializeAsString());
|
||||
// return Status::OK();
|
||||
}
|
||||
|
||||
MsgClientV2::~MsgClientV2() {
|
||||
// insert_delete_producer_->close();
|
||||
for (auto& producer: paralle_mut_producers_){
|
||||
producer->close();
|
||||
}
|
||||
insert_delete_producer_->close();
|
||||
search_producer_->close();
|
||||
search_by_id_producer_->close();
|
||||
time_sync_producer_->close();
|
||||
|
|
|
@ -6,13 +6,10 @@
|
|||
#include "grpc/message.pb.h"
|
||||
|
||||
namespace milvus::message_client {
|
||||
constexpr uint32_t ParallelNum = 12 * 20;
|
||||
|
||||
class MsgClientV2 {
|
||||
public:
|
||||
MsgClientV2(int64_t client_id,
|
||||
const std::string &service_url,
|
||||
const uint32_t mut_parallelism = ParallelNum,
|
||||
std::string &service_url,
|
||||
const pulsar::ClientConfiguration &config = pulsar::ClientConfiguration());
|
||||
~MsgClientV2();
|
||||
|
||||
|
@ -29,9 +26,9 @@ class MsgClientV2 {
|
|||
Status SendMutMessage(const milvus::grpc::DeleteByIDParam &request, uint64_t timestamp);
|
||||
|
||||
//
|
||||
Status SendQueryMessage(const milvus::grpc::SearchParam &request, uint64_t timestamp, int64_t &query_id);
|
||||
Status SendQueryMessage(const milvus::grpc::SearchParam &request);
|
||||
|
||||
Status GetQueryResult(int64_t query_id, milvus::grpc::QueryResult* result);
|
||||
static milvus::grpc::QueryResult GetQueryResult(int64_t query_id);
|
||||
|
||||
private:
|
||||
int64_t GetUniqueQId() {
|
||||
|
@ -43,11 +40,9 @@ class MsgClientV2 {
|
|||
int64_t client_id_;
|
||||
std::string service_url_;
|
||||
std::shared_ptr<MsgConsumer> consumer_;
|
||||
// std::shared_ptr<MsgProducer> insert_delete_producer_;
|
||||
std::shared_ptr<MsgProducer> insert_delete_producer_;
|
||||
std::shared_ptr<MsgProducer> search_producer_;
|
||||
std::shared_ptr<MsgProducer> time_sync_producer_;
|
||||
std::shared_ptr<MsgProducer> search_by_id_producer_;
|
||||
std::vector<std::shared_ptr<MsgProducer>> paralle_mut_producers_;
|
||||
const uint32_t mut_parallelism_;
|
||||
};
|
||||
}
|
|
@ -13,6 +13,10 @@
|
|||
|
||||
set( GRPC_SERVICE_FILES ${MILVUS_ENGINE_SRC}/grpc/message.grpc.pb.cc
|
||||
${MILVUS_ENGINE_SRC}/grpc/message.pb.cc
|
||||
${MILVUS_ENGINE_SRC}/grpc/hello.grpc.pb.cc
|
||||
${MILVUS_ENGINE_SRC}/grpc/hello.pb.cc
|
||||
${MILVUS_ENGINE_SRC}/grpc/master.grpc.pb.cc
|
||||
${MILVUS_ENGINE_SRC}/grpc/master.pb.cc
|
||||
)
|
||||
|
||||
aux_source_directory( ${MILVUS_ENGINE_SRC}/server SERVER_SERVICE_FILES )
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
// #include "scheduler/SchedInst.h"
|
||||
#include "server/grpc_impl/GrpcServer.h"
|
||||
#include "server/init/CpuChecker.h"
|
||||
#include "server/init/Directory.h"
|
||||
// #include "server/init/GpuChecker.h"
|
||||
#include "server/init/StorageChecker.h"
|
||||
#include "src/version.h"
|
||||
|
@ -147,7 +146,7 @@ Server::Start() {
|
|||
tracing_config_path.empty() ? tracing::TracerUtil::InitGlobal()
|
||||
: tracing::TracerUtil::InitGlobal(tracing_config_path);
|
||||
|
||||
auto time_zone = config.timezone();
|
||||
auto time_zone = config.general.timezone();
|
||||
|
||||
if (time_zone.length() == 3) {
|
||||
time_zone = "CUT";
|
||||
|
@ -171,8 +170,6 @@ Server::Start() {
|
|||
STATUS_CHECK(LogMgr::InitLog(config.logs.trace.enable(), config.logs.level(), config.logs.path(),
|
||||
config.logs.max_log_file_size(), config.logs.log_rotate_num()));
|
||||
|
||||
STATUS_CHECK(Directory::Initialize(config.logs.path()));
|
||||
|
||||
// print version information
|
||||
LOG_SERVER_INFO_ << "Milvus " << BUILD_TYPE << " version: v" << MILVUS_VERSION << ", built at " << BUILD_TIME;
|
||||
#ifdef MILVUS_GPU_VERSION
|
||||
|
|
|
@ -175,10 +175,9 @@ ReqHandler::DeleteEntityByID(const ContextPtr& context, const ::milvus::grpc::De
|
|||
Status
|
||||
ReqHandler::Search(const ContextPtr& context, const query::QueryPtr& query_ptr, const milvus::json& json_params,
|
||||
engine::QueryResultPtr& result) {
|
||||
// BaseReqPtr req_ptr = SearchReq::Create(context, query_ptr, json_params, result);
|
||||
// ReqScheduler::ExecReq(req_ptr);
|
||||
// return req_ptr->status();
|
||||
return Status::OK();
|
||||
BaseReqPtr req_ptr = SearchReq::Create(context, query_ptr, json_params, result);
|
||||
ReqScheduler::ExecReq(req_ptr);
|
||||
return req_ptr->status();
|
||||
}
|
||||
|
||||
Status
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
#include "server/delivery/request/SearchReq.h"
|
||||
#include "server/MessageWrapper.h"
|
||||
// #include "db/Utils.h"
|
||||
#include "server/ValidationUtil.h"
|
||||
#include "utils/CommonUtil.h"
|
||||
|
@ -29,38 +28,25 @@
|
|||
namespace milvus {
|
||||
namespace server {
|
||||
|
||||
SearchReq::SearchReq(const ContextPtr& context, const ::milvus::grpc::SearchParam *request,
|
||||
::milvus::grpc::QueryResult *result)
|
||||
SearchReq::SearchReq(const ContextPtr& context, const query::QueryPtr& query_ptr, const milvus::json& json_params,
|
||||
engine::QueryResultPtr& result)
|
||||
: BaseReq(context, ReqType::kSearch),
|
||||
request_(request),
|
||||
query_ptr_(query_ptr),
|
||||
json_params_(json_params),
|
||||
result_(result) {
|
||||
}
|
||||
|
||||
BaseReqPtr
|
||||
SearchReq::Create(const ContextPtr& context, const ::milvus::grpc::SearchParam *request,
|
||||
::milvus::grpc::QueryResult *response) {
|
||||
|
||||
return std::shared_ptr<BaseReq>(new SearchReq(context, request, response));
|
||||
SearchReq::Create(const ContextPtr& context, const query::QueryPtr& query_ptr, const milvus::json& json_params,
|
||||
engine::QueryResultPtr& result) {
|
||||
return std::shared_ptr<BaseReq>(new SearchReq(context, query_ptr, json_params, result));
|
||||
}
|
||||
|
||||
Status
|
||||
SearchReq::OnExecute() {
|
||||
auto message_wrapper = milvus::server::MessageWrapper::GetInstance();
|
||||
message_wrapper.Init();
|
||||
auto client = message_wrapper.MessageClient();
|
||||
|
||||
int64_t query_id;
|
||||
milvus::grpc::SearchParam request;
|
||||
|
||||
auto send_status = client->SendQueryMessage(*request_, timestamp_, query_id);
|
||||
|
||||
if (!send_status.ok()){
|
||||
return send_status;
|
||||
}
|
||||
|
||||
Status status = client->GetQueryResult(query_id, result_);
|
||||
|
||||
return status;
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
} // namespace server
|
||||
|
|
|
@ -25,19 +25,20 @@ namespace server {
|
|||
class SearchReq : public BaseReq {
|
||||
public:
|
||||
static BaseReqPtr
|
||||
Create(const ContextPtr& context, const ::milvus::grpc::SearchParam *request,
|
||||
::milvus::grpc::QueryResult *response);
|
||||
Create(const ContextPtr& context, const query::QueryPtr& query_ptr, const milvus::json& json_params,
|
||||
engine::QueryResultPtr& result);
|
||||
|
||||
protected:
|
||||
SearchReq(const ContextPtr& context, const ::milvus::grpc::SearchParam *request,
|
||||
::milvus::grpc::QueryResult *result);
|
||||
SearchReq(const ContextPtr& context, const query::QueryPtr& query_ptr, const milvus::json& json_params,
|
||||
engine::QueryResultPtr& result);
|
||||
|
||||
Status
|
||||
OnExecute() override;
|
||||
|
||||
private:
|
||||
const ::milvus::grpc::SearchParam *request_;
|
||||
::milvus::grpc::QueryResult* result_;
|
||||
milvus::query::QueryPtr query_ptr_;
|
||||
milvus::json json_params_;
|
||||
engine::QueryResultPtr& result_;
|
||||
};
|
||||
|
||||
} // namespace server
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <src/server/delivery/request/SearchReq.h>
|
||||
#include <src/server/delivery/ReqScheduler.h>
|
||||
|
||||
#include "query/BinaryQuery.h"
|
||||
#include "server/ValidationUtil.h"
|
||||
|
@ -851,9 +849,6 @@ GrpcRequestHandler::Search(::grpc::ServerContext *context, const ::milvus::grpc:
|
|||
CHECK_NULLPTR_RETURN(request);
|
||||
LOG_SERVER_INFO_ << LogOut("Request [%s] %s begin.", GetContext(context)->ReqID().c_str(), __func__);
|
||||
|
||||
//TODO: check if the request is legal
|
||||
BaseReqPtr req_ptr = SearchReq::Create(GetContext(context), request, response);
|
||||
ReqScheduler::ExecReq(req_ptr);
|
||||
return ::grpc::Status::OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
#include "GrpcRequestHandler.h"
|
||||
#include "config/ServerConfig.h"
|
||||
#include "server/hello/HelloService.h"
|
||||
#include "server/hello/ReportAddress.h"
|
||||
// #include "server/DBWrapper.h"
|
||||
#include "server/grpc_impl/interceptor/SpanInterceptor.h"
|
||||
#include "utils/Log.h"
|
||||
|
@ -82,7 +84,7 @@ Status
|
|||
GrpcServer::StartService() {
|
||||
SetThreadName("grpcserv_thread");
|
||||
|
||||
std::string server_address(config.network.address() + ":" + std::to_string(config.network.port()));
|
||||
std::string server_address(config.network.bind.address() + ":" + std::to_string(config.network.bind.port()));
|
||||
|
||||
::grpc::ServerBuilder builder;
|
||||
builder.SetOption(std::unique_ptr<::grpc::ServerBuilderOption>(new NoReusePortOption));
|
||||
|
@ -99,6 +101,9 @@ GrpcServer::StartService() {
|
|||
builder.AddListeningPort(server_address, ::grpc::InsecureServerCredentials());
|
||||
builder.RegisterService(&service);
|
||||
|
||||
HelloService helloService;
|
||||
builder.RegisterService(&helloService);
|
||||
|
||||
|
||||
// timeSync
|
||||
// client id should same to MessageWrapper
|
||||
|
@ -107,6 +112,14 @@ GrpcServer::StartService() {
|
|||
(std::string{"pulsar://"} + config.pulsar.address() + ":" + std::to_string(config.pulsar.port()));
|
||||
timesync::TimeSync syc(client_id,GetMessageTimeSyncTime, 20, pulsar_server_addr, "TimeSync");
|
||||
|
||||
// report address to master, test only for now
|
||||
// auto reportClient = new ReportClient(::grpc::CreateChannel("192.168.2.28:50051",
|
||||
// ::grpc::InsecureChannelCredentials()));
|
||||
// auto status = reportClient->ReportAddress();
|
||||
// delete(reportClient);
|
||||
// if (!status.ok()){
|
||||
// return Status(milvus::DB_ERROR, "");
|
||||
// }
|
||||
|
||||
// Add gRPC interceptor
|
||||
using InterceptorI = ::grpc::experimental::ServerInterceptorFactoryInterface;
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef MILVUS_HELLOSERVICE_H
|
||||
#define MILVUS_HELLOSERVICE_H
|
||||
|
||||
#include "grpc++/grpc++.h"
|
||||
#include <src/grpc/hello.grpc.pb.h>
|
||||
|
||||
class HelloService final : public ::milvus::grpc::HelloService::Service{
|
||||
::grpc::Status SayHello
|
||||
(::grpc::ServerContext* context, const ::milvus::grpc::HelloRequest* request, ::milvus::grpc::HelloReply* response){
|
||||
const auto& name = request->name();
|
||||
response->mutable_msg()->append( "hello " + name);
|
||||
return ::grpc::Status::OK;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif //MILVUS_HELLOSERVICE_H
|
|
@ -0,0 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include "grpc++/grpc++.h"
|
||||
#include "src/grpc/master.grpc.pb.h"
|
||||
|
||||
class ReportClient {
|
||||
public:
|
||||
ReportClient(const std::shared_ptr<::grpc::ChannelInterface>& channel)
|
||||
: stub_(master::Greeter::NewStub(channel)) {}
|
||||
|
||||
milvus::Status
|
||||
ReportAddress(){
|
||||
grpc::ClientContext context;
|
||||
master::Request req;
|
||||
master::Reply rsp;
|
||||
|
||||
req.set_address("192.168.2.18:19530");
|
||||
auto status = stub_->ReportAddress(&context, req, &rsp);
|
||||
if (status.ok() && rsp.status()){
|
||||
std::cout << "Report address to master Succeed" << std::endl;
|
||||
return milvus::Status::OK();
|
||||
} else{
|
||||
std::cout << "Error occur when report address to master " << status.error_message() << std::endl;
|
||||
return milvus::Status(milvus::SERVER_ERROR_CODE_BASE, "");
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
std::unique_ptr<master::Greeter::Stub> stub_;
|
||||
};
|
|
@ -1,74 +0,0 @@
|
|||
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
#include "server/init/Directory.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <string>
|
||||
|
||||
#include "config/ServerConfig.h"
|
||||
|
||||
namespace milvus::server {
|
||||
|
||||
Status
|
||||
Directory::Initialize(const std::string& path) {
|
||||
try {
|
||||
init(path);
|
||||
} catch (std::exception& ex) {
|
||||
return Status(SERVER_UNEXPECTED_ERROR, ex.what());
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
||||
Status
|
||||
Directory::Access(const std::string& path) {
|
||||
try {
|
||||
access_check(path);
|
||||
} catch (std::exception& ex) {
|
||||
return Status(SERVER_UNEXPECTED_ERROR, ex.what());
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
void
|
||||
Directory::init(const std::string& path) {
|
||||
if (path.empty()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// Returns True if a new directory was created, otherwise false.
|
||||
boost::filesystem::create_directories(path);
|
||||
} catch (std::exception& ex) {
|
||||
std::string msg = "Cannot create directory: " + path + ", reason: " + ex.what();
|
||||
throw std::runtime_error(msg);
|
||||
} catch (...) {
|
||||
std::string msg = "Cannot create directory: " + path;
|
||||
throw std::runtime_error(msg);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Directory::access_check(const std::string& path) {
|
||||
if (path.empty()) {
|
||||
return;
|
||||
}
|
||||
int ret = access(path.c_str(), F_OK | R_OK | W_OK);
|
||||
if (0 != ret) {
|
||||
std::string msg = "Cannot access path: " + path + ", error(" + std::to_string(errno) +
|
||||
"): " + std::string(strerror(errno)) + ".";
|
||||
throw std::runtime_error(msg);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace milvus::server
|
|
@ -1,42 +0,0 @@
|
|||
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "utils/Status.h"
|
||||
|
||||
namespace milvus::server {
|
||||
|
||||
class Directory {
|
||||
public:
|
||||
static Status
|
||||
Initialize(const std::string& path);
|
||||
|
||||
static Status
|
||||
Lock(const std::string& path);
|
||||
|
||||
static Status
|
||||
Access(const std::string& path);
|
||||
|
||||
private:
|
||||
static void
|
||||
init(const std::string& path);
|
||||
|
||||
static void
|
||||
lock(const std::string& path);
|
||||
|
||||
static void
|
||||
access_check(const std::string& path);
|
||||
};
|
||||
|
||||
} // namespace milvus::server
|
|
@ -37,6 +37,18 @@ StorageChecker::CheckStoragePermission() {
|
|||
return Status(SERVER_UNEXPECTED_ERROR, err_msg);
|
||||
}
|
||||
|
||||
/* Check db directory write permission */
|
||||
const std::string& primary_path = config.storage.path();
|
||||
|
||||
ret = access(primary_path.c_str(), F_OK | R_OK | W_OK);
|
||||
if (0 != ret) {
|
||||
std::string err_msg = " Access DB storage path " + primary_path + " fail. " + strerror(errno) +
|
||||
"(code: " + std::to_string(errno) + ")";
|
||||
LOG_SERVER_FATAL_ << err_msg;
|
||||
std::cerr << err_msg << std::endl;
|
||||
return Status(SERVER_UNEXPECTED_ERROR, err_msg);
|
||||
}
|
||||
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
|
|
@ -66,6 +66,10 @@ add_custom_command(TARGET generate_suvlim_pb_grpc
|
|||
COMMAND echo "${PROTOC_EXCUTABLE}"
|
||||
COMMAND bash "${PROTO_GEN_SCRIPTS_DIR}/generate_go.sh" -p "${PROTOC_EXCUTABLE}"
|
||||
COMMAND echo "${PROTO_GEN_SCRIPTS_DIR}/generate_cpp.sh" -p "${PROTOC_EXCUTABLE}" -g "${GRPC_CPP_PLUGIN_EXCUTABLE}"
|
||||
COMMAND ${PROTOC_EXCUTABLE} -I "${PROTO_PATH}/proto" --grpc_out "${PROTO_PATH}" --cpp_out "${PROTO_PATH}"
|
||||
--plugin=protoc-gen-grpc="${GRPC_CPP_PLUGIN_EXCUTABLE}"
|
||||
"${PROTO_PATH}/proto/etcd.proto"
|
||||
DEPENDS "${PROTO_PATH}/proto/etcd.proto"
|
||||
)
|
||||
|
||||
set_property( GLOBAL PROPERTY PROTOC_EXCUTABLE ${PROTOC_EXCUTABLE})
|
||||
|
|
|
@ -1,88 +1,81 @@
|
|||
#include <gtest/gtest.h>
|
||||
#include "src/message_client/ClientV2.h"
|
||||
#include "message_client/ClientV2.h"
|
||||
|
||||
TEST(CLIENT_CPP, GetResult) {
|
||||
// auto client= std::make_shared<milvus::message_client::MsgClient>("pulsar://localhost:6650");
|
||||
// milvus::message_client::MsgProducer producer(client,"test");
|
||||
// producer.createProducer("result");
|
||||
// producer.send("result");
|
||||
// milvus::grpc::QueryResult fake_message;
|
||||
// milvus::grpc::QueryResult fake_message2;
|
||||
//
|
||||
// milvus::grpc::Status fake_status;
|
||||
// fake_status.set_error_code(milvus::grpc::ErrorCode::SUCCESS);
|
||||
// std::string aaa = "hahaha";
|
||||
// fake_status.set_reason(aaa);
|
||||
//
|
||||
// milvus::grpc::RowData fake_row_data;
|
||||
// fake_row_data.set_blob("fake_row_data");
|
||||
//
|
||||
// milvus::grpc::Entities fake_entities;
|
||||
//// fake_entities.set_allocated_status(&fake_status);
|
||||
// fake_entities.mutable_status()->CopyFrom(fake_status);
|
||||
// for (int i = 0; i < 10; i++){
|
||||
// fake_entities.add_ids(i);
|
||||
// fake_entities.add_valid_row(true);
|
||||
// fake_entities.add_rows_data()->CopyFrom(fake_row_data);
|
||||
// }
|
||||
//
|
||||
// int64_t fake_row_num = 10;
|
||||
//
|
||||
// float fake_scores[10] = {1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 0.0};
|
||||
// float fake_distance[10] = {9.7, 9.6, 9.5, 9.8, 8.7, 8.8, 9.9, 8.8, 9.7, 8.9};
|
||||
//
|
||||
// std::vector<milvus::grpc::KeyValuePair> fake_extra_params;
|
||||
// milvus::grpc::KeyValuePair keyValuePair;
|
||||
// for (int i = 0; i < 10; ++i) {
|
||||
// keyValuePair.set_key(std::to_string(i));
|
||||
// keyValuePair.set_value(std::to_string(i + 10));
|
||||
// fake_extra_params.push_back(keyValuePair);
|
||||
// }
|
||||
//
|
||||
// int64_t fake_query_id = 10;
|
||||
// int64_t fake_client_id = 1;
|
||||
//
|
||||
// fake_message.mutable_status()->CopyFrom(fake_status);
|
||||
// fake_message.mutable_entities()->CopyFrom(fake_entities);
|
||||
// fake_message.set_row_num(fake_row_num);
|
||||
// for (int i = 0; i < 10; i++) {
|
||||
// fake_message.add_scores(fake_scores[i]);
|
||||
// fake_message.add_distances(fake_distance[i]);
|
||||
// fake_message.add_extra_params()->CopyFrom(fake_extra_params[i]);
|
||||
// }
|
||||
//
|
||||
// fake_message.set_query_id(fake_query_id);
|
||||
// fake_message.set_client_id(fake_client_id);
|
||||
//
|
||||
// float fake_scores2[10] = {2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 0.0, 1.1};
|
||||
// float fake_distance2[10] = {9.8, 8.6, 9.6, 9.7, 8.9, 8.8, 9.0, 9.8, 9.7, 8.9};
|
||||
//
|
||||
// fake_message2.mutable_status()->CopyFrom(fake_status);
|
||||
// fake_message2.mutable_entities()->CopyFrom(fake_entities);
|
||||
// fake_message2.set_row_num(fake_row_num);
|
||||
// for (int j = 0; j < 10; ++j) {
|
||||
// fake_message2.add_scores(fake_scores2[j]);
|
||||
// fake_message2.add_distances(fake_distance2[j]);
|
||||
// fake_message2.add_extra_params()->CopyFrom(fake_extra_params[j]);
|
||||
// }
|
||||
//
|
||||
// fake_message2.set_query_id(fake_query_id);
|
||||
// fake_message2.set_client_id(fake_client_id);
|
||||
//
|
||||
// producer.send(fake_message.SerializeAsString());
|
||||
// producer.send(fake_message2.SerializeAsString());
|
||||
auto client= std::make_shared<milvus::message_client::MsgClient>("pulsar://localhost:6650");
|
||||
milvus::message_client::MsgProducer producer(client,"test");
|
||||
producer.createProducer("result");
|
||||
producer.send("result");
|
||||
milvus::grpc::QueryResult fake_message;
|
||||
milvus::grpc::QueryResult fake_message2;
|
||||
|
||||
int64_t query_id = 10;
|
||||
milvus::message_client::MsgClientV2 client_v2(1, "pulsar://localhost:6650");
|
||||
auto init_status = client_v2.Init("insert_delete", "search", "time_sync", "result", "result");
|
||||
milvus::grpc::Status fake_status;
|
||||
fake_status.set_error_code(milvus::grpc::ErrorCode::SUCCESS);
|
||||
std::string aaa = "hahaha";
|
||||
fake_status.set_reason(aaa);
|
||||
|
||||
// client_v2.SendQueryMessage();
|
||||
milvus::grpc::SearchParam request;
|
||||
auto status_send = client_v2.SendQueryMessage(request, 10, query_id);
|
||||
milvus::grpc::RowData fake_row_data;
|
||||
fake_row_data.set_blob("fake_row_data");
|
||||
|
||||
milvus::grpc::QueryResult result;
|
||||
auto status = client_v2.GetQueryResult(query_id, result);
|
||||
milvus::grpc::Entities fake_entities;
|
||||
// fake_entities.set_allocated_status(&fake_status);
|
||||
fake_entities.mutable_status()->CopyFrom(fake_status);
|
||||
for (int i = 0; i < 10; i++){
|
||||
fake_entities.add_ids(i);
|
||||
fake_entities.add_valid_row(true);
|
||||
fake_entities.add_rows_data()->CopyFrom(fake_row_data);
|
||||
}
|
||||
|
||||
int64_t fake_row_num = 10;
|
||||
|
||||
float fake_scores[10] = {1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 0.0};
|
||||
float fake_distance[10] = {9.7, 9.6, 9.5, 9.8, 8.7, 8.8, 9.9, 8.8, 9.7, 8.9};
|
||||
|
||||
std::vector<milvus::grpc::KeyValuePair> fake_extra_params;
|
||||
milvus::grpc::KeyValuePair keyValuePair;
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
keyValuePair.set_key(std::to_string(i));
|
||||
keyValuePair.set_value(std::to_string(i + 10));
|
||||
fake_extra_params.push_back(keyValuePair);
|
||||
}
|
||||
|
||||
int64_t fake_query_id = 10;
|
||||
int64_t fake_client_id = 1;
|
||||
|
||||
fake_message.mutable_status()->CopyFrom(fake_status);
|
||||
fake_message.mutable_entities()->CopyFrom(fake_entities);
|
||||
fake_message.set_row_num(fake_row_num);
|
||||
for (int i = 0; i < 10; i++) {
|
||||
fake_message.add_scores(fake_scores[i]);
|
||||
fake_message.add_distances(fake_distance[i]);
|
||||
fake_message.add_extra_params()->CopyFrom(fake_extra_params[i]);
|
||||
}
|
||||
|
||||
fake_message.set_query_id(fake_query_id);
|
||||
fake_message.set_client_id(fake_client_id);
|
||||
|
||||
float fake_scores2[10] = {2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 0.0, 1.1};
|
||||
float fake_distance2[10] = {9.8, 8.6, 9.6, 9.7, 8.9, 8.8, 9.0, 9.8, 9.7, 8.9};
|
||||
|
||||
fake_message2.mutable_status()->CopyFrom(fake_status);
|
||||
fake_message2.mutable_entities()->CopyFrom(fake_entities);
|
||||
fake_message2.set_row_num(fake_row_num);
|
||||
for (int j = 0; j < 10; ++j) {
|
||||
fake_message2.add_scores(fake_scores2[j]);
|
||||
fake_message2.add_distances(fake_distance2[j]);
|
||||
fake_message2.add_extra_params()->CopyFrom(fake_extra_params[j]);
|
||||
}
|
||||
|
||||
fake_message2.set_query_id(fake_query_id);
|
||||
fake_message2.set_client_id(fake_client_id);
|
||||
|
||||
producer.send(fake_message.SerializeAsString());
|
||||
producer.send(fake_message2.SerializeAsString());
|
||||
|
||||
producer.close();
|
||||
client->close();
|
||||
|
||||
auto result = milvus::message_client::MsgClientV2::GetQueryResult(fake_query_id);
|
||||
std::cout << result.client_id() << std::endl;
|
||||
for (int k = 0; k < result.distances_size(); ++k) {
|
||||
std::cout << result.distances(k) << "\t";
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "thread"
|
||||
#include "pulsar/Client.h"
|
||||
#include <src/grpc/hello.grpc.pb.h>
|
||||
|
||||
using namespace pulsar;
|
||||
using MyData = milvus::grpc::PMessage;
|
||||
|
|
|
@ -34,3 +34,15 @@ func (c *Collection) DeletePartition(partition *Partition) {
|
|||
|
||||
// TODO: remove from c.Partitions
|
||||
}
|
||||
|
||||
func (c *Collection) GetSegments() ([]*Segment, error) {
|
||||
// TODO: add get segments
|
||||
//segments, status := C.GetSegments(c.CollectionPtr)
|
||||
//
|
||||
//if status != 0 {
|
||||
// return nil, errors.New("get segments failed")
|
||||
//}
|
||||
//
|
||||
//return segments, nil
|
||||
return nil, nil
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package reader
|
||||
|
||||
import (
|
||||
msgPb "github.com/czs007/suvlim/pkg/master/grpc/message"
|
||||
schema2 "github.com/czs007/suvlim/pulsar/client-go/pb"
|
||||
)
|
||||
|
||||
type IndexConfig struct {}
|
||||
|
||||
func buildIndex(config IndexConfig) msgPb.Status {
|
||||
return msgPb.Status{ErrorCode: msgPb.ErrorCode_SUCCESS}
|
||||
func buildIndex(config IndexConfig) schema2.Status {
|
||||
return schema2.Status{ErrorCode: schema2.ErrorCode_SUCCESS}
|
||||
}
|
||||
|
||||
func dropIndex(fieldName string) msgPb.Status {
|
||||
return msgPb.Status{ErrorCode: msgPb.ErrorCode_SUCCESS}
|
||||
func dropIndex(fieldName string) schema2.Status {
|
||||
return schema2.Status{ErrorCode: schema2.ErrorCode_SUCCESS}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@ package message_client
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/apache/pulsar-client-go/pulsar"
|
||||
msgpb "github.com/czs007/suvlim/pkg/master/grpc/message"
|
||||
"github.com/apache/pulsar/pulsar-client-go/pulsar"
|
||||
msgpb "github.com/czs007/suvlim/pkg/message"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"log"
|
||||
)
|
||||
|
@ -32,18 +32,13 @@ type MessageClient struct {
|
|||
}
|
||||
|
||||
func (mc *MessageClient) Send(ctx context.Context, msg msgpb.QueryResult) {
|
||||
var msgBuffer, _ = proto.Marshal(&msg)
|
||||
if _, err := mc.searchResultProducer.Send(ctx, &pulsar.ProducerMessage{
|
||||
Payload: msgBuffer,
|
||||
if err := mc.searchResultProducer.Send(ctx, pulsar.ProducerMessage{
|
||||
Payload: []byte(msg.String()),
|
||||
}); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func (mc *MessageClient) GetSearchChan() chan *msgpb.SearchMsg {
|
||||
return mc.searchChan
|
||||
}
|
||||
|
||||
func (mc *MessageClient) ReceiveInsertOrDeleteMsg() {
|
||||
for {
|
||||
insetOrDeleteMsg := msgpb.InsertOrDeleteMsg{}
|
||||
|
@ -100,7 +95,6 @@ func (mc *MessageClient) ReceiveMessage() {
|
|||
go mc.ReceiveInsertOrDeleteMsg()
|
||||
go mc.ReceiveSearchMsg()
|
||||
go mc.ReceiveTimeSyncMsg()
|
||||
go mc.ReceiveKey2SegMsg()
|
||||
}
|
||||
|
||||
func (mc *MessageClient) CreatProducer(topicName string) pulsar.Producer {
|
||||
|
@ -203,30 +197,21 @@ func (mc *MessageClient) PrepareMsg(messageType MessageType, msgLen int) {
|
|||
}
|
||||
}
|
||||
|
||||
func (mc *MessageClient) PrepareKey2SegmentMsg() {
|
||||
mc.Key2SegMsg = mc.Key2SegMsg[:0]
|
||||
msgLen := len(mc.key2SegChan)
|
||||
for i := 0; i < msgLen; i++ {
|
||||
msg := <-mc.key2SegChan
|
||||
mc.Key2SegMsg = append(mc.Key2SegMsg, msg)
|
||||
}
|
||||
}
|
||||
|
||||
func (mc *MessageClient) PrepareBatchMsg() []int {
|
||||
// assume the channel not full
|
||||
mc.InsertOrDeleteMsg = mc.InsertOrDeleteMsg[:0]
|
||||
//mc.SearchMsg = mc.SearchMsg[:0]
|
||||
mc.SearchMsg = mc.SearchMsg[:0]
|
||||
mc.TimeSyncMsg = mc.TimeSyncMsg[:0]
|
||||
|
||||
// get the length of every channel
|
||||
insertOrDeleteLen := len(mc.insertOrDeleteChan)
|
||||
//searchLen := len(mc.searchChan)
|
||||
searchLen := len(mc.searchChan)
|
||||
timeLen := len(mc.timeSyncChan)
|
||||
|
||||
// get message from channel to slice
|
||||
mc.PrepareMsg(InsertOrDelete, insertOrDeleteLen)
|
||||
//mc.PrepareMsg(Search, searchLen)
|
||||
mc.PrepareMsg(Search, searchLen)
|
||||
mc.PrepareMsg(TimeSync, timeLen)
|
||||
|
||||
return []int{insertOrDeleteLen}
|
||||
return []int{insertOrDeleteLen, searchLen, timeLen}
|
||||
}
|
||||
|
|
|
@ -15,36 +15,34 @@ import "C"
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
msgPb "github.com/czs007/suvlim/pkg/master/grpc/message"
|
||||
msgPb "github.com/czs007/suvlim/pkg/message"
|
||||
"github.com/czs007/suvlim/reader/message_client"
|
||||
"sort"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
)
|
||||
|
||||
type InsertData struct {
|
||||
insertIDs map[int64][]int64
|
||||
insertTimestamps map[int64][]uint64
|
||||
insertRecords map[int64][][]byte
|
||||
insertOffset map[int64]int64
|
||||
insertIDs map[int64][]int64
|
||||
insertTimestamps map[int64][]uint64
|
||||
insertRecords map[int64][][]byte
|
||||
insertOffset map[int64]int64
|
||||
}
|
||||
|
||||
type DeleteData struct {
|
||||
deleteIDs map[int64][]int64
|
||||
deleteTimestamps map[int64][]uint64
|
||||
deleteOffset map[int64]int64
|
||||
deleteIDs map[int64][]int64
|
||||
deleteTimestamps map[int64][]uint64
|
||||
deleteOffset map[int64]int64
|
||||
}
|
||||
|
||||
type DeleteRecord struct {
|
||||
entityID int64
|
||||
timestamp uint64
|
||||
segmentID int64
|
||||
entityID int64
|
||||
timestamp uint64
|
||||
segmentID int64
|
||||
}
|
||||
|
||||
type DeletePreprocessData struct {
|
||||
deleteRecords []*DeleteRecord
|
||||
count int32
|
||||
deleteRecords []*DeleteRecord
|
||||
count chan int
|
||||
}
|
||||
|
||||
type QueryNodeDataBuffer struct {
|
||||
|
@ -62,7 +60,7 @@ type QueryNode struct {
|
|||
queryNodeTimeSync *QueryNodeTime
|
||||
buffer QueryNodeDataBuffer
|
||||
deletePreprocessData DeletePreprocessData
|
||||
deleteData DeleteData
|
||||
deleteData DeleteData
|
||||
insertData InsertData
|
||||
}
|
||||
|
||||
|
@ -79,47 +77,15 @@ func NewQueryNode(queryNodeId uint64, timeSync uint64) *QueryNode {
|
|||
|
||||
segmentsMap := make(map[int64]*Segment)
|
||||
|
||||
buffer := QueryNodeDataBuffer{
|
||||
InsertDeleteBuffer: make([]*msgPb.InsertOrDeleteMsg, 0),
|
||||
SearchBuffer: make([]*msgPb.SearchMsg, 0),
|
||||
validInsertDeleteBuffer: make([]bool, 0),
|
||||
validSearchBuffer: make([]bool, 0),
|
||||
}
|
||||
|
||||
return &QueryNode{
|
||||
QueryNodeId: queryNodeId,
|
||||
Collections: nil,
|
||||
SegmentsMap: segmentsMap,
|
||||
messageClient: mc,
|
||||
queryNodeTimeSync: queryNodeTimeSync,
|
||||
buffer: buffer,
|
||||
QueryNodeId: queryNodeId,
|
||||
Collections: nil,
|
||||
SegmentsMap: segmentsMap,
|
||||
messageClient: mc,
|
||||
queryNodeTimeSync: queryNodeTimeSync,
|
||||
}
|
||||
}
|
||||
|
||||
func (node *QueryNode) QueryNodeDataInit() {
|
||||
deletePreprocessData := DeletePreprocessData{
|
||||
deleteRecords: make([]*DeleteRecord, 0),
|
||||
count: 0,
|
||||
}
|
||||
|
||||
deleteData := DeleteData{
|
||||
deleteIDs: make(map[int64][]int64),
|
||||
deleteTimestamps: make(map[int64][]uint64),
|
||||
deleteOffset: make(map[int64]int64),
|
||||
}
|
||||
|
||||
insertData := InsertData{
|
||||
insertIDs: make(map[int64][]int64),
|
||||
insertTimestamps: make(map[int64][]uint64),
|
||||
insertRecords: make(map[int64][][]byte),
|
||||
insertOffset: make(map[int64]int64),
|
||||
}
|
||||
|
||||
node.deletePreprocessData = deletePreprocessData
|
||||
node.deleteData = deleteData
|
||||
node.insertData = insertData
|
||||
}
|
||||
|
||||
func (node *QueryNode) NewCollection(collectionName string, schemaConfig string) *Collection {
|
||||
cName := C.CString(collectionName)
|
||||
cSchema := C.CString(schemaConfig)
|
||||
|
@ -140,14 +106,13 @@ func (node *QueryNode) DeleteCollection(collection *Collection) {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
func (node *QueryNode) PrepareBatchMsg() []int {
|
||||
var msgLen = node.messageClient.PrepareBatchMsg()
|
||||
return msgLen
|
||||
func (node *QueryNode) PrepareBatchMsg() {
|
||||
node.messageClient.PrepareBatchMsg()
|
||||
}
|
||||
|
||||
func (node *QueryNode) StartMessageClient() {
|
||||
// TODO: add consumerMsgSchema
|
||||
node.messageClient.InitClient("pulsar://192.168.2.28:6650")
|
||||
node.messageClient.InitClient("pulsar://localhost:6650")
|
||||
|
||||
go node.messageClient.ReceiveMessage()
|
||||
}
|
||||
|
@ -158,47 +123,26 @@ func (node *QueryNode) InitQueryNodeCollection() {
|
|||
var newCollection = node.NewCollection("collection1", "fakeSchema")
|
||||
var newPartition = newCollection.NewPartition("partition1")
|
||||
// TODO: add segment id
|
||||
var segment = newPartition.NewSegment(0)
|
||||
node.SegmentsMap[0] = segment
|
||||
var _ = newPartition.NewSegment(0)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
func (node *QueryNode) RunInsertDelete() {
|
||||
for {
|
||||
time.Sleep(2 * 1000 * time.Millisecond)
|
||||
node.QueryNodeDataInit()
|
||||
// TODO: get timeRange from message client
|
||||
var timeRange = TimeRange{0, 0}
|
||||
var msgLen = node.PrepareBatchMsg()
|
||||
fmt.Println("PrepareBatchMsg Done, Insert len = ", msgLen[0])
|
||||
if msgLen[0] == 0 {
|
||||
fmt.Println("0 msg found")
|
||||
continue
|
||||
}
|
||||
node.PrepareBatchMsg()
|
||||
node.MessagesPreprocess(node.messageClient.InsertOrDeleteMsg, timeRange)
|
||||
fmt.Println("MessagesPreprocess Done")
|
||||
node.WriterDelete()
|
||||
node.PreInsertAndDelete()
|
||||
fmt.Println("PreInsertAndDelete Done")
|
||||
node.DoInsertAndDelete()
|
||||
fmt.Println("DoInsertAndDelete Done")
|
||||
node.queryNodeTimeSync.UpdateSearchTimeSync(timeRange)
|
||||
fmt.Print("UpdateSearchTimeSync Done\n\n\n")
|
||||
}
|
||||
}
|
||||
|
||||
func (node *QueryNode) RunSearch() {
|
||||
for {
|
||||
time.Sleep(2 * 1000 * time.Millisecond)
|
||||
if len(node.messageClient.GetSearchChan()) <= 0 {
|
||||
fmt.Println("null Search")
|
||||
continue
|
||||
}
|
||||
node.messageClient.SearchMsg = node.messageClient.SearchMsg[:0]
|
||||
msg := <-node.messageClient.GetSearchChan()
|
||||
node.messageClient.SearchMsg = append(node.messageClient.SearchMsg, msg)
|
||||
fmt.Println("Do Search...")
|
||||
node.Search(node.messageClient.SearchMsg)
|
||||
}
|
||||
}
|
||||
|
@ -206,29 +150,26 @@ func (node *QueryNode) RunSearch() {
|
|||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
func (node *QueryNode) MessagesPreprocess(insertDeleteMessages []*msgPb.InsertOrDeleteMsg, timeRange TimeRange) msgPb.Status {
|
||||
//var tMax = timeRange.timestampMax
|
||||
var tMax = timeRange.timestampMax
|
||||
|
||||
// 1. Extract messages before readTimeSync from QueryNodeDataBuffer.
|
||||
// Set valid bitmap to false.
|
||||
for i, msg := range node.buffer.InsertDeleteBuffer {
|
||||
//if msg.Timestamp < tMax {
|
||||
if msg.Op == msgPb.OpType_INSERT {
|
||||
if msg.RowsData == nil {
|
||||
continue
|
||||
if msg.Timestamp < tMax {
|
||||
if msg.Op == msgPb.OpType_INSERT {
|
||||
node.insertData.insertIDs[msg.SegmentId] = append(node.insertData.insertIDs[msg.SegmentId], msg.Uid)
|
||||
node.insertData.insertTimestamps[msg.SegmentId] = append(node.insertData.insertTimestamps[msg.SegmentId], msg.Timestamp)
|
||||
node.insertData.insertRecords[msg.SegmentId] = append(node.insertData.insertRecords[msg.SegmentId], msg.RowsData.Blob)
|
||||
} else if msg.Op == msgPb.OpType_DELETE {
|
||||
var r = DeleteRecord {
|
||||
entityID: msg.Uid,
|
||||
timestamp: msg.Timestamp,
|
||||
}
|
||||
node.deletePreprocessData.deleteRecords = append(node.deletePreprocessData.deleteRecords, &r)
|
||||
node.deletePreprocessData.count <- <- node.deletePreprocessData.count + 1
|
||||
}
|
||||
node.insertData.insertIDs[msg.SegmentId] = append(node.insertData.insertIDs[msg.SegmentId], msg.Uid)
|
||||
node.insertData.insertTimestamps[msg.SegmentId] = append(node.insertData.insertTimestamps[msg.SegmentId], msg.Timestamp)
|
||||
node.insertData.insertRecords[msg.SegmentId] = append(node.insertData.insertRecords[msg.SegmentId], msg.RowsData.Blob)
|
||||
} else if msg.Op == msgPb.OpType_DELETE {
|
||||
var r = DeleteRecord{
|
||||
entityID: msg.Uid,
|
||||
timestamp: msg.Timestamp,
|
||||
}
|
||||
node.deletePreprocessData.deleteRecords = append(node.deletePreprocessData.deleteRecords, &r)
|
||||
atomic.AddInt32(&node.deletePreprocessData.count, 1)
|
||||
node.buffer.validInsertDeleteBuffer[i] = false
|
||||
}
|
||||
node.buffer.validInsertDeleteBuffer[i] = false
|
||||
//}
|
||||
}
|
||||
|
||||
// 2. Remove invalid messages from buffer.
|
||||
|
@ -244,50 +185,46 @@ func (node *QueryNode) MessagesPreprocess(insertDeleteMessages []*msgPb.InsertOr
|
|||
// Move massages after readTimeSync to QueryNodeDataBuffer.
|
||||
// Set valid bitmap to true.
|
||||
for _, msg := range insertDeleteMessages {
|
||||
//if msg.Timestamp < tMax {
|
||||
if msg.Op == msgPb.OpType_INSERT {
|
||||
if msg.RowsData == nil {
|
||||
continue
|
||||
if msg.Timestamp < tMax {
|
||||
if msg.Op == msgPb.OpType_INSERT {
|
||||
node.insertData.insertIDs[msg.SegmentId] = append(node.insertData.insertIDs[msg.SegmentId], msg.Uid)
|
||||
node.insertData.insertTimestamps[msg.SegmentId] = append(node.insertData.insertTimestamps[msg.SegmentId], msg.Timestamp)
|
||||
node.insertData.insertRecords[msg.SegmentId] = append(node.insertData.insertRecords[msg.SegmentId], msg.RowsData.Blob)
|
||||
} else if msg.Op == msgPb.OpType_DELETE {
|
||||
var r = DeleteRecord {
|
||||
entityID: msg.Uid,
|
||||
timestamp: msg.Timestamp,
|
||||
}
|
||||
node.deletePreprocessData.deleteRecords = append(node.deletePreprocessData.deleteRecords, &r)
|
||||
node.deletePreprocessData.count <- <- node.deletePreprocessData.count + 1
|
||||
}
|
||||
node.insertData.insertIDs[msg.SegmentId] = append(node.insertData.insertIDs[msg.SegmentId], msg.Uid)
|
||||
node.insertData.insertTimestamps[msg.SegmentId] = append(node.insertData.insertTimestamps[msg.SegmentId], msg.Timestamp)
|
||||
node.insertData.insertRecords[msg.SegmentId] = append(node.insertData.insertRecords[msg.SegmentId], msg.RowsData.Blob)
|
||||
} else if msg.Op == msgPb.OpType_DELETE {
|
||||
var r = DeleteRecord{
|
||||
entityID: msg.Uid,
|
||||
timestamp: msg.Timestamp,
|
||||
}
|
||||
node.deletePreprocessData.deleteRecords = append(node.deletePreprocessData.deleteRecords, &r)
|
||||
atomic.AddInt32(&node.deletePreprocessData.count, 1)
|
||||
} else {
|
||||
node.buffer.InsertDeleteBuffer = append(node.buffer.InsertDeleteBuffer, msg)
|
||||
node.buffer.validInsertDeleteBuffer = append(node.buffer.validInsertDeleteBuffer, true)
|
||||
}
|
||||
//} else {
|
||||
// node.buffer.InsertDeleteBuffer = append(node.buffer.InsertDeleteBuffer, msg)
|
||||
// node.buffer.validInsertDeleteBuffer = append(node.buffer.validInsertDeleteBuffer, true)
|
||||
//}
|
||||
}
|
||||
|
||||
return msgPb.Status{ErrorCode: msgPb.ErrorCode_SUCCESS}
|
||||
return msgPb.Status{ErrorCode: 0}
|
||||
}
|
||||
|
||||
func (node *QueryNode) WriterDelete() msgPb.Status {
|
||||
// TODO: set timeout
|
||||
for {
|
||||
if node.deletePreprocessData.count == 0 {
|
||||
return msgPb.Status{ErrorCode: msgPb.ErrorCode_SUCCESS}
|
||||
}
|
||||
node.messageClient.PrepareKey2SegmentMsg()
|
||||
var ids, timestamps, segmentIDs = node.GetKey2Segments()
|
||||
for i := 0; i < len(*ids); i++ {
|
||||
id := (*ids)[i]
|
||||
timestamp := (*timestamps)[i]
|
||||
segmentID := (*segmentIDs)[i]
|
||||
for i := 0; i <= len(ids); i++ {
|
||||
id := ids[i]
|
||||
timestamp := timestamps[i]
|
||||
segmentID := segmentIDs[i]
|
||||
for _, r := range node.deletePreprocessData.deleteRecords {
|
||||
if r.timestamp == timestamp && r.entityID == id {
|
||||
r.segmentID = segmentID
|
||||
atomic.AddInt32(&node.deletePreprocessData.count, -1)
|
||||
node.deletePreprocessData.count <- <- node.deletePreprocessData.count - 1
|
||||
}
|
||||
}
|
||||
}
|
||||
if <- node.deletePreprocessData.count == 0 {
|
||||
return msgPb.Status{ErrorCode: 0}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -324,7 +261,7 @@ func (node *QueryNode) PreInsertAndDelete() msgPb.Status {
|
|||
node.deleteData.deleteOffset[segmentID] = offset
|
||||
}
|
||||
|
||||
return msgPb.Status{ErrorCode: msgPb.ErrorCode_SUCCESS}
|
||||
return msgPb.Status{ErrorCode: 0}
|
||||
}
|
||||
|
||||
func (node *QueryNode) DoInsertAndDelete() msgPb.Status {
|
||||
|
@ -339,12 +276,11 @@ func (node *QueryNode) DoInsertAndDelete() msgPb.Status {
|
|||
for segmentID, deleteIDs := range node.deleteData.deleteIDs {
|
||||
wg.Add(1)
|
||||
var deleteTimestamps = node.deleteData.deleteTimestamps[segmentID]
|
||||
fmt.Println("Doing delete......")
|
||||
go node.DoDelete(segmentID, &deleteIDs, &deleteTimestamps, &wg)
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
return msgPb.Status{ErrorCode: msgPb.ErrorCode_SUCCESS}
|
||||
return msgPb.Status{ErrorCode: 0}
|
||||
}
|
||||
|
||||
func (node *QueryNode) DoInsert(segmentID int64, records *[][]byte, wg *sync.WaitGroup) msgPb.Status {
|
||||
|
@ -365,7 +301,7 @@ func (node *QueryNode) DoInsert(segmentID int64, records *[][]byte, wg *sync.Wai
|
|||
}
|
||||
|
||||
wg.Done()
|
||||
return msgPb.Status{ErrorCode: msgPb.ErrorCode_SUCCESS}
|
||||
return msgPb.Status{ErrorCode: 0}
|
||||
}
|
||||
|
||||
func (node *QueryNode) DoDelete(segmentID int64, deleteIDs *[]int64, deleteTimestamps *[]uint64, wg *sync.WaitGroup) msgPb.Status {
|
||||
|
@ -384,15 +320,15 @@ func (node *QueryNode) DoDelete(segmentID int64, deleteIDs *[]int64, deleteTimes
|
|||
}
|
||||
|
||||
wg.Done()
|
||||
return msgPb.Status{ErrorCode: msgPb.ErrorCode_SUCCESS}
|
||||
return msgPb.Status{ErrorCode: 0}
|
||||
}
|
||||
|
||||
func (node *QueryNode) Search(searchMessages []*msgPb.SearchMsg) msgPb.Status {
|
||||
var clientId = (*(searchMessages[0])).ClientId
|
||||
var clientId = searchMessages[0].ClientId
|
||||
|
||||
type SearchResultTmp struct {
|
||||
ResultId int64
|
||||
ResultDistance float32
|
||||
ResultId int64
|
||||
ResultDistance float32
|
||||
}
|
||||
|
||||
// Traverse all messages in the current messageClient.
|
||||
|
@ -405,7 +341,7 @@ func (node *QueryNode) Search(searchMessages []*msgPb.SearchMsg) msgPb.Status {
|
|||
return msgPb.Status{ErrorCode: 1}
|
||||
}
|
||||
|
||||
var resultsTmp = make([]SearchResultTmp, 0)
|
||||
var resultsTmp []SearchResultTmp
|
||||
// TODO: get top-k's k from queryString
|
||||
const TopK = 1
|
||||
|
||||
|
@ -414,9 +350,9 @@ func (node *QueryNode) Search(searchMessages []*msgPb.SearchMsg) msgPb.Status {
|
|||
|
||||
// 1. Timestamp check
|
||||
// TODO: return or wait? Or adding graceful time
|
||||
//if timestamp > node.queryNodeTimeSync.SearchTimeSync {
|
||||
// return msgPb.Status{ErrorCode: 1}
|
||||
//}
|
||||
if timestamp > node.queryNodeTimeSync.SearchTimeSync {
|
||||
return msgPb.Status{ErrorCode: 1}
|
||||
}
|
||||
|
||||
// 2. Do search in all segments
|
||||
for _, partition := range targetCollection.Partitions {
|
||||
|
@ -426,8 +362,7 @@ func (node *QueryNode) Search(searchMessages []*msgPb.SearchMsg) msgPb.Status {
|
|||
fmt.Println(err.Error())
|
||||
return msgPb.Status{ErrorCode: 1}
|
||||
}
|
||||
fmt.Println(res.ResultIds)
|
||||
for i := 0; i < len(res.ResultIds); i++ {
|
||||
for i := 0; i <= len(res.ResultIds); i++ {
|
||||
resultsTmp = append(resultsTmp, SearchResultTmp{ResultId: res.ResultIds[i], ResultDistance: res.ResultDistances[i]})
|
||||
}
|
||||
}
|
||||
|
@ -448,22 +383,15 @@ func (node *QueryNode) Search(searchMessages []*msgPb.SearchMsg) msgPb.Status {
|
|||
return resultsTmp[i].ResultDistance < resultsTmp[j].ResultDistance
|
||||
})
|
||||
resultsTmp = resultsTmp[:TopK]
|
||||
var entities = msgPb.Entities{
|
||||
Ids: make([]int64, 0),
|
||||
}
|
||||
var results = msgPb.QueryResult{
|
||||
Entities: &entities,
|
||||
Distances: make([]float32, 0),
|
||||
QueryId: msg.Uid,
|
||||
}
|
||||
var results SearchResult
|
||||
for _, res := range resultsTmp {
|
||||
results.Entities.Ids = append(results.Entities.Ids, res.ResultId)
|
||||
results.Distances = append(results.Distances, res.ResultDistance)
|
||||
results.ResultIds = append(results.ResultIds, res.ResultId)
|
||||
results.ResultDistances = append(results.ResultDistances, res.ResultDistance)
|
||||
}
|
||||
|
||||
// 3. publish result to pulsar
|
||||
node.PublishSearchResult(&results, clientId)
|
||||
publishSearchResult(&results, clientId)
|
||||
}
|
||||
|
||||
return msgPb.Status{ErrorCode: msgPb.ErrorCode_SUCCESS}
|
||||
return msgPb.Status{ErrorCode: 0}
|
||||
}
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
package reader
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// TODO: add query node test
|
||||
|
||||
func TestQueryNode_RunInsertDelete(t *testing.T) {
|
||||
|
||||
}
|
||||
|
|
@ -3,9 +3,9 @@ package reader
|
|||
func startQueryNode() {
|
||||
qn := NewQueryNode(0, 0)
|
||||
qn.InitQueryNodeCollection()
|
||||
//go qn.SegmentService()
|
||||
go qn.SegmentService()
|
||||
qn.StartMessageClient()
|
||||
|
||||
go qn.RunInsertDelete()
|
||||
go qn.RunSearch()
|
||||
qn.RunInsertDelete()
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
package reader
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestReader_startQueryNode(t *testing.T) {
|
||||
startQueryNode()
|
||||
}
|
|
@ -1,9 +1,8 @@
|
|||
package reader
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
msgPb "github.com/czs007/suvlim/pkg/master/grpc/message"
|
||||
msgPb "github.com/czs007/suvlim/pkg/message"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
|
@ -19,16 +18,21 @@ func getResultTopicByClientId(clientId int64) string {
|
|||
return "result-topic/partition-" + strconv.FormatInt(clientId, 10)
|
||||
}
|
||||
|
||||
func (node *QueryNode) PublishSearchResult(results *msgPb.QueryResult, clientId int64) msgPb.Status {
|
||||
var ctx = context.Background()
|
||||
|
||||
func publishResult(ids *ResultEntityIds, clientId int64) msgPb.Status {
|
||||
// TODO: Pulsar publish
|
||||
var resultTopic = getResultTopicByClientId(clientId)
|
||||
node.messageClient.Send(ctx, *results)
|
||||
fmt.Println(resultTopic)
|
||||
return msgPb.Status{ErrorCode: msgPb.ErrorCode_SUCCESS}
|
||||
}
|
||||
|
||||
func (node *QueryNode) PublicStatistic(statisticTopic string) msgPb.Status {
|
||||
func publishSearchResult(searchResults *SearchResult, clientId int64) msgPb.Status {
|
||||
// TODO: Pulsar publish
|
||||
var resultTopic = getResultTopicByClientId(clientId)
|
||||
fmt.Println(resultTopic)
|
||||
return msgPb.Status{ErrorCode: msgPb.ErrorCode_SUCCESS}
|
||||
}
|
||||
|
||||
func publicStatistic(statisticTopic string) msgPb.Status {
|
||||
// TODO: get statistic info
|
||||
// getStatisticInfo()
|
||||
// var info = getStatisticInfo()
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
package reader
|
||||
|
||||
import (
|
||||
msgPb "github.com/czs007/suvlim/pkg/master/grpc/message"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestResult_PublishSearchResult(t *testing.T) {
|
||||
// Construct node, collection, partition and segment
|
||||
node := NewQueryNode(0, 0)
|
||||
var collection = node.NewCollection("collection0", "fake schema")
|
||||
var partition = collection.NewPartition("partition0")
|
||||
var segment = partition.NewSegment(0)
|
||||
node.SegmentsMap[0] = segment
|
||||
|
||||
// TODO: start pulsar server
|
||||
// TODO: fix result PublishSearchResult
|
||||
const N = 10
|
||||
var entityIDs = msgPb.Entities {
|
||||
Ids: make([]int64, N),
|
||||
}
|
||||
var results = msgPb.QueryResult {
|
||||
Entities: &entityIDs,
|
||||
Distances: make([]float32, N),
|
||||
}
|
||||
for i := 0; i < N; i++ {
|
||||
results.Entities.Ids = append(results.Entities.Ids, int64(i))
|
||||
results.Distances = append(results.Distances, float32(i))
|
||||
}
|
||||
node.PublishSearchResult(&results, 0)
|
||||
}
|
|
@ -13,9 +13,8 @@ package reader
|
|||
*/
|
||||
import "C"
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/czs007/suvlim/errors"
|
||||
schema "github.com/czs007/suvlim/pkg/master/grpc/message"
|
||||
schema "github.com/czs007/suvlim/pkg/message"
|
||||
"strconv"
|
||||
"unsafe"
|
||||
)
|
||||
|
@ -82,9 +81,9 @@ func (s *Segment) SegmentPreInsert(numOfRecords int) int64 {
|
|||
long int
|
||||
PreInsert(CSegmentBase c_segment, long int size);
|
||||
*/
|
||||
var offset = C.PreInsert(s.SegmentPtr, C.long(int64(numOfRecords)))
|
||||
var offset = C.PreInsert(C.long(int64(numOfRecords)))
|
||||
|
||||
return int64(offset)
|
||||
return offset
|
||||
}
|
||||
|
||||
func (s *Segment) SegmentPreDelete(numOfRecords int) int64 {
|
||||
|
@ -92,9 +91,9 @@ func (s *Segment) SegmentPreDelete(numOfRecords int) int64 {
|
|||
long int
|
||||
PreDelete(CSegmentBase c_segment, long int size);
|
||||
*/
|
||||
var offset = C.PreDelete(s.SegmentPtr, C.long(int64(numOfRecords)))
|
||||
var offset = C.PreDelete(C.long(int64(numOfRecords)))
|
||||
|
||||
return int64(offset)
|
||||
return offset
|
||||
}
|
||||
|
||||
func (s *Segment) SegmentInsert(offset int64, entityIDs *[]int64, timestamps *[]uint64, records *[][]byte) error {
|
||||
|
@ -110,19 +109,16 @@ func (s *Segment) SegmentInsert(offset int64, entityIDs *[]int64, timestamps *[]
|
|||
signed long int count);
|
||||
*/
|
||||
// Blobs to one big blob
|
||||
var numOfRow = len(*entityIDs)
|
||||
var sizeofPerRow = len((*records)[0])
|
||||
|
||||
var rawData = make([]byte, numOfRow * sizeofPerRow)
|
||||
var rawData []byte
|
||||
for i := 0; i < len(*records); i++ {
|
||||
copy(rawData, (*records)[i])
|
||||
}
|
||||
|
||||
var cOffset = C.long(offset)
|
||||
var cNumOfRows = C.long(numOfRow)
|
||||
var cEntityIdsPtr = (*C.long)(&(*entityIDs)[0])
|
||||
var cNumOfRows = C.long(len(*entityIDs))
|
||||
var cEntityIdsPtr = (*C.ulong)(&(*entityIDs)[0])
|
||||
var cTimestampsPtr = (*C.ulong)(&(*timestamps)[0])
|
||||
var cSizeofPerRow = C.int(sizeofPerRow)
|
||||
var cSizeofPerRow = C.int(len((*records)[0]))
|
||||
var cRawDataVoidPtr = unsafe.Pointer(&rawData[0])
|
||||
|
||||
var status = C.Insert(s.SegmentPtr,
|
||||
|
@ -152,7 +148,7 @@ func (s *Segment) SegmentDelete(offset int64, entityIDs *[]int64, timestamps *[]
|
|||
*/
|
||||
var cOffset = C.long(offset)
|
||||
var cSize = C.long(len(*entityIDs))
|
||||
var cEntityIdsPtr = (*C.long)(&(*entityIDs)[0])
|
||||
var cEntityIdsPtr = (*C.ulong)(&(*entityIDs)[0])
|
||||
var cTimestampsPtr = (*C.ulong)(&(*timestamps)[0])
|
||||
|
||||
var status = C.Delete(s.SegmentPtr, cOffset, cSize, cEntityIdsPtr, cTimestampsPtr)
|
||||
|
@ -174,7 +170,7 @@ func (s *Segment) SegmentSearch(queryString string, timestamp uint64, vectorReco
|
|||
float* result_distances);
|
||||
*/
|
||||
// TODO: get top-k's k from queryString
|
||||
const TopK = 10
|
||||
const TopK = 1
|
||||
|
||||
resultIds := make([]int64, TopK)
|
||||
resultDistances := make([]float32, TopK)
|
||||
|
@ -190,7 +186,5 @@ func (s *Segment) SegmentSearch(queryString string, timestamp uint64, vectorReco
|
|||
return nil, errors.New("Search failed, error code = " + strconv.Itoa(int(status)))
|
||||
}
|
||||
|
||||
fmt.Println("Search Result---- Ids =", resultIds, ", Distances =", resultDistances)
|
||||
|
||||
return &SearchResult{ResultIds: resultIds, ResultDistances: resultDistances}, nil
|
||||
}
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
package reader
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSegmentManagement_SegmentsManagement(t *testing.T) {
|
||||
// Construct node, collection, partition and segment
|
||||
node := NewQueryNode(0, 0)
|
||||
var collection = node.NewCollection("collection0", "fake schema")
|
||||
var partition = collection.NewPartition("partition0")
|
||||
var segment = partition.NewSegment(0)
|
||||
node.SegmentsMap[0] = segment
|
||||
|
||||
// TODO: fix segment management
|
||||
node.SegmentsManagement()
|
||||
}
|
||||
|
||||
func TestSegmentManagement_SegmentService(t *testing.T) {
|
||||
// Construct node, collection, partition and segment
|
||||
node := NewQueryNode(0, 0)
|
||||
var collection = node.NewCollection("collection0", "fake schema")
|
||||
var partition = collection.NewPartition("partition0")
|
||||
var segment = partition.NewSegment(0)
|
||||
node.SegmentsMap[0] = segment
|
||||
|
||||
// TODO: fix segment service
|
||||
node.SegmentService()
|
||||
}
|
|
@ -1,15 +1,13 @@
|
|||
package reader
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"math"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSegment_ConstructorAndDestructor(t *testing.T) {
|
||||
// 1. Construct node, collection, partition and segment
|
||||
func TestConstructorAndDestructor(t *testing.T) {
|
||||
// 1. Construct node, collection, and segment
|
||||
node := NewQueryNode(0, 0)
|
||||
var collection = node.NewCollection("collection0", "fake schema")
|
||||
var partition = collection.NewPartition("partition0")
|
||||
|
@ -22,39 +20,35 @@ func TestSegment_ConstructorAndDestructor(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestSegment_SegmentInsert(t *testing.T) {
|
||||
// 1. Construct node, collection, partition and segment
|
||||
// 1. Construct node, collection, and segment
|
||||
node := NewQueryNode(0, 0)
|
||||
var collection = node.NewCollection("collection0", "fake schema")
|
||||
var partition = collection.NewPartition("partition0")
|
||||
var segment = partition.NewSegment(0)
|
||||
|
||||
// 2. Create ids and timestamps
|
||||
ids := []int64{1, 2, 3}
|
||||
timestamps := []uint64{0, 0, 0}
|
||||
ids :=[] int64{1, 2, 3}
|
||||
timestamps :=[] uint64 {0, 0, 0}
|
||||
|
||||
// 3. Create records, use schema below:
|
||||
// schema_tmp->AddField("fakeVec", DataType::VECTOR_FLOAT, 16);
|
||||
// schema_tmp->AddField("age", DataType::INT32);
|
||||
const DIM = 16
|
||||
const DIM = 4
|
||||
const N = 3
|
||||
var vec = [DIM]float32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
|
||||
var vec = [DIM]float32{1.1, 2.2, 3.3, 4.4}
|
||||
var rawData []byte
|
||||
for _, ele := range vec {
|
||||
buf := make([]byte, 4)
|
||||
binary.LittleEndian.PutUint32(buf, math.Float32bits(ele))
|
||||
rawData = append(rawData, buf...)
|
||||
rawData=append(rawData, byte(ele))
|
||||
}
|
||||
bs := make([]byte, 4)
|
||||
binary.LittleEndian.PutUint32(bs, 1)
|
||||
rawData = append(rawData, bs...)
|
||||
rawData=append(rawData, byte(1))
|
||||
var records [][]byte
|
||||
for i := 0; i < N; i++ {
|
||||
for i:= 0; i < N; i++ {
|
||||
records = append(records, rawData)
|
||||
}
|
||||
|
||||
// 4. Do PreInsert
|
||||
var offset = segment.SegmentPreInsert(N)
|
||||
assert.GreaterOrEqual(t, offset, int64(0))
|
||||
assert.Greater(t, offset, 0)
|
||||
|
||||
// 5. Do Insert
|
||||
var err = segment.SegmentInsert(offset, &ids, ×tamps, &records)
|
||||
|
@ -67,19 +61,19 @@ func TestSegment_SegmentInsert(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestSegment_SegmentDelete(t *testing.T) {
|
||||
// 1. Construct node, collection, partition and segment
|
||||
// 1. Construct node, collection, and segment
|
||||
node := NewQueryNode(0, 0)
|
||||
var collection = node.NewCollection("collection0", "fake schema")
|
||||
var partition = collection.NewPartition("partition0")
|
||||
var segment = partition.NewSegment(0)
|
||||
|
||||
// 2. Create ids and timestamps
|
||||
ids := []int64{1, 2, 3}
|
||||
timestamps := []uint64{0, 0, 0}
|
||||
ids :=[] int64{1, 2, 3}
|
||||
timestamps :=[] uint64 {0, 0, 0}
|
||||
|
||||
// 3. Do PreDelete
|
||||
var offset = segment.SegmentPreDelete(10)
|
||||
assert.GreaterOrEqual(t, offset, int64(0))
|
||||
assert.Greater(t, offset, 0)
|
||||
|
||||
// 4. Do Delete
|
||||
var err = segment.SegmentDelete(offset, &ids, ×tamps)
|
||||
|
@ -92,39 +86,35 @@ func TestSegment_SegmentDelete(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestSegment_SegmentSearch(t *testing.T) {
|
||||
// 1. Construct node, collection, partition and segment
|
||||
// 1. Construct node, collection, and segment
|
||||
node := NewQueryNode(0, 0)
|
||||
var collection = node.NewCollection("collection0", "fake schema")
|
||||
var partition = collection.NewPartition("partition0")
|
||||
var segment = partition.NewSegment(0)
|
||||
|
||||
// 2. Create ids and timestamps
|
||||
ids := []int64{1, 2, 3}
|
||||
timestamps := []uint64{0, 0, 0}
|
||||
ids :=[] int64{1, 2, 3}
|
||||
timestamps :=[] uint64 {0, 0, 0}
|
||||
|
||||
// 3. Create records, use schema below:
|
||||
// schema_tmp->AddField("fakeVec", DataType::VECTOR_FLOAT, 16);
|
||||
// schema_tmp->AddField("age", DataType::INT32);
|
||||
const DIM = 16
|
||||
const DIM = 4
|
||||
const N = 3
|
||||
var vec = [DIM]float32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
|
||||
var vec = [DIM]float32{1.1, 2.2, 3.3, 4.4}
|
||||
var rawData []byte
|
||||
for _, ele := range vec {
|
||||
buf := make([]byte, 4)
|
||||
binary.LittleEndian.PutUint32(buf, math.Float32bits(ele))
|
||||
rawData = append(rawData, buf...)
|
||||
rawData=append(rawData, byte(ele))
|
||||
}
|
||||
bs := make([]byte, 4)
|
||||
binary.LittleEndian.PutUint32(bs, 1)
|
||||
rawData = append(rawData, bs...)
|
||||
rawData=append(rawData, byte(1))
|
||||
var records [][]byte
|
||||
for i := 0; i < N; i++ {
|
||||
for i:= 0; i < N; i++ {
|
||||
records = append(records, rawData)
|
||||
}
|
||||
|
||||
// 4. Do PreInsert
|
||||
var offset = segment.SegmentPreInsert(N)
|
||||
assert.GreaterOrEqual(t, offset, int64(0))
|
||||
assert.Greater(t, offset, 0)
|
||||
|
||||
// 5. Do Insert
|
||||
var err = segment.SegmentInsert(offset, &ids, ×tamps, &records)
|
||||
|
@ -142,7 +132,7 @@ func TestSegment_SegmentSearch(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestSegment_SegmentPreInsert(t *testing.T) {
|
||||
// 1. Construct node, collection, partition and segment
|
||||
// 1. Construct node, collection, and segment
|
||||
node := NewQueryNode(0, 0)
|
||||
var collection = node.NewCollection("collection0", "fake schema")
|
||||
var partition = collection.NewPartition("partition0")
|
||||
|
@ -150,7 +140,7 @@ func TestSegment_SegmentPreInsert(t *testing.T) {
|
|||
|
||||
// 2. Do PreInsert
|
||||
var offset = segment.SegmentPreInsert(10)
|
||||
assert.GreaterOrEqual(t, offset, int64(0))
|
||||
assert.Greater(t, offset, 0)
|
||||
|
||||
// 3. Destruct node, collection, and segment
|
||||
partition.DeleteSegment(segment)
|
||||
|
@ -159,7 +149,7 @@ func TestSegment_SegmentPreInsert(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestSegment_SegmentPreDelete(t *testing.T) {
|
||||
// 1. Construct node, collection, partition and segment
|
||||
// 1. Construct node, collection, and segment
|
||||
node := NewQueryNode(0, 0)
|
||||
var collection = node.NewCollection("collection0", "fake schema")
|
||||
var partition = collection.NewPartition("partition0")
|
||||
|
@ -167,7 +157,7 @@ func TestSegment_SegmentPreDelete(t *testing.T) {
|
|||
|
||||
// 2. Do PreDelete
|
||||
var offset = segment.SegmentPreDelete(10)
|
||||
assert.GreaterOrEqual(t, offset, int64(0))
|
||||
assert.Greater(t, offset, 0)
|
||||
|
||||
// 3. Destruct node, collection, and segment
|
||||
partition.DeleteSegment(segment)
|
||||
|
@ -178,7 +168,7 @@ func TestSegment_SegmentPreDelete(t *testing.T) {
|
|||
// Segment util functions test
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
func TestSegment_GetStatus(t *testing.T) {
|
||||
// 1. Construct node, collection, partition and segment
|
||||
// 1. Construct node, collection, and segment
|
||||
node := NewQueryNode(0, 0)
|
||||
var collection = node.NewCollection("collection0", "fake schema")
|
||||
var partition = collection.NewPartition("partition0")
|
||||
|
@ -195,7 +185,7 @@ func TestSegment_GetStatus(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestSegment_Close(t *testing.T) {
|
||||
// 1. Construct node, collection, partition and segment
|
||||
// 1. Construct node, collection, and segment
|
||||
node := NewQueryNode(0, 0)
|
||||
var collection = node.NewCollection("collection0", "fake schema")
|
||||
var partition = collection.NewPartition("partition0")
|
||||
|
@ -212,39 +202,35 @@ func TestSegment_Close(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestSegment_GetRowCount(t *testing.T) {
|
||||
// 1. Construct node, collection, partition and segment
|
||||
// 1. Construct node, collection, and segment
|
||||
node := NewQueryNode(0, 0)
|
||||
var collection = node.NewCollection("collection0", "fake schema")
|
||||
var partition = collection.NewPartition("partition0")
|
||||
var segment = partition.NewSegment(0)
|
||||
|
||||
// 2. Create ids and timestamps
|
||||
ids := []int64{1, 2, 3}
|
||||
timestamps := []uint64{0, 0, 0}
|
||||
ids :=[] int64{1, 2, 3}
|
||||
timestamps :=[] uint64 {0, 0, 0}
|
||||
|
||||
// 3. Create records, use schema below:
|
||||
// schema_tmp->AddField("fakeVec", DataType::VECTOR_FLOAT, 16);
|
||||
// schema_tmp->AddField("age", DataType::INT32);
|
||||
const DIM = 16
|
||||
const DIM = 4
|
||||
const N = 3
|
||||
var vec = [DIM]float32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
|
||||
var vec = [DIM]float32{1.1, 2.2, 3.3, 4.4}
|
||||
var rawData []byte
|
||||
for _, ele := range vec {
|
||||
buf := make([]byte, 4)
|
||||
binary.LittleEndian.PutUint32(buf, math.Float32bits(ele))
|
||||
rawData = append(rawData, buf...)
|
||||
rawData=append(rawData, byte(ele))
|
||||
}
|
||||
bs := make([]byte, 4)
|
||||
binary.LittleEndian.PutUint32(bs, 1)
|
||||
rawData = append(rawData, bs...)
|
||||
rawData=append(rawData, byte(1))
|
||||
var records [][]byte
|
||||
for i := 0; i < N; i++ {
|
||||
for i:= 0; i < N; i++ {
|
||||
records = append(records, rawData)
|
||||
}
|
||||
|
||||
// 4. Do PreInsert
|
||||
var offset = segment.SegmentPreInsert(N)
|
||||
assert.GreaterOrEqual(t, offset, int64(0))
|
||||
assert.Greater(t, offset, 0)
|
||||
|
||||
// 5. Do Insert
|
||||
var err = segment.SegmentInsert(offset, &ids, ×tamps, &records)
|
||||
|
@ -261,19 +247,19 @@ func TestSegment_GetRowCount(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestSegment_GetDeletedCount(t *testing.T) {
|
||||
// 1. Construct node, collection, partition and segment
|
||||
// 1. Construct node, collection, and segment
|
||||
node := NewQueryNode(0, 0)
|
||||
var collection = node.NewCollection("collection0", "fake schema")
|
||||
var partition = collection.NewPartition("partition0")
|
||||
var segment = partition.NewSegment(0)
|
||||
|
||||
// 2. Create ids and timestamps
|
||||
ids := []int64{1, 2, 3}
|
||||
timestamps := []uint64{0, 0, 0}
|
||||
ids :=[] int64{1, 2, 3}
|
||||
timestamps :=[] uint64 {0, 0, 0}
|
||||
|
||||
// 3. Do PreDelete
|
||||
var offset = segment.SegmentPreDelete(10)
|
||||
assert.GreaterOrEqual(t, offset, int64(0))
|
||||
assert.Greater(t, offset, 0)
|
||||
|
||||
// 4. Do Delete
|
||||
var err = segment.SegmentDelete(offset, &ids, ×tamps)
|
||||
|
|
|
@ -6,21 +6,35 @@ import (
|
|||
)
|
||||
|
||||
// Function `GetSegmentByEntityId` should return entityIDs, timestamps and segmentIDs
|
||||
func (node *QueryNode) GetKey2Segments() (*[]int64, *[]uint64, *[]int64) {
|
||||
var entityIDs = make([]int64, 0)
|
||||
var timestamps = make([]uint64, 0)
|
||||
var segmentIDs = make([]int64, 0)
|
||||
func (node *QueryNode) GetKey2Segments() ([]int64, []uint64, []int64) {
|
||||
// TODO: get id2segment info from pulsar
|
||||
return nil, nil, nil
|
||||
}
|
||||
|
||||
var key2SegMsg = node.messageClient.Key2SegMsg
|
||||
for _, msg := range key2SegMsg {
|
||||
for _, segmentID := range msg.SegmentId {
|
||||
entityIDs = append(entityIDs, msg.Uid)
|
||||
timestamps = append(timestamps, msg.Timestamp)
|
||||
segmentIDs = append(segmentIDs, segmentID)
|
||||
func (node *QueryNode) GetTargetSegment(collectionName *string, partitionTag *string) (*Segment, error) {
|
||||
var targetPartition *Partition
|
||||
|
||||
for _, collection := range node.Collections {
|
||||
if *collectionName == collection.CollectionName {
|
||||
for _, partition := range collection.Partitions {
|
||||
if *partitionTag == partition.PartitionName {
|
||||
targetPartition = partition
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return &entityIDs, ×tamps, &segmentIDs
|
||||
if targetPartition == nil {
|
||||
return nil, errors.New("cannot found target partition")
|
||||
}
|
||||
|
||||
for _, segment := range targetPartition.OpenedSegments {
|
||||
// TODO: add other conditions
|
||||
return segment, nil
|
||||
}
|
||||
|
||||
return nil, errors.New("cannot found target segment")
|
||||
}
|
||||
|
||||
func (node *QueryNode) GetCollectionByCollectionName(collectionName string) (*Collection, error) {
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
package reader
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestUtilFunctions_GetKey2Segments(t *testing.T) {
|
||||
// TODO: Add GetKey2Segments test
|
||||
}
|
||||
|
||||
func TestUtilFunctions_GetCollectionByCollectionName(t *testing.T) {
|
||||
// 1. Construct node, and collections
|
||||
node := NewQueryNode(0, 0)
|
||||
var _ = node.NewCollection("collection0", "fake schema")
|
||||
|
||||
// 2. Get collection by collectionName
|
||||
var c0, err = node.GetCollectionByCollectionName("collection0")
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, c0.CollectionName, "collection0")
|
||||
}
|
||||
|
||||
func TestUtilFunctions_GetSegmentBySegmentID(t *testing.T) {
|
||||
// 1. Construct node, collection, partition and segment
|
||||
node := NewQueryNode(0, 0)
|
||||
var collection = node.NewCollection("collection0", "fake schema")
|
||||
var partition = collection.NewPartition("partition0")
|
||||
var segment = partition.NewSegment(0)
|
||||
node.SegmentsMap[0] = segment
|
||||
|
||||
// 2. Get segment by segment id
|
||||
var s0, err = node.GetSegmentBySegmentID(0)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, s0.SegmentId, int64(0))
|
||||
}
|
|
@ -49,7 +49,7 @@ GRPC_INCLUDE=.:.
|
|||
rm -rf proto-cpp && mkdir -p proto-cpp
|
||||
|
||||
PB_FILES=()
|
||||
GRPC_FILES=("message.proto")
|
||||
GRPC_FILES=("hello.proto" "master.proto" "message.proto")
|
||||
|
||||
ALL_FILES=("${PB_FILES[@]}")
|
||||
ALL_FILES+=("${GRPC_FILES[@]}")
|
||||
|
|
|
@ -41,12 +41,8 @@ if [ -z $GOPATH ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
export PATH=${GOPATH}/bin:$PATH
|
||||
echo `which protoc-gen-go`
|
||||
|
||||
GO_PREFIX_PATH=github.com/czs007/suvlim/pkg
|
||||
|
||||
|
||||
function collect() {
|
||||
file=$(basename $1)
|
||||
base_name=$(basename $file ".proto")
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue