From 48064dfdee661e5eef38537ffebdd6332a03a917 Mon Sep 17 00:00:00 2001 From: kun yu Date: Mon, 22 Jul 2019 10:14:23 +0800 Subject: [PATCH 1/5] add grpc Former-commit-id: aee405b98f44290051fe022387c42bcb6d68cc76 --- cpp/src/CMakeLists.txt | 16 +- cpp/src/grpc/cpp_gen.sh | 9 + cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc | 405 ++ cpp/src/grpc/gen-milvus/milvus.grpc.pb.h | 2003 ++++++ cpp/src/grpc/gen-milvus/milvus.pb.cc | 5987 +++++++++++++++++ cpp/src/grpc/gen-milvus/milvus.pb.h | 3376 ++++++++++ cpp/src/grpc/gen-status/status.grpc.pb.cc | 22 + cpp/src/grpc/gen-status/status.grpc.pb.h | 35 + cpp/src/grpc/gen-status/status.pb.cc | 494 ++ cpp/src/grpc/gen-status/status.pb.h | 333 + cpp/src/grpc/milvus.proto | 250 + cpp/src/grpc/status.proto | 33 + cpp/src/grpcsdk/CMakeLists.txt | 38 + cpp/src/grpcsdk/examples/CMakeLists.txt | 24 + cpp/src/grpcsdk/examples/main.cpp | 68 + cpp/src/grpcsdk/examples/src/ClientTest.cpp | 291 + cpp/src/grpcsdk/examples/src/ClientTest.h | 13 + cpp/src/grpcsdk/include/MilvusApi.h | 384 ++ cpp/src/grpcsdk/include/Status.h | 330 + cpp/src/grpcsdk/src/client/ClientProxy.cpp | 313 + cpp/src/grpcsdk/src/client/ClientProxy.h | 66 + cpp/src/grpcsdk/src/client/grpcClient.cpp | 168 + cpp/src/grpcsdk/src/client/grpcClient.h | 62 + .../grpcsdk/src/interface/ConnectionImpl.cpp | 118 + .../grpcsdk/src/interface/ConnectionImpl.h | 62 + cpp/src/grpcsdk/src/interface/Status.cpp | 129 + cpp/src/grpcsdk/src/util/Exception.h | 34 + cpp/src/grpcserver/DBWrapper.cpp | 102 + cpp/src/grpcserver/DBWrapper.h | 34 + cpp/src/grpcserver/MilvusServer.cpp | 101 + cpp/src/grpcserver/MilvusServer.h | 33 + cpp/src/grpcserver/RequestHandler.cpp | 120 + cpp/src/grpcserver/RequestHandler.h | 175 + cpp/src/grpcserver/RequestScheduler.cpp | 221 + cpp/src/grpcserver/RequestScheduler.h | 90 + cpp/src/grpcserver/RequestTask.cpp | 649 ++ cpp/src/grpcserver/RequestTask.h | 180 + cpp/src/grpcserver/Server.cpp | 245 + cpp/src/grpcserver/Server.h | 47 + cpp/src/grpcserver/ServerConfig.cpp | 82 + cpp/src/grpcserver/ServerConfig.h | 67 + cpp/src/main.cpp | 3 +- cpp/src/sdk/src/client/ClientProxy.cpp | 1 + cpp/src/sdk/src/interface/ConnectionImpl.h | 2 +- 44 files changed, 17211 insertions(+), 4 deletions(-) create mode 100644 cpp/src/grpc/cpp_gen.sh create mode 100644 cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc create mode 100644 cpp/src/grpc/gen-milvus/milvus.grpc.pb.h create mode 100644 cpp/src/grpc/gen-milvus/milvus.pb.cc create mode 100644 cpp/src/grpc/gen-milvus/milvus.pb.h create mode 100644 cpp/src/grpc/gen-status/status.grpc.pb.cc create mode 100644 cpp/src/grpc/gen-status/status.grpc.pb.h create mode 100644 cpp/src/grpc/gen-status/status.pb.cc create mode 100644 cpp/src/grpc/gen-status/status.pb.h create mode 100644 cpp/src/grpc/milvus.proto create mode 100644 cpp/src/grpc/status.proto create mode 100644 cpp/src/grpcsdk/CMakeLists.txt create mode 100644 cpp/src/grpcsdk/examples/CMakeLists.txt create mode 100644 cpp/src/grpcsdk/examples/main.cpp create mode 100644 cpp/src/grpcsdk/examples/src/ClientTest.cpp create mode 100644 cpp/src/grpcsdk/examples/src/ClientTest.h create mode 100644 cpp/src/grpcsdk/include/MilvusApi.h create mode 100644 cpp/src/grpcsdk/include/Status.h create mode 100644 cpp/src/grpcsdk/src/client/ClientProxy.cpp create mode 100644 cpp/src/grpcsdk/src/client/ClientProxy.h create mode 100644 cpp/src/grpcsdk/src/client/grpcClient.cpp create mode 100644 cpp/src/grpcsdk/src/client/grpcClient.h create mode 100644 cpp/src/grpcsdk/src/interface/ConnectionImpl.cpp create mode 100644 cpp/src/grpcsdk/src/interface/ConnectionImpl.h create mode 100644 cpp/src/grpcsdk/src/interface/Status.cpp create mode 100644 cpp/src/grpcsdk/src/util/Exception.h create mode 100644 cpp/src/grpcserver/DBWrapper.cpp create mode 100644 cpp/src/grpcserver/DBWrapper.h create mode 100644 cpp/src/grpcserver/MilvusServer.cpp create mode 100644 cpp/src/grpcserver/MilvusServer.h create mode 100644 cpp/src/grpcserver/RequestHandler.cpp create mode 100644 cpp/src/grpcserver/RequestHandler.h create mode 100644 cpp/src/grpcserver/RequestScheduler.cpp create mode 100644 cpp/src/grpcserver/RequestScheduler.h create mode 100644 cpp/src/grpcserver/RequestTask.cpp create mode 100644 cpp/src/grpcserver/RequestTask.h create mode 100644 cpp/src/grpcserver/Server.cpp create mode 100644 cpp/src/grpcserver/Server.h create mode 100644 cpp/src/grpcserver/ServerConfig.cpp create mode 100644 cpp/src/grpcserver/ServerConfig.h diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt index 00e2e1e87d..84b225efbe 100644 --- a/cpp/src/CMakeLists.txt +++ b/cpp/src/CMakeLists.txt @@ -8,6 +8,7 @@ aux_source_directory(cache cache_files) aux_source_directory(config config_files) aux_source_directory(server server_files) +aux_source_directory(grpcserver grpcserver_files) aux_source_directory(utils utils_files) aux_source_directory(db db_files) aux_source_directory(wrapper wrapper_files) @@ -40,6 +41,10 @@ set(service_files metrics/SystemInfo.h server/ThreadPoolServer.cpp server/ThreadPoolServer.h + grpc/gen-milvus/milvus.grpc.pb.cc + grpc/gen-milvus/milvus.pb.cc + grpc/gen-status/status.grpc.pb.cc + grpc/gen-status/status.pb.cc ) set(engine_files @@ -63,11 +68,16 @@ include_directories(/usr/include) include_directories("${CUDA_TOOLKIT_ROOT_DIR}/include") include_directories(thrift/gen-cpp) include_directories(/usr/include/mysql) +include_directories(grpc/gen-status) +include_directories(grpc/gen-milvus) set(third_party_libs easyloggingpp sqlite thrift + grpc + grpc++ + grpcpp_channelz yaml-cpp libgpufaiss.a faiss @@ -158,7 +168,8 @@ set(server_libs add_executable(milvus_server ${config_files} - ${server_files} +# ${server_files} + ${grpcserver_files} ${utils_files} ${service_files} ${metrics_files} @@ -189,4 +200,5 @@ install(FILES ${CMAKE_BINARY_DIR}/mysqlpp_ep-prefix/src/mysqlpp_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}mysqlpp${CMAKE_SHARED_LIBRARY_SUFFIX}.3.2.4 DESTINATION lib) #need to copy libmysqlpp.so -add_subdirectory(sdk) +#add_subdirectory(sdk) +add_subdirectory(grpcsdk) diff --git a/cpp/src/grpc/cpp_gen.sh b/cpp/src/grpc/cpp_gen.sh new file mode 100644 index 0000000000..91cbc907a6 --- /dev/null +++ b/cpp/src/grpc/cpp_gen.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +protoc -I . --grpc_out=./gen-status --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` status.proto + +protoc -I . --cpp_out=./gen-status status.proto + +protoc -I . --grpc_out=./gen-milvus --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` milvus.proto + +protoc -I . --cpp_out=./gen-milvus milvus.proto \ No newline at end of file diff --git a/cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc b/cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc new file mode 100644 index 0000000000..41cc8c03f4 --- /dev/null +++ b/cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc @@ -0,0 +1,405 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: milvus.proto + +#include "milvus.pb.h" +#include "milvus.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace milvus { +namespace grpc { + +static const char* MilvusService_method_names[] = { + "/milvus.grpc.MilvusService/CreateTable", + "/milvus.grpc.MilvusService/HasTable", + "/milvus.grpc.MilvusService/DropTable", + "/milvus.grpc.MilvusService/BuildIndex", + "/milvus.grpc.MilvusService/InsertVector", + "/milvus.grpc.MilvusService/SearchVector", + "/milvus.grpc.MilvusService/SearchVectorInFiles", + "/milvus.grpc.MilvusService/DescribeTable", + "/milvus.grpc.MilvusService/GetTableRowCount", + "/milvus.grpc.MilvusService/ShowTables", + "/milvus.grpc.MilvusService/Ping", +}; + +std::unique_ptr< MilvusService::Stub> MilvusService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< MilvusService::Stub> stub(new MilvusService::Stub(channel)); + return stub; +} + +MilvusService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), rpcmethod_CreateTable_(MilvusService_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_HasTable_(MilvusService_method_names[1], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_DropTable_(MilvusService_method_names[2], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_BuildIndex_(MilvusService_method_names[3], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_InsertVector_(MilvusService_method_names[4], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_SearchVector_(MilvusService_method_names[5], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel) + , rpcmethod_SearchVectorInFiles_(MilvusService_method_names[6], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel) + , rpcmethod_DescribeTable_(MilvusService_method_names[7], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_GetTableRowCount_(MilvusService_method_names[8], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_ShowTables_(MilvusService_method_names[9], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel) + , rpcmethod_Ping_(MilvusService_method_names[10], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status MilvusService::Stub::CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::milvus::Status* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_CreateTable_, context, request, response); +} + +void MilvusService::Stub::experimental_async::CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_CreateTable_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_CreateTable_, context, request, response, std::move(f)); +} + +::grpc::ClientAsyncResponseReader< ::milvus::Status>* MilvusService::Stub::AsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::Status>::Create(channel_.get(), cq, rpcmethod_CreateTable_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::milvus::Status>* MilvusService::Stub::PrepareAsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::Status>::Create(channel_.get(), cq, rpcmethod_CreateTable_, context, request, false); +} + +::grpc::Status MilvusService::Stub::HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::BoolReply* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_HasTable_, context, request, response); +} + +void MilvusService::Stub::experimental_async::HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HasTable_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::HasTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::BoolReply* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HasTable_, context, request, response, std::move(f)); +} + +::grpc::ClientAsyncResponseReader< ::milvus::grpc::BoolReply>* MilvusService::Stub::AsyncHasTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::BoolReply>::Create(channel_.get(), cq, rpcmethod_HasTable_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::milvus::grpc::BoolReply>* MilvusService::Stub::PrepareAsyncHasTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::BoolReply>::Create(channel_.get(), cq, rpcmethod_HasTable_, context, request, false); +} + +::grpc::Status MilvusService::Stub::DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::Status* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_DropTable_, context, request, response); +} + +void MilvusService::Stub::experimental_async::DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DropTable_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DropTable_, context, request, response, std::move(f)); +} + +::grpc::ClientAsyncResponseReader< ::milvus::Status>* MilvusService::Stub::AsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::Status>::Create(channel_.get(), cq, rpcmethod_DropTable_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::milvus::Status>* MilvusService::Stub::PrepareAsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::Status>::Create(channel_.get(), cq, rpcmethod_DropTable_, context, request, false); +} + +::grpc::Status MilvusService::Stub::BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::Status* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_BuildIndex_, context, request, response); +} + +void MilvusService::Stub::experimental_async::BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_BuildIndex_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_BuildIndex_, context, request, response, std::move(f)); +} + +::grpc::ClientAsyncResponseReader< ::milvus::Status>* MilvusService::Stub::AsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::Status>::Create(channel_.get(), cq, rpcmethod_BuildIndex_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::milvus::Status>* MilvusService::Stub::PrepareAsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::Status>::Create(channel_.get(), cq, rpcmethod_BuildIndex_, context, request, false); +} + +::grpc::Status MilvusService::Stub::InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::milvus::grpc::VectorIds* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_InsertVector_, context, request, response); +} + +void MilvusService::Stub::experimental_async::InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_InsertVector_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::InsertVector(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::VectorIds* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_InsertVector_, context, request, response, std::move(f)); +} + +::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>* MilvusService::Stub::AsyncInsertVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::VectorIds>::Create(channel_.get(), cq, rpcmethod_InsertVector_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>* MilvusService::Stub::PrepareAsyncInsertVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::VectorIds>::Create(channel_.get(), cq, rpcmethod_InsertVector_, context, request, false); +} + +::grpc::ClientReader< ::milvus::grpc::TopKQueryResult>* MilvusService::Stub::SearchVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request) { + return ::grpc::internal::ClientReaderFactory< ::milvus::grpc::TopKQueryResult>::Create(channel_.get(), rpcmethod_SearchVector_, context, request); +} + +void MilvusService::Stub::experimental_async::SearchVector(::grpc::ClientContext* context, ::milvus::grpc::SearchVectorInfos* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TopKQueryResult>* reactor) { + ::grpc::internal::ClientCallbackReaderFactory< ::milvus::grpc::TopKQueryResult>::Create(stub_->channel_.get(), stub_->rpcmethod_SearchVector_, context, request, reactor); +} + +::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>* MilvusService::Stub::AsyncSearchVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc::internal::ClientAsyncReaderFactory< ::milvus::grpc::TopKQueryResult>::Create(channel_.get(), cq, rpcmethod_SearchVector_, context, request, true, tag); +} + +::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>* MilvusService::Stub::PrepareAsyncSearchVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncReaderFactory< ::milvus::grpc::TopKQueryResult>::Create(channel_.get(), cq, rpcmethod_SearchVector_, context, request, false, nullptr); +} + +::grpc::ClientReader< ::milvus::grpc::TopKQueryResult>* MilvusService::Stub::SearchVectorInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request) { + return ::grpc::internal::ClientReaderFactory< ::milvus::grpc::TopKQueryResult>::Create(channel_.get(), rpcmethod_SearchVectorInFiles_, context, request); +} + +void MilvusService::Stub::experimental_async::SearchVectorInFiles(::grpc::ClientContext* context, ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TopKQueryResult>* reactor) { + ::grpc::internal::ClientCallbackReaderFactory< ::milvus::grpc::TopKQueryResult>::Create(stub_->channel_.get(), stub_->rpcmethod_SearchVectorInFiles_, context, request, reactor); +} + +::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>* MilvusService::Stub::AsyncSearchVectorInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc::internal::ClientAsyncReaderFactory< ::milvus::grpc::TopKQueryResult>::Create(channel_.get(), cq, rpcmethod_SearchVectorInFiles_, context, request, true, tag); +} + +::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>* MilvusService::Stub::PrepareAsyncSearchVectorInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncReaderFactory< ::milvus::grpc::TopKQueryResult>::Create(channel_.get(), cq, rpcmethod_SearchVectorInFiles_, context, request, false, nullptr); +} + +::grpc::Status MilvusService::Stub::DescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::TableSchema* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_DescribeTable_, context, request, response); +} + +void MilvusService::Stub::experimental_async::DescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DescribeTable_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::DescribeTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableSchema* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DescribeTable_, context, request, response, std::move(f)); +} + +::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableSchema>* MilvusService::Stub::AsyncDescribeTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TableSchema>::Create(channel_.get(), cq, rpcmethod_DescribeTable_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableSchema>* MilvusService::Stub::PrepareAsyncDescribeTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TableSchema>::Create(channel_.get(), cq, rpcmethod_DescribeTable_, context, request, false); +} + +::grpc::Status MilvusService::Stub::GetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::TableRowCount* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_GetTableRowCount_, context, request, response); +} + +void MilvusService::Stub::experimental_async::GetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_GetTableRowCount_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::GetTableRowCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableRowCount* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_GetTableRowCount_, context, request, response, std::move(f)); +} + +::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableRowCount>* MilvusService::Stub::AsyncGetTableRowCountRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TableRowCount>::Create(channel_.get(), cq, rpcmethod_GetTableRowCount_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableRowCount>* MilvusService::Stub::PrepareAsyncGetTableRowCountRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TableRowCount>::Create(channel_.get(), cq, rpcmethod_GetTableRowCount_, context, request, false); +} + +::grpc::ClientReader< ::milvus::grpc::TableName>* MilvusService::Stub::ShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request) { + return ::grpc::internal::ClientReaderFactory< ::milvus::grpc::TableName>::Create(channel_.get(), rpcmethod_ShowTables_, context, request); +} + +void MilvusService::Stub::experimental_async::ShowTables(::grpc::ClientContext* context, ::milvus::grpc::Command* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TableName>* reactor) { + ::grpc::internal::ClientCallbackReaderFactory< ::milvus::grpc::TableName>::Create(stub_->channel_.get(), stub_->rpcmethod_ShowTables_, context, request, reactor); +} + +::grpc::ClientAsyncReader< ::milvus::grpc::TableName>* MilvusService::Stub::AsyncShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc::internal::ClientAsyncReaderFactory< ::milvus::grpc::TableName>::Create(channel_.get(), cq, rpcmethod_ShowTables_, context, request, true, tag); +} + +::grpc::ClientAsyncReader< ::milvus::grpc::TableName>* MilvusService::Stub::PrepareAsyncShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncReaderFactory< ::milvus::grpc::TableName>::Create(channel_.get(), cq, rpcmethod_ShowTables_, context, request, false, nullptr); +} + +::grpc::Status MilvusService::Stub::Ping(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::milvus::grpc::ServerStatus* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Ping_, context, request, response); +} + +void MilvusService::Stub::experimental_async::Ping(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Ping_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::Ping(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::ServerStatus* response, std::function f) { + return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Ping_, context, request, response, std::move(f)); +} + +::grpc::ClientAsyncResponseReader< ::milvus::grpc::ServerStatus>* MilvusService::Stub::AsyncPingRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::ServerStatus>::Create(channel_.get(), cq, rpcmethod_Ping_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::milvus::grpc::ServerStatus>* MilvusService::Stub::PrepareAsyncPingRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::ServerStatus>::Create(channel_.get(), cq, rpcmethod_Ping_, context, request, false); +} + +MilvusService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + MilvusService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::TableSchema, ::milvus::Status>( + std::mem_fn(&MilvusService::Service::CreateTable), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + MilvusService_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::TableName, ::milvus::grpc::BoolReply>( + std::mem_fn(&MilvusService::Service::HasTable), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + MilvusService_method_names[2], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::TableName, ::milvus::Status>( + std::mem_fn(&MilvusService::Service::DropTable), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + MilvusService_method_names[3], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::TableName, ::milvus::Status>( + std::mem_fn(&MilvusService::Service::BuildIndex), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + MilvusService_method_names[4], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::InsertInfos, ::milvus::grpc::VectorIds>( + std::mem_fn(&MilvusService::Service::InsertVector), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + MilvusService_method_names[5], + ::grpc::internal::RpcMethod::SERVER_STREAMING, + new ::grpc::internal::ServerStreamingHandler< MilvusService::Service, ::milvus::grpc::SearchVectorInfos, ::milvus::grpc::TopKQueryResult>( + std::mem_fn(&MilvusService::Service::SearchVector), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + MilvusService_method_names[6], + ::grpc::internal::RpcMethod::SERVER_STREAMING, + new ::grpc::internal::ServerStreamingHandler< MilvusService::Service, ::milvus::grpc::SearchVectorInFilesInfos, ::milvus::grpc::TopKQueryResult>( + std::mem_fn(&MilvusService::Service::SearchVectorInFiles), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + MilvusService_method_names[7], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::TableName, ::milvus::grpc::TableSchema>( + std::mem_fn(&MilvusService::Service::DescribeTable), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + MilvusService_method_names[8], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::TableName, ::milvus::grpc::TableRowCount>( + std::mem_fn(&MilvusService::Service::GetTableRowCount), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + MilvusService_method_names[9], + ::grpc::internal::RpcMethod::SERVER_STREAMING, + new ::grpc::internal::ServerStreamingHandler< MilvusService::Service, ::milvus::grpc::Command, ::milvus::grpc::TableName>( + std::mem_fn(&MilvusService::Service::ShowTables), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + MilvusService_method_names[10], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::Command, ::milvus::grpc::ServerStatus>( + std::mem_fn(&MilvusService::Service::Ping), this))); +} + +MilvusService::Service::~Service() { +} + +::grpc::Status MilvusService::Service::CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status MilvusService::Service::HasTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status MilvusService::Service::DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status MilvusService::Service::BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status MilvusService::Service::InsertVector(::grpc::ServerContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status MilvusService::Service::SearchVector(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer) { + (void) context; + (void) request; + (void) writer; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status MilvusService::Service::SearchVectorInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer) { + (void) context; + (void) request; + (void) writer; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status MilvusService::Service::DescribeTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status MilvusService::Service::GetTableRowCount(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status MilvusService::Service::ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::grpc::ServerWriter< ::milvus::grpc::TableName>* writer) { + (void) context; + (void) request; + (void) writer; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status MilvusService::Service::Ping(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace milvus +} // namespace grpc + diff --git a/cpp/src/grpc/gen-milvus/milvus.grpc.pb.h b/cpp/src/grpc/gen-milvus/milvus.grpc.pb.h new file mode 100644 index 0000000000..464b9ad50f --- /dev/null +++ b/cpp/src/grpc/gen-milvus/milvus.grpc.pb.h @@ -0,0 +1,2003 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: milvus.proto +#ifndef GRPC_milvus_2eproto__INCLUDED +#define GRPC_milvus_2eproto__INCLUDED + +#include "milvus.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace grpc { +class CompletionQueue; +class Channel; +class ServerCompletionQueue; +class ServerContext; +} // namespace grpc + +namespace milvus { +namespace grpc { + +class MilvusService final { + public: + static constexpr char const* service_full_name() { + return "milvus.grpc.MilvusService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // * + // @brief Create table method + // + // This method is used to create table + // + // @param param, use to provide table information to be created. + // + virtual ::grpc::Status CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::milvus::Status* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>> AsyncCreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>>(AsyncCreateTableRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>> PrepareAsyncCreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>>(PrepareAsyncCreateTableRaw(context, request, cq)); + } + // * + // @brief Test table existence method + // + // This method is used to test table existence. + // + // @param table_name, table name is going to be tested. + // + virtual ::grpc::Status HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::BoolReply* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::BoolReply>> AsyncHasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::BoolReply>>(AsyncHasTableRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::BoolReply>> PrepareAsyncHasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::BoolReply>>(PrepareAsyncHasTableRaw(context, request, cq)); + } + // * + // @brief Delete table method + // + // This method is used to delete table. + // + // @param table_name, table name is going to be deleted. + // + virtual ::grpc::Status DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::Status* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>> AsyncDropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>>(AsyncDropTableRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>> PrepareAsyncDropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>>(PrepareAsyncDropTableRaw(context, request, cq)); + } + // * + // @brief Build index by table method + // + // This method is used to build index by table in sync mode. + // + // @param table_name, table is going to be built index. + // + virtual ::grpc::Status BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::Status* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>> AsyncBuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>>(AsyncBuildIndexRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>> PrepareAsyncBuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>>(PrepareAsyncBuildIndexRaw(context, request, cq)); + } + // * + // @brief Add vector array to table + // + // This method is used to add vector array to table. + // + // @param table_name, table_name is inserted. + // @param record_array, vector array is inserted. + // + // @return vector id array + virtual ::grpc::Status InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::milvus::grpc::VectorIds* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::VectorIds>> AsyncInsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::VectorIds>>(AsyncInsertVectorRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::VectorIds>> PrepareAsyncInsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::VectorIds>>(PrepareAsyncInsertVectorRaw(context, request, cq)); + } + // * + // @brief Query vector + // + // This method is used to query vector in table. + // + // @param table_name, table_name is queried. + // @param query_record_array, all vector are going to be queried. + // @param query_range_array, optional ranges for conditional search. If not specified, search whole table + // @param topk, how many similarity vectors will be searched. + // + // @return query result array. + std::unique_ptr< ::grpc::ClientReaderInterface< ::milvus::grpc::TopKQueryResult>> SearchVector(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request) { + return std::unique_ptr< ::grpc::ClientReaderInterface< ::milvus::grpc::TopKQueryResult>>(SearchVectorRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TopKQueryResult>> AsyncSearchVector(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TopKQueryResult>>(AsyncSearchVectorRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TopKQueryResult>> PrepareAsyncSearchVector(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TopKQueryResult>>(PrepareAsyncSearchVectorRaw(context, request, cq)); + } + // * + // @brief Internal use query interface + // + // This method is used to query vector in specified files. + // + // @param file_id_array, specified files id array, queried. + // @param query_record_array, all vector are going to be queried. + // @param query_range_array, optional ranges for conditional search. If not specified, search whole table + // @param topk, how many similarity vectors will be searched. + // + // @return query result array. + std::unique_ptr< ::grpc::ClientReaderInterface< ::milvus::grpc::TopKQueryResult>> SearchVectorInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request) { + return std::unique_ptr< ::grpc::ClientReaderInterface< ::milvus::grpc::TopKQueryResult>>(SearchVectorInFilesRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TopKQueryResult>> AsyncSearchVectorInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TopKQueryResult>>(AsyncSearchVectorInFilesRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TopKQueryResult>> PrepareAsyncSearchVectorInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TopKQueryResult>>(PrepareAsyncSearchVectorInFilesRaw(context, request, cq)); + } + // * + // @brief Get table schema + // + // This method is used to get table schema. + // + // @param table_name, target table name. + // + // @return table schema + virtual ::grpc::Status DescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::TableSchema* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableSchema>> AsyncDescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableSchema>>(AsyncDescribeTableRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableSchema>> PrepareAsyncDescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableSchema>>(PrepareAsyncDescribeTableRaw(context, request, cq)); + } + // * + // @brief Get table schema + // + // This method is used to get table schema. + // + // @param table_name, target table name. + // + // @return table schema + virtual ::grpc::Status GetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::TableRowCount* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableRowCount>> AsyncGetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableRowCount>>(AsyncGetTableRowCountRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableRowCount>> PrepareAsyncGetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableRowCount>>(PrepareAsyncGetTableRowCountRaw(context, request, cq)); + } + // * + // @brief List all tables in database + // + // This method is used to list all tables. + // + // + // @return table names. + std::unique_ptr< ::grpc::ClientReaderInterface< ::milvus::grpc::TableName>> ShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command& request) { + return std::unique_ptr< ::grpc::ClientReaderInterface< ::milvus::grpc::TableName>>(ShowTablesRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TableName>> AsyncShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TableName>>(AsyncShowTablesRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TableName>> PrepareAsyncShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TableName>>(PrepareAsyncShowTablesRaw(context, request, cq)); + } + // * + // @brief Give the server status + // + // This method is used to give the server status. + // + // @return Server status. + virtual ::grpc::Status Ping(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::milvus::grpc::ServerStatus* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::ServerStatus>> AsyncPing(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::ServerStatus>>(AsyncPingRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::ServerStatus>> PrepareAsyncPing(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::ServerStatus>>(PrepareAsyncPingRaw(context, request, cq)); + } + class experimental_async_interface { + public: + virtual ~experimental_async_interface() {} + // * + // @brief Create table method + // + // This method is used to create table + // + // @param param, use to provide table information to be created. + // + virtual void CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response, std::function) = 0; + virtual void CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function) = 0; + // * + // @brief Test table existence method + // + // This method is used to test table existence. + // + // @param table_name, table name is going to be tested. + // + virtual void HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response, std::function) = 0; + virtual void HasTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::BoolReply* response, std::function) = 0; + // * + // @brief Delete table method + // + // This method is used to delete table. + // + // @param table_name, table name is going to be deleted. + // + virtual void DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, std::function) = 0; + virtual void DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function) = 0; + // * + // @brief Build index by table method + // + // This method is used to build index by table in sync mode. + // + // @param table_name, table is going to be built index. + // + virtual void BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, std::function) = 0; + virtual void BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function) = 0; + // * + // @brief Add vector array to table + // + // This method is used to add vector array to table. + // + // @param table_name, table_name is inserted. + // @param record_array, vector array is inserted. + // + // @return vector id array + virtual void InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response, std::function) = 0; + virtual void InsertVector(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::VectorIds* response, std::function) = 0; + // * + // @brief Query vector + // + // This method is used to query vector in table. + // + // @param table_name, table_name is queried. + // @param query_record_array, all vector are going to be queried. + // @param query_range_array, optional ranges for conditional search. If not specified, search whole table + // @param topk, how many similarity vectors will be searched. + // + // @return query result array. + virtual void SearchVector(::grpc::ClientContext* context, ::milvus::grpc::SearchVectorInfos* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TopKQueryResult>* reactor) = 0; + // * + // @brief Internal use query interface + // + // This method is used to query vector in specified files. + // + // @param file_id_array, specified files id array, queried. + // @param query_record_array, all vector are going to be queried. + // @param query_range_array, optional ranges for conditional search. If not specified, search whole table + // @param topk, how many similarity vectors will be searched. + // + // @return query result array. + virtual void SearchVectorInFiles(::grpc::ClientContext* context, ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TopKQueryResult>* reactor) = 0; + // * + // @brief Get table schema + // + // This method is used to get table schema. + // + // @param table_name, target table name. + // + // @return table schema + virtual void DescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response, std::function) = 0; + virtual void DescribeTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableSchema* response, std::function) = 0; + // * + // @brief Get table schema + // + // This method is used to get table schema. + // + // @param table_name, target table name. + // + // @return table schema + virtual void GetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response, std::function) = 0; + virtual void GetTableRowCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableRowCount* response, std::function) = 0; + // * + // @brief List all tables in database + // + // This method is used to list all tables. + // + // + // @return table names. + virtual void ShowTables(::grpc::ClientContext* context, ::milvus::grpc::Command* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TableName>* reactor) = 0; + // * + // @brief Give the server status + // + // This method is used to give the server status. + // + // @return Server status. + virtual void Ping(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response, std::function) = 0; + virtual void Ping(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::ServerStatus* response, std::function) = 0; + }; + virtual class experimental_async_interface* experimental_async() { return nullptr; } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>* AsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>* PrepareAsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::BoolReply>* AsyncHasTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::BoolReply>* PrepareAsyncHasTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>* AsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>* PrepareAsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>* AsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>* PrepareAsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::VectorIds>* AsyncInsertVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::VectorIds>* PrepareAsyncInsertVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientReaderInterface< ::milvus::grpc::TopKQueryResult>* SearchVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TopKQueryResult>* AsyncSearchVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TopKQueryResult>* PrepareAsyncSearchVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientReaderInterface< ::milvus::grpc::TopKQueryResult>* SearchVectorInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TopKQueryResult>* AsyncSearchVectorInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TopKQueryResult>* PrepareAsyncSearchVectorInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableSchema>* AsyncDescribeTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableSchema>* PrepareAsyncDescribeTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableRowCount>* AsyncGetTableRowCountRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableRowCount>* PrepareAsyncGetTableRowCountRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientReaderInterface< ::milvus::grpc::TableName>* ShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TableName>* AsyncShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::milvus::grpc::TableName>* PrepareAsyncShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::ServerStatus>* AsyncPingRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::ServerStatus>* PrepareAsyncPingRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + ::grpc::Status CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::milvus::Status* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>> AsyncCreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>>(AsyncCreateTableRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>> PrepareAsyncCreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>>(PrepareAsyncCreateTableRaw(context, request, cq)); + } + ::grpc::Status HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::BoolReply* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::BoolReply>> AsyncHasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::BoolReply>>(AsyncHasTableRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::BoolReply>> PrepareAsyncHasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::BoolReply>>(PrepareAsyncHasTableRaw(context, request, cq)); + } + ::grpc::Status DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::Status* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>> AsyncDropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>>(AsyncDropTableRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>> PrepareAsyncDropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>>(PrepareAsyncDropTableRaw(context, request, cq)); + } + ::grpc::Status BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::Status* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>> AsyncBuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>>(AsyncBuildIndexRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>> PrepareAsyncBuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>>(PrepareAsyncBuildIndexRaw(context, request, cq)); + } + ::grpc::Status InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::milvus::grpc::VectorIds* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>> AsyncInsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>>(AsyncInsertVectorRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>> PrepareAsyncInsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>>(PrepareAsyncInsertVectorRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientReader< ::milvus::grpc::TopKQueryResult>> SearchVector(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request) { + return std::unique_ptr< ::grpc::ClientReader< ::milvus::grpc::TopKQueryResult>>(SearchVectorRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>> AsyncSearchVector(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>>(AsyncSearchVectorRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>> PrepareAsyncSearchVector(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>>(PrepareAsyncSearchVectorRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientReader< ::milvus::grpc::TopKQueryResult>> SearchVectorInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request) { + return std::unique_ptr< ::grpc::ClientReader< ::milvus::grpc::TopKQueryResult>>(SearchVectorInFilesRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>> AsyncSearchVectorInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>>(AsyncSearchVectorInFilesRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>> PrepareAsyncSearchVectorInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>>(PrepareAsyncSearchVectorInFilesRaw(context, request, cq)); + } + ::grpc::Status DescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::TableSchema* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableSchema>> AsyncDescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableSchema>>(AsyncDescribeTableRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableSchema>> PrepareAsyncDescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableSchema>>(PrepareAsyncDescribeTableRaw(context, request, cq)); + } + ::grpc::Status GetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::TableRowCount* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableRowCount>> AsyncGetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableRowCount>>(AsyncGetTableRowCountRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableRowCount>> PrepareAsyncGetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableRowCount>>(PrepareAsyncGetTableRowCountRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientReader< ::milvus::grpc::TableName>> ShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command& request) { + return std::unique_ptr< ::grpc::ClientReader< ::milvus::grpc::TableName>>(ShowTablesRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::milvus::grpc::TableName>> AsyncShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::milvus::grpc::TableName>>(AsyncShowTablesRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::milvus::grpc::TableName>> PrepareAsyncShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::milvus::grpc::TableName>>(PrepareAsyncShowTablesRaw(context, request, cq)); + } + ::grpc::Status Ping(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::milvus::grpc::ServerStatus* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::ServerStatus>> AsyncPing(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::ServerStatus>>(AsyncPingRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::ServerStatus>> PrepareAsyncPing(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::ServerStatus>>(PrepareAsyncPingRaw(context, request, cq)); + } + class experimental_async final : + public StubInterface::experimental_async_interface { + public: + void CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response, std::function) override; + void CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function) override; + void HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response, std::function) override; + void HasTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::BoolReply* response, std::function) override; + void DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, std::function) override; + void DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function) override; + void BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, std::function) override; + void BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function) override; + void InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response, std::function) override; + void InsertVector(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::VectorIds* response, std::function) override; + void SearchVector(::grpc::ClientContext* context, ::milvus::grpc::SearchVectorInfos* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TopKQueryResult>* reactor) override; + void SearchVectorInFiles(::grpc::ClientContext* context, ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TopKQueryResult>* reactor) override; + void DescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response, std::function) override; + void DescribeTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableSchema* response, std::function) override; + void GetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response, std::function) override; + void GetTableRowCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableRowCount* response, std::function) override; + void ShowTables(::grpc::ClientContext* context, ::milvus::grpc::Command* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TableName>* reactor) override; + void Ping(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response, std::function) override; + void Ping(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::ServerStatus* response, std::function) 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::Status>* AsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::Status>* PrepareAsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::BoolReply>* AsyncHasTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::BoolReply>* PrepareAsyncHasTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::Status>* AsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::Status>* PrepareAsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::Status>* AsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::Status>* PrepareAsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>* AsyncInsertVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>* PrepareAsyncInsertVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientReader< ::milvus::grpc::TopKQueryResult>* SearchVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request) override; + ::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>* AsyncSearchVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>* PrepareAsyncSearchVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientReader< ::milvus::grpc::TopKQueryResult>* SearchVectorInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request) override; + ::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>* AsyncSearchVectorInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncReader< ::milvus::grpc::TopKQueryResult>* PrepareAsyncSearchVectorInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInFilesInfos& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableSchema>* AsyncDescribeTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableSchema>* PrepareAsyncDescribeTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableRowCount>* AsyncGetTableRowCountRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableRowCount>* PrepareAsyncGetTableRowCountRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientReader< ::milvus::grpc::TableName>* ShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request) override; + ::grpc::ClientAsyncReader< ::milvus::grpc::TableName>* AsyncShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncReader< ::milvus::grpc::TableName>* PrepareAsyncShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::ServerStatus>* AsyncPingRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::ServerStatus>* PrepareAsyncPingRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_CreateTable_; + const ::grpc::internal::RpcMethod rpcmethod_HasTable_; + const ::grpc::internal::RpcMethod rpcmethod_DropTable_; + const ::grpc::internal::RpcMethod rpcmethod_BuildIndex_; + const ::grpc::internal::RpcMethod rpcmethod_InsertVector_; + const ::grpc::internal::RpcMethod rpcmethod_SearchVector_; + const ::grpc::internal::RpcMethod rpcmethod_SearchVectorInFiles_; + const ::grpc::internal::RpcMethod rpcmethod_DescribeTable_; + const ::grpc::internal::RpcMethod rpcmethod_GetTableRowCount_; + const ::grpc::internal::RpcMethod rpcmethod_ShowTables_; + const ::grpc::internal::RpcMethod rpcmethod_Ping_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // * + // @brief Create table method + // + // This method is used to create table + // + // @param param, use to provide table information to be created. + // + virtual ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response); + // * + // @brief Test table existence method + // + // This method is used to test table existence. + // + // @param table_name, table name is going to be tested. + // + virtual ::grpc::Status HasTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response); + // * + // @brief Delete table method + // + // This method is used to delete table. + // + // @param table_name, table name is going to be deleted. + // + virtual ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response); + // * + // @brief Build index by table method + // + // This method is used to build index by table in sync mode. + // + // @param table_name, table is going to be built index. + // + virtual ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response); + // * + // @brief Add vector array to table + // + // This method is used to add vector array to table. + // + // @param table_name, table_name is inserted. + // @param record_array, vector array is inserted. + // + // @return vector id array + virtual ::grpc::Status InsertVector(::grpc::ServerContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response); + // * + // @brief Query vector + // + // This method is used to query vector in table. + // + // @param table_name, table_name is queried. + // @param query_record_array, all vector are going to be queried. + // @param query_range_array, optional ranges for conditional search. If not specified, search whole table + // @param topk, how many similarity vectors will be searched. + // + // @return query result array. + virtual ::grpc::Status SearchVector(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer); + // * + // @brief Internal use query interface + // + // This method is used to query vector in specified files. + // + // @param file_id_array, specified files id array, queried. + // @param query_record_array, all vector are going to be queried. + // @param query_range_array, optional ranges for conditional search. If not specified, search whole table + // @param topk, how many similarity vectors will be searched. + // + // @return query result array. + virtual ::grpc::Status SearchVectorInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer); + // * + // @brief Get table schema + // + // This method is used to get table schema. + // + // @param table_name, target table name. + // + // @return table schema + virtual ::grpc::Status DescribeTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response); + // * + // @brief Get table schema + // + // This method is used to get table schema. + // + // @param table_name, target table name. + // + // @return table schema + virtual ::grpc::Status GetTableRowCount(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response); + // * + // @brief List all tables in database + // + // This method is used to list all tables. + // + // + // @return table names. + virtual ::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::grpc::ServerWriter< ::milvus::grpc::TableName>* writer); + // * + // @brief Give the server status + // + // This method is used to give the server status. + // + // @return Server status. + virtual ::grpc::Status Ping(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response); + }; + template + class WithAsyncMethod_CreateTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_CreateTable() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_CreateTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestCreateTable(::grpc::ServerContext* context, ::milvus::grpc::TableSchema* request, ::grpc::ServerAsyncResponseWriter< ::milvus::Status>* 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 WithAsyncMethod_HasTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_HasTable() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_HasTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HasTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHasTable(::grpc::ServerContext* context, ::milvus::grpc::TableName* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::BoolReply>* 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 WithAsyncMethod_DropTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_DropTable() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_DropTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestDropTable(::grpc::ServerContext* context, ::milvus::grpc::TableName* request, ::grpc::ServerAsyncResponseWriter< ::milvus::Status>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_BuildIndex : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_BuildIndex() { + ::grpc::Service::MarkMethodAsync(3); + } + ~WithAsyncMethod_BuildIndex() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestBuildIndex(::grpc::ServerContext* context, ::milvus::grpc::TableName* request, ::grpc::ServerAsyncResponseWriter< ::milvus::Status>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_InsertVector : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_InsertVector() { + ::grpc::Service::MarkMethodAsync(4); + } + ~WithAsyncMethod_InsertVector() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status InsertVector(::grpc::ServerContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestInsertVector(::grpc::ServerContext* context, ::milvus::grpc::InsertInfos* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::VectorIds>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_SearchVector : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_SearchVector() { + ::grpc::Service::MarkMethodAsync(5); + } + ~WithAsyncMethod_SearchVector() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchVector(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSearchVector(::grpc::ServerContext* context, ::milvus::grpc::SearchVectorInfos* request, ::grpc::ServerAsyncWriter< ::milvus::grpc::TopKQueryResult>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(5, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_SearchVectorInFiles : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_SearchVectorInFiles() { + ::grpc::Service::MarkMethodAsync(6); + } + ~WithAsyncMethod_SearchVectorInFiles() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchVectorInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSearchVectorInFiles(::grpc::ServerContext* context, ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::ServerAsyncWriter< ::milvus::grpc::TopKQueryResult>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(6, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_DescribeTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_DescribeTable() { + ::grpc::Service::MarkMethodAsync(7); + } + ~WithAsyncMethod_DescribeTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DescribeTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestDescribeTable(::grpc::ServerContext* context, ::milvus::grpc::TableName* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::TableSchema>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(7, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_GetTableRowCount : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_GetTableRowCount() { + ::grpc::Service::MarkMethodAsync(8); + } + ~WithAsyncMethod_GetTableRowCount() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetTableRowCount(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetTableRowCount(::grpc::ServerContext* context, ::milvus::grpc::TableName* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::TableRowCount>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(8, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_ShowTables : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_ShowTables() { + ::grpc::Service::MarkMethodAsync(9); + } + ~WithAsyncMethod_ShowTables() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::grpc::ServerWriter< ::milvus::grpc::TableName>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestShowTables(::grpc::ServerContext* context, ::milvus::grpc::Command* request, ::grpc::ServerAsyncWriter< ::milvus::grpc::TableName>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(9, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Ping : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_Ping() { + ::grpc::Service::MarkMethodAsync(10); + } + ~WithAsyncMethod_Ping() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Ping(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestPing(::grpc::ServerContext* context, ::milvus::grpc::Command* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::ServerStatus>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_CreateTable > > > > > > > > > > AsyncService; + template + class ExperimentalWithCallbackMethod_CreateTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithCallbackMethod_CreateTable() { + ::grpc::Service::experimental().MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableSchema, ::milvus::Status>( + [this](::grpc::ServerContext* context, + const ::milvus::grpc::TableSchema* request, + ::milvus::Status* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + return this->CreateTable(context, request, response, controller); + })); + } + ~ExperimentalWithCallbackMethod_CreateTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithCallbackMethod_HasTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithCallbackMethod_HasTable() { + ::grpc::Service::experimental().MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::BoolReply>( + [this](::grpc::ServerContext* context, + const ::milvus::grpc::TableName* request, + ::milvus::grpc::BoolReply* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + return this->HasTable(context, request, response, controller); + })); + } + ~ExperimentalWithCallbackMethod_HasTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HasTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void HasTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithCallbackMethod_DropTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithCallbackMethod_DropTable() { + ::grpc::Service::experimental().MarkMethodCallback(2, + new ::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableName, ::milvus::Status>( + [this](::grpc::ServerContext* context, + const ::milvus::grpc::TableName* request, + ::milvus::Status* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + return this->DropTable(context, request, response, controller); + })); + } + ~ExperimentalWithCallbackMethod_DropTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithCallbackMethod_BuildIndex : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithCallbackMethod_BuildIndex() { + ::grpc::Service::experimental().MarkMethodCallback(3, + new ::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableName, ::milvus::Status>( + [this](::grpc::ServerContext* context, + const ::milvus::grpc::TableName* request, + ::milvus::Status* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + return this->BuildIndex(context, request, response, controller); + })); + } + ~ExperimentalWithCallbackMethod_BuildIndex() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithCallbackMethod_InsertVector : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithCallbackMethod_InsertVector() { + ::grpc::Service::experimental().MarkMethodCallback(4, + new ::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::InsertInfos, ::milvus::grpc::VectorIds>( + [this](::grpc::ServerContext* context, + const ::milvus::grpc::InsertInfos* request, + ::milvus::grpc::VectorIds* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + return this->InsertVector(context, request, response, controller); + })); + } + ~ExperimentalWithCallbackMethod_InsertVector() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status InsertVector(::grpc::ServerContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void InsertVector(::grpc::ServerContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithCallbackMethod_SearchVector : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithCallbackMethod_SearchVector() { + ::grpc::Service::experimental().MarkMethodCallback(5, + new ::grpc::internal::CallbackServerStreamingHandler< ::milvus::grpc::SearchVectorInfos, ::milvus::grpc::TopKQueryResult>( + [this] { return this->SearchVector(); })); + } + ~ExperimentalWithCallbackMethod_SearchVector() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchVector(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::experimental::ServerWriteReactor< ::milvus::grpc::SearchVectorInfos, ::milvus::grpc::TopKQueryResult>* SearchVector() { + return new ::grpc::internal::UnimplementedWriteReactor< + ::milvus::grpc::SearchVectorInfos, ::milvus::grpc::TopKQueryResult>;} + }; + template + class ExperimentalWithCallbackMethod_SearchVectorInFiles : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithCallbackMethod_SearchVectorInFiles() { + ::grpc::Service::experimental().MarkMethodCallback(6, + new ::grpc::internal::CallbackServerStreamingHandler< ::milvus::grpc::SearchVectorInFilesInfos, ::milvus::grpc::TopKQueryResult>( + [this] { return this->SearchVectorInFiles(); })); + } + ~ExperimentalWithCallbackMethod_SearchVectorInFiles() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchVectorInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::experimental::ServerWriteReactor< ::milvus::grpc::SearchVectorInFilesInfos, ::milvus::grpc::TopKQueryResult>* SearchVectorInFiles() { + return new ::grpc::internal::UnimplementedWriteReactor< + ::milvus::grpc::SearchVectorInFilesInfos, ::milvus::grpc::TopKQueryResult>;} + }; + template + class ExperimentalWithCallbackMethod_DescribeTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithCallbackMethod_DescribeTable() { + ::grpc::Service::experimental().MarkMethodCallback(7, + new ::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::TableSchema>( + [this](::grpc::ServerContext* context, + const ::milvus::grpc::TableName* request, + ::milvus::grpc::TableSchema* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + return this->DescribeTable(context, request, response, controller); + })); + } + ~ExperimentalWithCallbackMethod_DescribeTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DescribeTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void DescribeTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithCallbackMethod_GetTableRowCount : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithCallbackMethod_GetTableRowCount() { + ::grpc::Service::experimental().MarkMethodCallback(8, + new ::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::TableRowCount>( + [this](::grpc::ServerContext* context, + const ::milvus::grpc::TableName* request, + ::milvus::grpc::TableRowCount* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + return this->GetTableRowCount(context, request, response, controller); + })); + } + ~ExperimentalWithCallbackMethod_GetTableRowCount() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetTableRowCount(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void GetTableRowCount(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithCallbackMethod_ShowTables : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithCallbackMethod_ShowTables() { + ::grpc::Service::experimental().MarkMethodCallback(9, + new ::grpc::internal::CallbackServerStreamingHandler< ::milvus::grpc::Command, ::milvus::grpc::TableName>( + [this] { return this->ShowTables(); })); + } + ~ExperimentalWithCallbackMethod_ShowTables() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::grpc::ServerWriter< ::milvus::grpc::TableName>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::experimental::ServerWriteReactor< ::milvus::grpc::Command, ::milvus::grpc::TableName>* ShowTables() { + return new ::grpc::internal::UnimplementedWriteReactor< + ::milvus::grpc::Command, ::milvus::grpc::TableName>;} + }; + template + class ExperimentalWithCallbackMethod_Ping : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithCallbackMethod_Ping() { + ::grpc::Service::experimental().MarkMethodCallback(10, + new ::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::Command, ::milvus::grpc::ServerStatus>( + [this](::grpc::ServerContext* context, + const ::milvus::grpc::Command* request, + ::milvus::grpc::ServerStatus* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + return this->Ping(context, request, response, controller); + })); + } + ~ExperimentalWithCallbackMethod_Ping() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Ping(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void Ping(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + typedef ExperimentalWithCallbackMethod_CreateTable > > > > > > > > > > ExperimentalCallbackService; + template + class WithGenericMethod_CreateTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_CreateTable() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_CreateTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_HasTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_HasTable() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_HasTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HasTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_DropTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_DropTable() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_DropTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_BuildIndex : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_BuildIndex() { + ::grpc::Service::MarkMethodGeneric(3); + } + ~WithGenericMethod_BuildIndex() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_InsertVector : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_InsertVector() { + ::grpc::Service::MarkMethodGeneric(4); + } + ~WithGenericMethod_InsertVector() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status InsertVector(::grpc::ServerContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_SearchVector : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_SearchVector() { + ::grpc::Service::MarkMethodGeneric(5); + } + ~WithGenericMethod_SearchVector() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchVector(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_SearchVectorInFiles : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_SearchVectorInFiles() { + ::grpc::Service::MarkMethodGeneric(6); + } + ~WithGenericMethod_SearchVectorInFiles() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchVectorInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_DescribeTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_DescribeTable() { + ::grpc::Service::MarkMethodGeneric(7); + } + ~WithGenericMethod_DescribeTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DescribeTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_GetTableRowCount : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_GetTableRowCount() { + ::grpc::Service::MarkMethodGeneric(8); + } + ~WithGenericMethod_GetTableRowCount() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetTableRowCount(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_ShowTables : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_ShowTables() { + ::grpc::Service::MarkMethodGeneric(9); + } + ~WithGenericMethod_ShowTables() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::grpc::ServerWriter< ::milvus::grpc::TableName>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Ping : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_Ping() { + ::grpc::Service::MarkMethodGeneric(10); + } + ~WithGenericMethod_Ping() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Ping(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_CreateTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithRawMethod_CreateTable() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_CreateTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestCreateTable(::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 WithRawMethod_HasTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithRawMethod_HasTable() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_HasTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HasTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHasTable(::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 WithRawMethod_DropTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithRawMethod_DropTable() { + ::grpc::Service::MarkMethodRaw(2); + } + ~WithRawMethod_DropTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestDropTable(::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(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_BuildIndex : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithRawMethod_BuildIndex() { + ::grpc::Service::MarkMethodRaw(3); + } + ~WithRawMethod_BuildIndex() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestBuildIndex(::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(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_InsertVector : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithRawMethod_InsertVector() { + ::grpc::Service::MarkMethodRaw(4); + } + ~WithRawMethod_InsertVector() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status InsertVector(::grpc::ServerContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestInsertVector(::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(4, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_SearchVector : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithRawMethod_SearchVector() { + ::grpc::Service::MarkMethodRaw(5); + } + ~WithRawMethod_SearchVector() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchVector(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSearchVector(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(5, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_SearchVectorInFiles : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithRawMethod_SearchVectorInFiles() { + ::grpc::Service::MarkMethodRaw(6); + } + ~WithRawMethod_SearchVectorInFiles() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchVectorInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSearchVectorInFiles(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(6, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_DescribeTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithRawMethod_DescribeTable() { + ::grpc::Service::MarkMethodRaw(7); + } + ~WithRawMethod_DescribeTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DescribeTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestDescribeTable(::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(7, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_GetTableRowCount : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithRawMethod_GetTableRowCount() { + ::grpc::Service::MarkMethodRaw(8); + } + ~WithRawMethod_GetTableRowCount() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetTableRowCount(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetTableRowCount(::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(8, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_ShowTables : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithRawMethod_ShowTables() { + ::grpc::Service::MarkMethodRaw(9); + } + ~WithRawMethod_ShowTables() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::grpc::ServerWriter< ::milvus::grpc::TableName>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestShowTables(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(9, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Ping : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithRawMethod_Ping() { + ::grpc::Service::MarkMethodRaw(10); + } + ~WithRawMethod_Ping() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Ping(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestPing(::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(10, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class ExperimentalWithRawCallbackMethod_CreateTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithRawCallbackMethod_CreateTable() { + ::grpc::Service::experimental().MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this](::grpc::ServerContext* context, + const ::grpc::ByteBuffer* request, + ::grpc::ByteBuffer* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + this->CreateTable(context, request, response, controller); + })); + } + ~ExperimentalWithRawCallbackMethod_CreateTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void CreateTable(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithRawCallbackMethod_HasTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithRawCallbackMethod_HasTable() { + ::grpc::Service::experimental().MarkMethodRawCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this](::grpc::ServerContext* context, + const ::grpc::ByteBuffer* request, + ::grpc::ByteBuffer* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + this->HasTable(context, request, response, controller); + })); + } + ~ExperimentalWithRawCallbackMethod_HasTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HasTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void HasTable(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithRawCallbackMethod_DropTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithRawCallbackMethod_DropTable() { + ::grpc::Service::experimental().MarkMethodRawCallback(2, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this](::grpc::ServerContext* context, + const ::grpc::ByteBuffer* request, + ::grpc::ByteBuffer* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + this->DropTable(context, request, response, controller); + })); + } + ~ExperimentalWithRawCallbackMethod_DropTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void DropTable(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithRawCallbackMethod_BuildIndex : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithRawCallbackMethod_BuildIndex() { + ::grpc::Service::experimental().MarkMethodRawCallback(3, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this](::grpc::ServerContext* context, + const ::grpc::ByteBuffer* request, + ::grpc::ByteBuffer* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + this->BuildIndex(context, request, response, controller); + })); + } + ~ExperimentalWithRawCallbackMethod_BuildIndex() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void BuildIndex(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithRawCallbackMethod_InsertVector : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithRawCallbackMethod_InsertVector() { + ::grpc::Service::experimental().MarkMethodRawCallback(4, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this](::grpc::ServerContext* context, + const ::grpc::ByteBuffer* request, + ::grpc::ByteBuffer* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + this->InsertVector(context, request, response, controller); + })); + } + ~ExperimentalWithRawCallbackMethod_InsertVector() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status InsertVector(::grpc::ServerContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void InsertVector(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithRawCallbackMethod_SearchVector : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithRawCallbackMethod_SearchVector() { + ::grpc::Service::experimental().MarkMethodRawCallback(5, + new ::grpc::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this] { return this->SearchVector(); })); + } + ~ExperimentalWithRawCallbackMethod_SearchVector() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchVector(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* SearchVector() { + return new ::grpc::internal::UnimplementedWriteReactor< + ::grpc::ByteBuffer, ::grpc::ByteBuffer>;} + }; + template + class ExperimentalWithRawCallbackMethod_SearchVectorInFiles : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithRawCallbackMethod_SearchVectorInFiles() { + ::grpc::Service::experimental().MarkMethodRawCallback(6, + new ::grpc::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this] { return this->SearchVectorInFiles(); })); + } + ~ExperimentalWithRawCallbackMethod_SearchVectorInFiles() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchVectorInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* SearchVectorInFiles() { + return new ::grpc::internal::UnimplementedWriteReactor< + ::grpc::ByteBuffer, ::grpc::ByteBuffer>;} + }; + template + class ExperimentalWithRawCallbackMethod_DescribeTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithRawCallbackMethod_DescribeTable() { + ::grpc::Service::experimental().MarkMethodRawCallback(7, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this](::grpc::ServerContext* context, + const ::grpc::ByteBuffer* request, + ::grpc::ByteBuffer* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + this->DescribeTable(context, request, response, controller); + })); + } + ~ExperimentalWithRawCallbackMethod_DescribeTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DescribeTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void DescribeTable(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithRawCallbackMethod_GetTableRowCount : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithRawCallbackMethod_GetTableRowCount() { + ::grpc::Service::experimental().MarkMethodRawCallback(8, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this](::grpc::ServerContext* context, + const ::grpc::ByteBuffer* request, + ::grpc::ByteBuffer* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + this->GetTableRowCount(context, request, response, controller); + })); + } + ~ExperimentalWithRawCallbackMethod_GetTableRowCount() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetTableRowCount(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void GetTableRowCount(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithRawCallbackMethod_ShowTables : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithRawCallbackMethod_ShowTables() { + ::grpc::Service::experimental().MarkMethodRawCallback(9, + new ::grpc::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this] { return this->ShowTables(); })); + } + ~ExperimentalWithRawCallbackMethod_ShowTables() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::grpc::ServerWriter< ::milvus::grpc::TableName>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* ShowTables() { + return new ::grpc::internal::UnimplementedWriteReactor< + ::grpc::ByteBuffer, ::grpc::ByteBuffer>;} + }; + template + class ExperimentalWithRawCallbackMethod_Ping : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithRawCallbackMethod_Ping() { + ::grpc::Service::experimental().MarkMethodRawCallback(10, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this](::grpc::ServerContext* context, + const ::grpc::ByteBuffer* request, + ::grpc::ByteBuffer* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + this->Ping(context, request, response, controller); + })); + } + ~ExperimentalWithRawCallbackMethod_Ping() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Ping(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void Ping(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class WithStreamedUnaryMethod_CreateTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_CreateTable() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::TableSchema, ::milvus::Status>(std::bind(&WithStreamedUnaryMethod_CreateTable::StreamedCreateTable, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_CreateTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedCreateTable(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::TableSchema,::milvus::Status>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_HasTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_HasTable() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::BoolReply>(std::bind(&WithStreamedUnaryMethod_HasTable::StreamedHasTable, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_HasTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status HasTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedHasTable(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::TableName,::milvus::grpc::BoolReply>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_DropTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_DropTable() { + ::grpc::Service::MarkMethodStreamed(2, + new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::TableName, ::milvus::Status>(std::bind(&WithStreamedUnaryMethod_DropTable::StreamedDropTable, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_DropTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedDropTable(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::TableName,::milvus::Status>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_BuildIndex : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_BuildIndex() { + ::grpc::Service::MarkMethodStreamed(3, + new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::TableName, ::milvus::Status>(std::bind(&WithStreamedUnaryMethod_BuildIndex::StreamedBuildIndex, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_BuildIndex() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedBuildIndex(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::TableName,::milvus::Status>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_InsertVector : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_InsertVector() { + ::grpc::Service::MarkMethodStreamed(4, + new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::InsertInfos, ::milvus::grpc::VectorIds>(std::bind(&WithStreamedUnaryMethod_InsertVector::StreamedInsertVector, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_InsertVector() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status InsertVector(::grpc::ServerContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedInsertVector(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::InsertInfos,::milvus::grpc::VectorIds>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_DescribeTable : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_DescribeTable() { + ::grpc::Service::MarkMethodStreamed(7, + new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::TableSchema>(std::bind(&WithStreamedUnaryMethod_DescribeTable::StreamedDescribeTable, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_DescribeTable() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status DescribeTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedDescribeTable(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::TableName,::milvus::grpc::TableSchema>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_GetTableRowCount : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_GetTableRowCount() { + ::grpc::Service::MarkMethodStreamed(8, + new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::TableRowCount>(std::bind(&WithStreamedUnaryMethod_GetTableRowCount::StreamedGetTableRowCount, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_GetTableRowCount() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status GetTableRowCount(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGetTableRowCount(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::TableName,::milvus::grpc::TableRowCount>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_Ping : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_Ping() { + ::grpc::Service::MarkMethodStreamed(10, + new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::Command, ::milvus::grpc::ServerStatus>(std::bind(&WithStreamedUnaryMethod_Ping::StreamedPing, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_Ping() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Ping(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedPing(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::Command,::milvus::grpc::ServerStatus>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_CreateTable > > > > > > > StreamedUnaryService; + template + class WithSplitStreamingMethod_SearchVector : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithSplitStreamingMethod_SearchVector() { + ::grpc::Service::MarkMethodStreamed(5, + new ::grpc::internal::SplitServerStreamingHandler< ::milvus::grpc::SearchVectorInfos, ::milvus::grpc::TopKQueryResult>(std::bind(&WithSplitStreamingMethod_SearchVector::StreamedSearchVector, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithSplitStreamingMethod_SearchVector() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status SearchVector(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with split streamed + virtual ::grpc::Status StreamedSearchVector(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::milvus::grpc::SearchVectorInfos,::milvus::grpc::TopKQueryResult>* server_split_streamer) = 0; + }; + template + class WithSplitStreamingMethod_SearchVectorInFiles : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithSplitStreamingMethod_SearchVectorInFiles() { + ::grpc::Service::MarkMethodStreamed(6, + new ::grpc::internal::SplitServerStreamingHandler< ::milvus::grpc::SearchVectorInFilesInfos, ::milvus::grpc::TopKQueryResult>(std::bind(&WithSplitStreamingMethod_SearchVectorInFiles::StreamedSearchVectorInFiles, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithSplitStreamingMethod_SearchVectorInFiles() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status SearchVectorInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::ServerWriter< ::milvus::grpc::TopKQueryResult>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with split streamed + virtual ::grpc::Status StreamedSearchVectorInFiles(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::milvus::grpc::SearchVectorInFilesInfos,::milvus::grpc::TopKQueryResult>* server_split_streamer) = 0; + }; + template + class WithSplitStreamingMethod_ShowTables : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithSplitStreamingMethod_ShowTables() { + ::grpc::Service::MarkMethodStreamed(9, + new ::grpc::internal::SplitServerStreamingHandler< ::milvus::grpc::Command, ::milvus::grpc::TableName>(std::bind(&WithSplitStreamingMethod_ShowTables::StreamedShowTables, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithSplitStreamingMethod_ShowTables() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::grpc::ServerWriter< ::milvus::grpc::TableName>* writer) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with split streamed + virtual ::grpc::Status StreamedShowTables(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::milvus::grpc::Command,::milvus::grpc::TableName>* server_split_streamer) = 0; + }; + typedef WithSplitStreamingMethod_SearchVector > > SplitStreamedService; + typedef WithStreamedUnaryMethod_CreateTable > > > > > > > > > > StreamedService; +}; + +} // namespace grpc +} // namespace milvus + + +#endif // GRPC_milvus_2eproto__INCLUDED diff --git a/cpp/src/grpc/gen-milvus/milvus.pb.cc b/cpp/src/grpc/gen-milvus/milvus.pb.cc new file mode 100644 index 0000000000..925105ac60 --- /dev/null +++ b/cpp/src/grpc/gen-milvus/milvus.pb.cc @@ -0,0 +1,5987 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: milvus.proto + +#include "milvus.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_QueryResult_milvus_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Range_milvus_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_RowRecord_milvus_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TableName_milvus_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_SearchVectorInfos_milvus_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_status_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Status_status_2eproto; +namespace milvus { +namespace grpc { +class TableNameDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _TableName_default_instance_; +class TableSchemaDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _TableSchema_default_instance_; +class RangeDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _Range_default_instance_; +class RowRecordDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _RowRecord_default_instance_; +class InsertInfosDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _InsertInfos_default_instance_; +class VectorIdsDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _VectorIds_default_instance_; +class SearchVectorInfosDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _SearchVectorInfos_default_instance_; +class SearchVectorInFilesInfosDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _SearchVectorInFilesInfos_default_instance_; +class QueryResultDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _QueryResult_default_instance_; +class TopKQueryResultDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _TopKQueryResult_default_instance_; +class StringReplyDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _StringReply_default_instance_; +class BoolReplyDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _BoolReply_default_instance_; +class TableRowCountDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _TableRowCount_default_instance_; +class CommandDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _Command_default_instance_; +class ServerStatusDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _ServerStatus_default_instance_; +} // namespace grpc +} // namespace milvus +static void InitDefaultsTableName_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_TableName_default_instance_; + new (ptr) ::milvus::grpc::TableName(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::TableName::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_TableName_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTableName_milvus_2eproto}, { + &scc_info_Status_status_2eproto.base,}}; + +static void InitDefaultsTableSchema_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_TableSchema_default_instance_; + new (ptr) ::milvus::grpc::TableSchema(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::TableSchema::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_TableSchema_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTableSchema_milvus_2eproto}, { + &scc_info_TableName_milvus_2eproto.base,}}; + +static void InitDefaultsRange_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_Range_default_instance_; + new (ptr) ::milvus::grpc::Range(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::Range::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_Range_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRange_milvus_2eproto}, {}}; + +static void InitDefaultsRowRecord_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_RowRecord_default_instance_; + new (ptr) ::milvus::grpc::RowRecord(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::RowRecord::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_RowRecord_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRowRecord_milvus_2eproto}, {}}; + +static void InitDefaultsInsertInfos_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_InsertInfos_default_instance_; + new (ptr) ::milvus::grpc::InsertInfos(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::InsertInfos::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_InsertInfos_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsInsertInfos_milvus_2eproto}, { + &scc_info_RowRecord_milvus_2eproto.base,}}; + +static void InitDefaultsVectorIds_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_VectorIds_default_instance_; + new (ptr) ::milvus::grpc::VectorIds(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::VectorIds::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_VectorIds_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsVectorIds_milvus_2eproto}, { + &scc_info_Status_status_2eproto.base,}}; + +static void InitDefaultsSearchVectorInfos_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_SearchVectorInfos_default_instance_; + new (ptr) ::milvus::grpc::SearchVectorInfos(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::SearchVectorInfos::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<2> scc_info_SearchVectorInfos_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsSearchVectorInfos_milvus_2eproto}, { + &scc_info_RowRecord_milvus_2eproto.base, + &scc_info_Range_milvus_2eproto.base,}}; + +static void InitDefaultsSearchVectorInFilesInfos_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_SearchVectorInFilesInfos_default_instance_; + new (ptr) ::milvus::grpc::SearchVectorInFilesInfos(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::SearchVectorInFilesInfos::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_SearchVectorInFilesInfos_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsSearchVectorInFilesInfos_milvus_2eproto}, { + &scc_info_SearchVectorInfos_milvus_2eproto.base,}}; + +static void InitDefaultsQueryResult_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_QueryResult_default_instance_; + new (ptr) ::milvus::grpc::QueryResult(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::QueryResult::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_QueryResult_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsQueryResult_milvus_2eproto}, {}}; + +static void InitDefaultsTopKQueryResult_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_TopKQueryResult_default_instance_; + new (ptr) ::milvus::grpc::TopKQueryResult(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::TopKQueryResult::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<2> scc_info_TopKQueryResult_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTopKQueryResult_milvus_2eproto}, { + &scc_info_Status_status_2eproto.base, + &scc_info_QueryResult_milvus_2eproto.base,}}; + +static void InitDefaultsStringReply_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_StringReply_default_instance_; + new (ptr) ::milvus::grpc::StringReply(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::StringReply::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_StringReply_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsStringReply_milvus_2eproto}, { + &scc_info_Status_status_2eproto.base,}}; + +static void InitDefaultsBoolReply_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_BoolReply_default_instance_; + new (ptr) ::milvus::grpc::BoolReply(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::BoolReply::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_BoolReply_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsBoolReply_milvus_2eproto}, { + &scc_info_Status_status_2eproto.base,}}; + +static void InitDefaultsTableRowCount_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_TableRowCount_default_instance_; + new (ptr) ::milvus::grpc::TableRowCount(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::TableRowCount::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_TableRowCount_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTableRowCount_milvus_2eproto}, { + &scc_info_Status_status_2eproto.base,}}; + +static void InitDefaultsCommand_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_Command_default_instance_; + new (ptr) ::milvus::grpc::Command(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::Command::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_Command_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCommand_milvus_2eproto}, {}}; + +static void InitDefaultsServerStatus_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_ServerStatus_default_instance_; + new (ptr) ::milvus::grpc::ServerStatus(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::ServerStatus::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_ServerStatus_milvus_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsServerStatus_milvus_2eproto}, { + &scc_info_Status_status_2eproto.base,}}; + +void InitDefaults_milvus_2eproto() { + ::google::protobuf::internal::InitSCC(&scc_info_TableName_milvus_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_TableSchema_milvus_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_Range_milvus_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_RowRecord_milvus_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_InsertInfos_milvus_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_VectorIds_milvus_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_SearchVectorInfos_milvus_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_SearchVectorInFilesInfos_milvus_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_QueryResult_milvus_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_TopKQueryResult_milvus_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_StringReply_milvus_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_BoolReply_milvus_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_TableRowCount_milvus_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_Command_milvus_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_ServerStatus_milvus_2eproto.base); +} + +::google::protobuf::Metadata file_level_metadata_milvus_2eproto[15]; +constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_milvus_2eproto = nullptr; +constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_milvus_2eproto = nullptr; + +const ::google::protobuf::uint32 TableStruct_milvus_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::TableName, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::TableName, status_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::TableName, table_name_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::TableSchema, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::TableSchema, table_name_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::TableSchema, index_type_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::TableSchema, dimension_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::TableSchema, store_raw_vector_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::Range, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::Range, start_value_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::Range, end_value_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::RowRecord, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::RowRecord, vector_data_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::InsertInfos, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::InsertInfos, table_name_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::InsertInfos, row_record_array_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::VectorIds, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::VectorIds, status_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::VectorIds, vector_id_array_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchVectorInfos, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchVectorInfos, table_name_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchVectorInfos, query_record_array_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchVectorInfos, query_range_array_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchVectorInfos, topk_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchVectorInFilesInfos, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchVectorInFilesInfos, file_id_array_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchVectorInFilesInfos, search_vector_infos_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::QueryResult, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::QueryResult, id_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::QueryResult, distance_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::TopKQueryResult, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::TopKQueryResult, status_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::TopKQueryResult, query_result_arrays_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::StringReply, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::StringReply, status_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::StringReply, string_reply_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::BoolReply, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::BoolReply, status_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::BoolReply, bool_reply_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::TableRowCount, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::TableRowCount, status_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::TableRowCount, table_row_count_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::Command, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::Command, cmd_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::ServerStatus, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::ServerStatus, status_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::ServerStatus, info_), +}; +static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::milvus::grpc::TableName)}, + { 7, -1, sizeof(::milvus::grpc::TableSchema)}, + { 16, -1, sizeof(::milvus::grpc::Range)}, + { 23, -1, sizeof(::milvus::grpc::RowRecord)}, + { 29, -1, sizeof(::milvus::grpc::InsertInfos)}, + { 36, -1, sizeof(::milvus::grpc::VectorIds)}, + { 43, -1, sizeof(::milvus::grpc::SearchVectorInfos)}, + { 52, -1, sizeof(::milvus::grpc::SearchVectorInFilesInfos)}, + { 59, -1, sizeof(::milvus::grpc::QueryResult)}, + { 66, -1, sizeof(::milvus::grpc::TopKQueryResult)}, + { 73, -1, sizeof(::milvus::grpc::StringReply)}, + { 80, -1, sizeof(::milvus::grpc::BoolReply)}, + { 87, -1, sizeof(::milvus::grpc::TableRowCount)}, + { 94, -1, sizeof(::milvus::grpc::Command)}, + { 100, -1, sizeof(::milvus::grpc::ServerStatus)}, +}; + +static ::google::protobuf::Message const * const file_default_instances[] = { + reinterpret_cast(&::milvus::grpc::_TableName_default_instance_), + reinterpret_cast(&::milvus::grpc::_TableSchema_default_instance_), + reinterpret_cast(&::milvus::grpc::_Range_default_instance_), + reinterpret_cast(&::milvus::grpc::_RowRecord_default_instance_), + reinterpret_cast(&::milvus::grpc::_InsertInfos_default_instance_), + reinterpret_cast(&::milvus::grpc::_VectorIds_default_instance_), + reinterpret_cast(&::milvus::grpc::_SearchVectorInfos_default_instance_), + reinterpret_cast(&::milvus::grpc::_SearchVectorInFilesInfos_default_instance_), + reinterpret_cast(&::milvus::grpc::_QueryResult_default_instance_), + reinterpret_cast(&::milvus::grpc::_TopKQueryResult_default_instance_), + reinterpret_cast(&::milvus::grpc::_StringReply_default_instance_), + reinterpret_cast(&::milvus::grpc::_BoolReply_default_instance_), + reinterpret_cast(&::milvus::grpc::_TableRowCount_default_instance_), + reinterpret_cast(&::milvus::grpc::_Command_default_instance_), + reinterpret_cast(&::milvus::grpc::_ServerStatus_default_instance_), +}; + +::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_milvus_2eproto = { + {}, AddDescriptors_milvus_2eproto, "milvus.proto", schemas, + file_default_instances, TableStruct_milvus_2eproto::offsets, + file_level_metadata_milvus_2eproto, 15, file_level_enum_descriptors_milvus_2eproto, file_level_service_descriptors_milvus_2eproto, +}; + +const char descriptor_table_protodef_milvus_2eproto[] = + "\n\014milvus.proto\022\013milvus.grpc\032\014status.prot" + "o\"\?\n\tTableName\022\036\n\006status\030\001 \001(\0132\016.milvus." + "Status\022\022\n\ntable_name\030\002 \001(\t\"z\n\013TableSchem" + "a\022*\n\ntable_name\030\001 \001(\0132\026.milvus.grpc.Tabl" + "eName\022\022\n\nindex_type\030\002 \001(\005\022\021\n\tdimension\030\003" + " \001(\003\022\030\n\020store_raw_vector\030\004 \001(\010\"/\n\005Range\022" + "\023\n\013start_value\030\001 \001(\t\022\021\n\tend_value\030\002 \001(\t\"" + " \n\tRowRecord\022\023\n\013vector_data\030\001 \003(\002\"S\n\013Ins" + "ertInfos\022\022\n\ntable_name\030\001 \001(\t\0220\n\020row_reco" + "rd_array\030\002 \003(\0132\026.milvus.grpc.RowRecord\"D" + "\n\tVectorIds\022\036\n\006status\030\001 \001(\0132\016.milvus.Sta" + "tus\022\027\n\017vector_id_array\030\002 \003(\003\"\230\001\n\021SearchV" + "ectorInfos\022\022\n\ntable_name\030\001 \001(\t\0222\n\022query_" + "record_array\030\002 \003(\0132\026.milvus.grpc.RowReco" + "rd\022-\n\021query_range_array\030\003 \003(\0132\022.milvus.g" + "rpc.Range\022\014\n\004topk\030\004 \001(\003\"n\n\030SearchVectorI" + "nFilesInfos\022\025\n\rfile_id_array\030\001 \003(\t\022;\n\023se" + "arch_vector_infos\030\002 \001(\0132\036.milvus.grpc.Se" + "archVectorInfos\"+\n\013QueryResult\022\n\n\002id\030\001 \001" + "(\003\022\020\n\010distance\030\002 \001(\001\"h\n\017TopKQueryResult\022" + "\036\n\006status\030\001 \001(\0132\016.milvus.Status\0225\n\023query" + "_result_arrays\030\002 \003(\0132\030.milvus.grpc.Query" + "Result\"C\n\013StringReply\022\036\n\006status\030\001 \001(\0132\016." + "milvus.Status\022\024\n\014string_reply\030\002 \001(\t\"\?\n\tB" + "oolReply\022\036\n\006status\030\001 \001(\0132\016.milvus.Status" + "\022\022\n\nbool_reply\030\002 \001(\010\"H\n\rTableRowCount\022\036\n" + "\006status\030\001 \001(\0132\016.milvus.Status\022\027\n\017table_r" + "ow_count\030\002 \001(\003\"\026\n\007Command\022\013\n\003cmd\030\001 \001(\t\"<" + "\n\014ServerStatus\022\036\n\006status\030\001 \001(\0132\016.milvus." + "Status\022\014\n\004info\030\002 \001(\t2\367\005\n\rMilvusService\0229" + "\n\013CreateTable\022\030.milvus.grpc.TableSchema\032" + "\016.milvus.Status\"\000\022<\n\010HasTable\022\026.milvus.g" + "rpc.TableName\032\026.milvus.grpc.BoolReply\"\000\022" + "5\n\tDropTable\022\026.milvus.grpc.TableName\032\016.m" + "ilvus.Status\"\000\0226\n\nBuildIndex\022\026.milvus.gr" + "pc.TableName\032\016.milvus.Status\"\000\022B\n\014Insert" + "Vector\022\030.milvus.grpc.InsertInfos\032\026.milvu" + "s.grpc.VectorIds\"\000\022P\n\014SearchVector\022\036.mil" + "vus.grpc.SearchVectorInfos\032\034.milvus.grpc" + ".TopKQueryResult\"\0000\001\022^\n\023SearchVectorInFi" + "les\022%.milvus.grpc.SearchVectorInFilesInf" + "os\032\034.milvus.grpc.TopKQueryResult\"\0000\001\022C\n\r" + "DescribeTable\022\026.milvus.grpc.TableName\032\030." + "milvus.grpc.TableSchema\"\000\022H\n\020GetTableRow" + "Count\022\026.milvus.grpc.TableName\032\032.milvus.g" + "rpc.TableRowCount\"\000\022>\n\nShowTables\022\024.milv" + "us.grpc.Command\032\026.milvus.grpc.TableName\"" + "\0000\001\0229\n\004Ping\022\024.milvus.grpc.Command\032\031.milv" + "us.grpc.ServerStatus\"\000b\006proto3" + ; +::google::protobuf::internal::DescriptorTable descriptor_table_milvus_2eproto = { + false, InitDefaults_milvus_2eproto, + descriptor_table_protodef_milvus_2eproto, + "milvus.proto", &assign_descriptors_table_milvus_2eproto, 1950, +}; + +void AddDescriptors_milvus_2eproto() { + static constexpr ::google::protobuf::internal::InitFunc deps[1] = + { + ::AddDescriptors_status_2eproto, + }; + ::google::protobuf::internal::AddDescriptors(&descriptor_table_milvus_2eproto, deps, 1); +} + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_milvus_2eproto = []() { AddDescriptors_milvus_2eproto(); return true; }(); +namespace milvus { +namespace grpc { + +// =================================================================== + +void TableName::InitAsDefaultInstance() { + ::milvus::grpc::_TableName_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::Status*>( + ::milvus::Status::internal_default_instance()); +} +class TableName::HasBitSetters { + public: + static const ::milvus::Status& status(const TableName* msg); +}; + +const ::milvus::Status& +TableName::HasBitSetters::status(const TableName* msg) { + return *msg->status_; +} +void TableName::clear_status() { + if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TableName::kStatusFieldNumber; +const int TableName::kTableNameFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TableName::TableName() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.TableName) +} +TableName::TableName(const TableName& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + table_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.table_name().size() > 0) { + table_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.table_name_); + } + if (from.has_status()) { + status_ = new ::milvus::Status(*from.status_); + } else { + status_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:milvus.grpc.TableName) +} + +void TableName::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_TableName_milvus_2eproto.base); + table_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + status_ = nullptr; +} + +TableName::~TableName() { + // @@protoc_insertion_point(destructor:milvus.grpc.TableName) + SharedDtor(); +} + +void TableName::SharedDtor() { + table_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete status_; +} + +void TableName::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const TableName& TableName::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_TableName_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void TableName::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.TableName) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + table_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* TableName::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // .milvus.Status status = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::milvus::Status::_InternalParse; + object = msg->mutable_status(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + // string table_name = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("milvus.grpc.TableName.table_name"); + object = msg->mutable_table_name(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool TableName::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.TableName) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // .milvus.Status status = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_status())); + } else { + goto handle_unusual; + } + break; + } + + // string table_name = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_table_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->table_name().data(), static_cast(this->table_name().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "milvus.grpc.TableName.table_name")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.TableName) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.TableName) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void TableName::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.TableName) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, HasBitSetters::status(this), output); + } + + // string table_name = 2; + if (this->table_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->table_name().data(), static_cast(this->table_name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.TableName.table_name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->table_name(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.TableName) +} + +::google::protobuf::uint8* TableName::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.TableName) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, HasBitSetters::status(this), target); + } + + // string table_name = 2; + if (this->table_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->table_name().data(), static_cast(this->table_name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.TableName.table_name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->table_name(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.TableName) + return target; +} + +size_t TableName::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.TableName) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string table_name = 2; + if (this->table_name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->table_name()); + } + + // .milvus.Status status = 1; + if (this->has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *status_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TableName::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.TableName) + GOOGLE_DCHECK_NE(&from, this); + const TableName* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.TableName) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.TableName) + MergeFrom(*source); + } +} + +void TableName::MergeFrom(const TableName& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.TableName) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.table_name().size() > 0) { + + table_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.table_name_); + } + if (from.has_status()) { + mutable_status()->::milvus::Status::MergeFrom(from.status()); + } +} + +void TableName::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.TableName) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TableName::CopyFrom(const TableName& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.TableName) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TableName::IsInitialized() const { + return true; +} + +void TableName::Swap(TableName* other) { + if (other == this) return; + InternalSwap(other); +} +void TableName::InternalSwap(TableName* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + table_name_.Swap(&other->table_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(status_, other->status_); +} + +::google::protobuf::Metadata TableName::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void TableSchema::InitAsDefaultInstance() { + ::milvus::grpc::_TableSchema_default_instance_._instance.get_mutable()->table_name_ = const_cast< ::milvus::grpc::TableName*>( + ::milvus::grpc::TableName::internal_default_instance()); +} +class TableSchema::HasBitSetters { + public: + static const ::milvus::grpc::TableName& table_name(const TableSchema* msg); +}; + +const ::milvus::grpc::TableName& +TableSchema::HasBitSetters::table_name(const TableSchema* msg) { + return *msg->table_name_; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TableSchema::kTableNameFieldNumber; +const int TableSchema::kIndexTypeFieldNumber; +const int TableSchema::kDimensionFieldNumber; +const int TableSchema::kStoreRawVectorFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TableSchema::TableSchema() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.TableSchema) +} +TableSchema::TableSchema(const TableSchema& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_table_name()) { + table_name_ = new ::milvus::grpc::TableName(*from.table_name_); + } else { + table_name_ = nullptr; + } + ::memcpy(&dimension_, &from.dimension_, + static_cast(reinterpret_cast(&store_raw_vector_) - + reinterpret_cast(&dimension_)) + sizeof(store_raw_vector_)); + // @@protoc_insertion_point(copy_constructor:milvus.grpc.TableSchema) +} + +void TableSchema::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_TableSchema_milvus_2eproto.base); + ::memset(&table_name_, 0, static_cast( + reinterpret_cast(&store_raw_vector_) - + reinterpret_cast(&table_name_)) + sizeof(store_raw_vector_)); +} + +TableSchema::~TableSchema() { + // @@protoc_insertion_point(destructor:milvus.grpc.TableSchema) + SharedDtor(); +} + +void TableSchema::SharedDtor() { + if (this != internal_default_instance()) delete table_name_; +} + +void TableSchema::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const TableSchema& TableSchema::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_TableSchema_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void TableSchema::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.TableSchema) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaNoVirtual() == nullptr && table_name_ != nullptr) { + delete table_name_; + } + table_name_ = nullptr; + ::memset(&dimension_, 0, static_cast( + reinterpret_cast(&store_raw_vector_) - + reinterpret_cast(&dimension_)) + sizeof(store_raw_vector_)); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* TableSchema::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // .milvus.grpc.TableName table_name = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::milvus::grpc::TableName::_InternalParse; + object = msg->mutable_table_name(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + // int32 index_type = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; + msg->set_index_type(::google::protobuf::internal::ReadVarint(&ptr)); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + break; + } + // int64 dimension = 3; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; + msg->set_dimension(::google::protobuf::internal::ReadVarint(&ptr)); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + break; + } + // bool store_raw_vector = 4; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; + msg->set_store_raw_vector(::google::protobuf::internal::ReadVarint(&ptr)); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool TableSchema::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.TableSchema) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // .milvus.grpc.TableName table_name = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_table_name())); + } else { + goto handle_unusual; + } + break; + } + + // int32 index_type = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &index_type_))); + } else { + goto handle_unusual; + } + break; + } + + // int64 dimension = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &dimension_))); + } else { + goto handle_unusual; + } + break; + } + + // bool store_raw_vector = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &store_raw_vector_))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.TableSchema) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.TableSchema) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void TableSchema::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.TableSchema) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.grpc.TableName table_name = 1; + if (this->has_table_name()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, HasBitSetters::table_name(this), output); + } + + // int32 index_type = 2; + if (this->index_type() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->index_type(), output); + } + + // int64 dimension = 3; + if (this->dimension() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->dimension(), output); + } + + // bool store_raw_vector = 4; + if (this->store_raw_vector() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->store_raw_vector(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.TableSchema) +} + +::google::protobuf::uint8* TableSchema::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.TableSchema) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.grpc.TableName table_name = 1; + if (this->has_table_name()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, HasBitSetters::table_name(this), target); + } + + // int32 index_type = 2; + if (this->index_type() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->index_type(), target); + } + + // int64 dimension = 3; + if (this->dimension() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->dimension(), target); + } + + // bool store_raw_vector = 4; + if (this->store_raw_vector() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->store_raw_vector(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.TableSchema) + return target; +} + +size_t TableSchema::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.TableSchema) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .milvus.grpc.TableName table_name = 1; + if (this->has_table_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *table_name_); + } + + // int64 dimension = 3; + if (this->dimension() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->dimension()); + } + + // int32 index_type = 2; + if (this->index_type() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->index_type()); + } + + // bool store_raw_vector = 4; + if (this->store_raw_vector() != 0) { + total_size += 1 + 1; + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TableSchema::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.TableSchema) + GOOGLE_DCHECK_NE(&from, this); + const TableSchema* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.TableSchema) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.TableSchema) + MergeFrom(*source); + } +} + +void TableSchema::MergeFrom(const TableSchema& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.TableSchema) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.has_table_name()) { + mutable_table_name()->::milvus::grpc::TableName::MergeFrom(from.table_name()); + } + if (from.dimension() != 0) { + set_dimension(from.dimension()); + } + if (from.index_type() != 0) { + set_index_type(from.index_type()); + } + if (from.store_raw_vector() != 0) { + set_store_raw_vector(from.store_raw_vector()); + } +} + +void TableSchema::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.TableSchema) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TableSchema::CopyFrom(const TableSchema& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.TableSchema) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TableSchema::IsInitialized() const { + return true; +} + +void TableSchema::Swap(TableSchema* other) { + if (other == this) return; + InternalSwap(other); +} +void TableSchema::InternalSwap(TableSchema* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(table_name_, other->table_name_); + swap(dimension_, other->dimension_); + swap(index_type_, other->index_type_); + swap(store_raw_vector_, other->store_raw_vector_); +} + +::google::protobuf::Metadata TableSchema::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void Range::InitAsDefaultInstance() { +} +class Range::HasBitSetters { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int Range::kStartValueFieldNumber; +const int Range::kEndValueFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +Range::Range() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.Range) +} +Range::Range(const Range& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + start_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.start_value().size() > 0) { + start_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.start_value_); + } + end_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.end_value().size() > 0) { + end_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.end_value_); + } + // @@protoc_insertion_point(copy_constructor:milvus.grpc.Range) +} + +void Range::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_Range_milvus_2eproto.base); + start_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + end_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +Range::~Range() { + // @@protoc_insertion_point(destructor:milvus.grpc.Range) + SharedDtor(); +} + +void Range::SharedDtor() { + start_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + end_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void Range::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Range& Range::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_Range_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void Range::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.Range) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + start_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + end_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* Range::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // string start_value = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("milvus.grpc.Range.start_value"); + object = msg->mutable_start_value(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + // string end_value = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("milvus.grpc.Range.end_value"); + object = msg->mutable_end_value(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool Range::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.Range) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string start_value = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_start_value())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->start_value().data(), static_cast(this->start_value().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "milvus.grpc.Range.start_value")); + } else { + goto handle_unusual; + } + break; + } + + // string end_value = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_end_value())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->end_value().data(), static_cast(this->end_value().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "milvus.grpc.Range.end_value")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.Range) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.Range) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void Range::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.Range) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string start_value = 1; + if (this->start_value().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->start_value().data(), static_cast(this->start_value().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.Range.start_value"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->start_value(), output); + } + + // string end_value = 2; + if (this->end_value().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->end_value().data(), static_cast(this->end_value().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.Range.end_value"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->end_value(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.Range) +} + +::google::protobuf::uint8* Range::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.Range) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string start_value = 1; + if (this->start_value().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->start_value().data(), static_cast(this->start_value().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.Range.start_value"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->start_value(), target); + } + + // string end_value = 2; + if (this->end_value().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->end_value().data(), static_cast(this->end_value().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.Range.end_value"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->end_value(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.Range) + return target; +} + +size_t Range::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.Range) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string start_value = 1; + if (this->start_value().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->start_value()); + } + + // string end_value = 2; + if (this->end_value().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->end_value()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Range::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.Range) + GOOGLE_DCHECK_NE(&from, this); + const Range* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.Range) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.Range) + MergeFrom(*source); + } +} + +void Range::MergeFrom(const Range& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.Range) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.start_value().size() > 0) { + + start_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.start_value_); + } + if (from.end_value().size() > 0) { + + end_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.end_value_); + } +} + +void Range::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.Range) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Range::CopyFrom(const Range& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.Range) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Range::IsInitialized() const { + return true; +} + +void Range::Swap(Range* other) { + if (other == this) return; + InternalSwap(other); +} +void Range::InternalSwap(Range* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + start_value_.Swap(&other->start_value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + end_value_.Swap(&other->end_value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::google::protobuf::Metadata Range::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void RowRecord::InitAsDefaultInstance() { +} +class RowRecord::HasBitSetters { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int RowRecord::kVectorDataFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +RowRecord::RowRecord() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.RowRecord) +} +RowRecord::RowRecord(const RowRecord& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr), + vector_data_(from.vector_data_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:milvus.grpc.RowRecord) +} + +void RowRecord::SharedCtor() { +} + +RowRecord::~RowRecord() { + // @@protoc_insertion_point(destructor:milvus.grpc.RowRecord) + SharedDtor(); +} + +void RowRecord::SharedDtor() { +} + +void RowRecord::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const RowRecord& RowRecord::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_RowRecord_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void RowRecord::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.RowRecord) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + vector_data_.Clear(); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* RowRecord::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // repeated float vector_data = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) == 10) { + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::google::protobuf::internal::PackedFloatParser; + object = msg->mutable_vector_data(); + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + if (size) ptr = parser_till_end(ptr, newend, object, ctx); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend); + break; + } else if (static_cast<::google::protobuf::uint8>(tag) != 13) goto handle_unusual; + do { + msg->add_vector_data(::google::protobuf::io::UnalignedLoad(ptr)); + ptr += sizeof(float); + if (ptr >= end) break; + } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 13 && (ptr += 1)); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool RowRecord::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.RowRecord) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated float vector_data = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, this->mutable_vector_data()))); + } else if (static_cast< ::google::protobuf::uint8>(tag) == (13 & 0xFF)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + 1, 10u, input, this->mutable_vector_data()))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.RowRecord) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.RowRecord) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void RowRecord::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.RowRecord) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated float vector_data = 1; + if (this->vector_data_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_vector_data_cached_byte_size_.load( + std::memory_order_relaxed)); + ::google::protobuf::internal::WireFormatLite::WriteFloatArray( + this->vector_data().data(), this->vector_data_size(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.RowRecord) +} + +::google::protobuf::uint8* RowRecord::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.RowRecord) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated float vector_data = 1; + if (this->vector_data_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 1, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _vector_data_cached_byte_size_.load(std::memory_order_relaxed), + target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteFloatNoTagToArray(this->vector_data_, target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.RowRecord) + return target; +} + +size_t RowRecord::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.RowRecord) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated float vector_data = 1; + { + unsigned int count = static_cast(this->vector_data_size()); + size_t data_size = 4UL * count; + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + static_cast<::google::protobuf::int32>(data_size)); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + _vector_data_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void RowRecord::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.RowRecord) + GOOGLE_DCHECK_NE(&from, this); + const RowRecord* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.RowRecord) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.RowRecord) + MergeFrom(*source); + } +} + +void RowRecord::MergeFrom(const RowRecord& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.RowRecord) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + vector_data_.MergeFrom(from.vector_data_); +} + +void RowRecord::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.RowRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RowRecord::CopyFrom(const RowRecord& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.RowRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RowRecord::IsInitialized() const { + return true; +} + +void RowRecord::Swap(RowRecord* other) { + if (other == this) return; + InternalSwap(other); +} +void RowRecord::InternalSwap(RowRecord* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + vector_data_.InternalSwap(&other->vector_data_); +} + +::google::protobuf::Metadata RowRecord::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void InsertInfos::InitAsDefaultInstance() { +} +class InsertInfos::HasBitSetters { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int InsertInfos::kTableNameFieldNumber; +const int InsertInfos::kRowRecordArrayFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +InsertInfos::InsertInfos() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.InsertInfos) +} +InsertInfos::InsertInfos(const InsertInfos& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr), + row_record_array_(from.row_record_array_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + table_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.table_name().size() > 0) { + table_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.table_name_); + } + // @@protoc_insertion_point(copy_constructor:milvus.grpc.InsertInfos) +} + +void InsertInfos::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_InsertInfos_milvus_2eproto.base); + table_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +InsertInfos::~InsertInfos() { + // @@protoc_insertion_point(destructor:milvus.grpc.InsertInfos) + SharedDtor(); +} + +void InsertInfos::SharedDtor() { + table_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void InsertInfos::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const InsertInfos& InsertInfos::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_InsertInfos_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void InsertInfos::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.InsertInfos) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + row_record_array_.Clear(); + table_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* InsertInfos::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // string table_name = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("milvus.grpc.InsertInfos.table_name"); + object = msg->mutable_table_name(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + // repeated .milvus.grpc.RowRecord row_record_array = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + do { + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::milvus::grpc::RowRecord::_InternalParse; + object = msg->add_row_record_array(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + if (ptr >= end) break; + } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool InsertInfos::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.InsertInfos) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string table_name = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_table_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->table_name().data(), static_cast(this->table_name().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "milvus.grpc.InsertInfos.table_name")); + } else { + goto handle_unusual; + } + break; + } + + // repeated .milvus.grpc.RowRecord row_record_array = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_row_record_array())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.InsertInfos) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.InsertInfos) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void InsertInfos::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.InsertInfos) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string table_name = 1; + if (this->table_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->table_name().data(), static_cast(this->table_name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.InsertInfos.table_name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->table_name(), output); + } + + // repeated .milvus.grpc.RowRecord row_record_array = 2; + for (unsigned int i = 0, + n = static_cast(this->row_record_array_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, + this->row_record_array(static_cast(i)), + output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.InsertInfos) +} + +::google::protobuf::uint8* InsertInfos::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.InsertInfos) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string table_name = 1; + if (this->table_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->table_name().data(), static_cast(this->table_name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.InsertInfos.table_name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->table_name(), target); + } + + // repeated .milvus.grpc.RowRecord row_record_array = 2; + for (unsigned int i = 0, + n = static_cast(this->row_record_array_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, this->row_record_array(static_cast(i)), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.InsertInfos) + return target; +} + +size_t InsertInfos::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.InsertInfos) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .milvus.grpc.RowRecord row_record_array = 2; + { + unsigned int count = static_cast(this->row_record_array_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->row_record_array(static_cast(i))); + } + } + + // string table_name = 1; + if (this->table_name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->table_name()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void InsertInfos::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.InsertInfos) + GOOGLE_DCHECK_NE(&from, this); + const InsertInfos* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.InsertInfos) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.InsertInfos) + MergeFrom(*source); + } +} + +void InsertInfos::MergeFrom(const InsertInfos& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.InsertInfos) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + row_record_array_.MergeFrom(from.row_record_array_); + if (from.table_name().size() > 0) { + + table_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.table_name_); + } +} + +void InsertInfos::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.InsertInfos) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void InsertInfos::CopyFrom(const InsertInfos& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.InsertInfos) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool InsertInfos::IsInitialized() const { + return true; +} + +void InsertInfos::Swap(InsertInfos* other) { + if (other == this) return; + InternalSwap(other); +} +void InsertInfos::InternalSwap(InsertInfos* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + CastToBase(&row_record_array_)->InternalSwap(CastToBase(&other->row_record_array_)); + table_name_.Swap(&other->table_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::google::protobuf::Metadata InsertInfos::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void VectorIds::InitAsDefaultInstance() { + ::milvus::grpc::_VectorIds_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::Status*>( + ::milvus::Status::internal_default_instance()); +} +class VectorIds::HasBitSetters { + public: + static const ::milvus::Status& status(const VectorIds* msg); +}; + +const ::milvus::Status& +VectorIds::HasBitSetters::status(const VectorIds* msg) { + return *msg->status_; +} +void VectorIds::clear_status() { + if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int VectorIds::kStatusFieldNumber; +const int VectorIds::kVectorIdArrayFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +VectorIds::VectorIds() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.VectorIds) +} +VectorIds::VectorIds(const VectorIds& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr), + vector_id_array_(from.vector_id_array_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_status()) { + status_ = new ::milvus::Status(*from.status_); + } else { + status_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:milvus.grpc.VectorIds) +} + +void VectorIds::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_VectorIds_milvus_2eproto.base); + status_ = nullptr; +} + +VectorIds::~VectorIds() { + // @@protoc_insertion_point(destructor:milvus.grpc.VectorIds) + SharedDtor(); +} + +void VectorIds::SharedDtor() { + if (this != internal_default_instance()) delete status_; +} + +void VectorIds::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const VectorIds& VectorIds::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_VectorIds_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void VectorIds::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.VectorIds) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + vector_id_array_.Clear(); + if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* VectorIds::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // .milvus.Status status = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::milvus::Status::_InternalParse; + object = msg->mutable_status(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + // repeated int64 vector_id_array = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) == 18) { + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::google::protobuf::internal::PackedInt64Parser; + object = msg->mutable_vector_id_array(); + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + if (size) ptr = parser_till_end(ptr, newend, object, ctx); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend); + break; + } else if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; + do { + msg->add_vector_id_array(::google::protobuf::internal::ReadVarint(&ptr)); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + if (ptr >= end) break; + } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 16 && (ptr += 1)); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool VectorIds::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.VectorIds) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // .milvus.Status status = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_status())); + } else { + goto handle_unusual; + } + break; + } + + // repeated int64 vector_id_array = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, this->mutable_vector_id_array()))); + } else if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + 1, 18u, input, this->mutable_vector_id_array()))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.VectorIds) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.VectorIds) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void VectorIds::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.VectorIds) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, HasBitSetters::status(this), output); + } + + // repeated int64 vector_id_array = 2; + if (this->vector_id_array_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_vector_id_array_cached_byte_size_.load( + std::memory_order_relaxed)); + } + for (int i = 0, n = this->vector_id_array_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag( + this->vector_id_array(i), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.VectorIds) +} + +::google::protobuf::uint8* VectorIds::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.VectorIds) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, HasBitSetters::status(this), target); + } + + // repeated int64 vector_id_array = 2; + if (this->vector_id_array_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 2, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _vector_id_array_cached_byte_size_.load(std::memory_order_relaxed), + target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64NoTagToArray(this->vector_id_array_, target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.VectorIds) + return target; +} + +size_t VectorIds::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.VectorIds) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated int64 vector_id_array = 2; + { + size_t data_size = ::google::protobuf::internal::WireFormatLite:: + Int64Size(this->vector_id_array_); + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + static_cast<::google::protobuf::int32>(data_size)); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + _vector_id_array_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // .milvus.Status status = 1; + if (this->has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *status_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void VectorIds::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.VectorIds) + GOOGLE_DCHECK_NE(&from, this); + const VectorIds* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.VectorIds) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.VectorIds) + MergeFrom(*source); + } +} + +void VectorIds::MergeFrom(const VectorIds& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.VectorIds) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + vector_id_array_.MergeFrom(from.vector_id_array_); + if (from.has_status()) { + mutable_status()->::milvus::Status::MergeFrom(from.status()); + } +} + +void VectorIds::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.VectorIds) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void VectorIds::CopyFrom(const VectorIds& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.VectorIds) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool VectorIds::IsInitialized() const { + return true; +} + +void VectorIds::Swap(VectorIds* other) { + if (other == this) return; + InternalSwap(other); +} +void VectorIds::InternalSwap(VectorIds* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + vector_id_array_.InternalSwap(&other->vector_id_array_); + swap(status_, other->status_); +} + +::google::protobuf::Metadata VectorIds::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void SearchVectorInfos::InitAsDefaultInstance() { +} +class SearchVectorInfos::HasBitSetters { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int SearchVectorInfos::kTableNameFieldNumber; +const int SearchVectorInfos::kQueryRecordArrayFieldNumber; +const int SearchVectorInfos::kQueryRangeArrayFieldNumber; +const int SearchVectorInfos::kTopkFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +SearchVectorInfos::SearchVectorInfos() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.SearchVectorInfos) +} +SearchVectorInfos::SearchVectorInfos(const SearchVectorInfos& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr), + query_record_array_(from.query_record_array_), + query_range_array_(from.query_range_array_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + table_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.table_name().size() > 0) { + table_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.table_name_); + } + topk_ = from.topk_; + // @@protoc_insertion_point(copy_constructor:milvus.grpc.SearchVectorInfos) +} + +void SearchVectorInfos::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_SearchVectorInfos_milvus_2eproto.base); + table_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + topk_ = PROTOBUF_LONGLONG(0); +} + +SearchVectorInfos::~SearchVectorInfos() { + // @@protoc_insertion_point(destructor:milvus.grpc.SearchVectorInfos) + SharedDtor(); +} + +void SearchVectorInfos::SharedDtor() { + table_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void SearchVectorInfos::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const SearchVectorInfos& SearchVectorInfos::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_SearchVectorInfos_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void SearchVectorInfos::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.SearchVectorInfos) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + query_record_array_.Clear(); + query_range_array_.Clear(); + table_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + topk_ = PROTOBUF_LONGLONG(0); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* SearchVectorInfos::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // string table_name = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("milvus.grpc.SearchVectorInfos.table_name"); + object = msg->mutable_table_name(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + // repeated .milvus.grpc.RowRecord query_record_array = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + do { + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::milvus::grpc::RowRecord::_InternalParse; + object = msg->add_query_record_array(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + if (ptr >= end) break; + } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); + break; + } + // repeated .milvus.grpc.Range query_range_array = 3; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; + do { + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::milvus::grpc::Range::_InternalParse; + object = msg->add_query_range_array(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + if (ptr >= end) break; + } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 26 && (ptr += 1)); + break; + } + // int64 topk = 4; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; + msg->set_topk(::google::protobuf::internal::ReadVarint(&ptr)); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool SearchVectorInfos::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.SearchVectorInfos) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string table_name = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_table_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->table_name().data(), static_cast(this->table_name().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "milvus.grpc.SearchVectorInfos.table_name")); + } else { + goto handle_unusual; + } + break; + } + + // repeated .milvus.grpc.RowRecord query_record_array = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_query_record_array())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .milvus.grpc.Range query_range_array = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_query_range_array())); + } else { + goto handle_unusual; + } + break; + } + + // int64 topk = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &topk_))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.SearchVectorInfos) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.SearchVectorInfos) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void SearchVectorInfos::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.SearchVectorInfos) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string table_name = 1; + if (this->table_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->table_name().data(), static_cast(this->table_name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.SearchVectorInfos.table_name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->table_name(), output); + } + + // repeated .milvus.grpc.RowRecord query_record_array = 2; + for (unsigned int i = 0, + n = static_cast(this->query_record_array_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, + this->query_record_array(static_cast(i)), + output); + } + + // repeated .milvus.grpc.Range query_range_array = 3; + for (unsigned int i = 0, + n = static_cast(this->query_range_array_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, + this->query_range_array(static_cast(i)), + output); + } + + // int64 topk = 4; + if (this->topk() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->topk(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.SearchVectorInfos) +} + +::google::protobuf::uint8* SearchVectorInfos::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.SearchVectorInfos) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string table_name = 1; + if (this->table_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->table_name().data(), static_cast(this->table_name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.SearchVectorInfos.table_name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->table_name(), target); + } + + // repeated .milvus.grpc.RowRecord query_record_array = 2; + for (unsigned int i = 0, + n = static_cast(this->query_record_array_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, this->query_record_array(static_cast(i)), target); + } + + // repeated .milvus.grpc.Range query_range_array = 3; + for (unsigned int i = 0, + n = static_cast(this->query_range_array_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 3, this->query_range_array(static_cast(i)), target); + } + + // int64 topk = 4; + if (this->topk() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->topk(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.SearchVectorInfos) + return target; +} + +size_t SearchVectorInfos::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.SearchVectorInfos) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .milvus.grpc.RowRecord query_record_array = 2; + { + unsigned int count = static_cast(this->query_record_array_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->query_record_array(static_cast(i))); + } + } + + // repeated .milvus.grpc.Range query_range_array = 3; + { + unsigned int count = static_cast(this->query_range_array_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->query_range_array(static_cast(i))); + } + } + + // string table_name = 1; + if (this->table_name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->table_name()); + } + + // int64 topk = 4; + if (this->topk() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->topk()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void SearchVectorInfos::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.SearchVectorInfos) + GOOGLE_DCHECK_NE(&from, this); + const SearchVectorInfos* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.SearchVectorInfos) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.SearchVectorInfos) + MergeFrom(*source); + } +} + +void SearchVectorInfos::MergeFrom(const SearchVectorInfos& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.SearchVectorInfos) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + query_record_array_.MergeFrom(from.query_record_array_); + query_range_array_.MergeFrom(from.query_range_array_); + if (from.table_name().size() > 0) { + + table_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.table_name_); + } + if (from.topk() != 0) { + set_topk(from.topk()); + } +} + +void SearchVectorInfos::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.SearchVectorInfos) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void SearchVectorInfos::CopyFrom(const SearchVectorInfos& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.SearchVectorInfos) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SearchVectorInfos::IsInitialized() const { + return true; +} + +void SearchVectorInfos::Swap(SearchVectorInfos* other) { + if (other == this) return; + InternalSwap(other); +} +void SearchVectorInfos::InternalSwap(SearchVectorInfos* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + CastToBase(&query_record_array_)->InternalSwap(CastToBase(&other->query_record_array_)); + CastToBase(&query_range_array_)->InternalSwap(CastToBase(&other->query_range_array_)); + table_name_.Swap(&other->table_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(topk_, other->topk_); +} + +::google::protobuf::Metadata SearchVectorInfos::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void SearchVectorInFilesInfos::InitAsDefaultInstance() { + ::milvus::grpc::_SearchVectorInFilesInfos_default_instance_._instance.get_mutable()->search_vector_infos_ = const_cast< ::milvus::grpc::SearchVectorInfos*>( + ::milvus::grpc::SearchVectorInfos::internal_default_instance()); +} +class SearchVectorInFilesInfos::HasBitSetters { + public: + static const ::milvus::grpc::SearchVectorInfos& search_vector_infos(const SearchVectorInFilesInfos* msg); +}; + +const ::milvus::grpc::SearchVectorInfos& +SearchVectorInFilesInfos::HasBitSetters::search_vector_infos(const SearchVectorInFilesInfos* msg) { + return *msg->search_vector_infos_; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int SearchVectorInFilesInfos::kFileIdArrayFieldNumber; +const int SearchVectorInFilesInfos::kSearchVectorInfosFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +SearchVectorInFilesInfos::SearchVectorInFilesInfos() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.SearchVectorInFilesInfos) +} +SearchVectorInFilesInfos::SearchVectorInFilesInfos(const SearchVectorInFilesInfos& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr), + file_id_array_(from.file_id_array_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_search_vector_infos()) { + search_vector_infos_ = new ::milvus::grpc::SearchVectorInfos(*from.search_vector_infos_); + } else { + search_vector_infos_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:milvus.grpc.SearchVectorInFilesInfos) +} + +void SearchVectorInFilesInfos::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_SearchVectorInFilesInfos_milvus_2eproto.base); + search_vector_infos_ = nullptr; +} + +SearchVectorInFilesInfos::~SearchVectorInFilesInfos() { + // @@protoc_insertion_point(destructor:milvus.grpc.SearchVectorInFilesInfos) + SharedDtor(); +} + +void SearchVectorInFilesInfos::SharedDtor() { + if (this != internal_default_instance()) delete search_vector_infos_; +} + +void SearchVectorInFilesInfos::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const SearchVectorInFilesInfos& SearchVectorInFilesInfos::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_SearchVectorInFilesInfos_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void SearchVectorInFilesInfos::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.SearchVectorInFilesInfos) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + file_id_array_.Clear(); + if (GetArenaNoVirtual() == nullptr && search_vector_infos_ != nullptr) { + delete search_vector_infos_; + } + search_vector_infos_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* SearchVectorInFilesInfos::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // repeated string file_id_array = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + do { + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("milvus.grpc.SearchVectorInFilesInfos.file_id_array"); + object = msg->add_file_id_array(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + if (ptr >= end) break; + } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); + break; + } + // .milvus.grpc.SearchVectorInfos search_vector_infos = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::milvus::grpc::SearchVectorInfos::_InternalParse; + object = msg->mutable_search_vector_infos(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool SearchVectorInFilesInfos::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.SearchVectorInFilesInfos) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated string file_id_array = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_file_id_array())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_id_array(this->file_id_array_size() - 1).data(), + static_cast(this->file_id_array(this->file_id_array_size() - 1).length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "milvus.grpc.SearchVectorInFilesInfos.file_id_array")); + } else { + goto handle_unusual; + } + break; + } + + // .milvus.grpc.SearchVectorInfos search_vector_infos = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_search_vector_infos())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.SearchVectorInFilesInfos) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.SearchVectorInFilesInfos) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void SearchVectorInFilesInfos::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.SearchVectorInFilesInfos) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated string file_id_array = 1; + for (int i = 0, n = this->file_id_array_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_id_array(i).data(), static_cast(this->file_id_array(i).length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.SearchVectorInFilesInfos.file_id_array"); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->file_id_array(i), output); + } + + // .milvus.grpc.SearchVectorInfos search_vector_infos = 2; + if (this->has_search_vector_infos()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, HasBitSetters::search_vector_infos(this), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.SearchVectorInFilesInfos) +} + +::google::protobuf::uint8* SearchVectorInFilesInfos::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.SearchVectorInFilesInfos) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated string file_id_array = 1; + for (int i = 0, n = this->file_id_array_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_id_array(i).data(), static_cast(this->file_id_array(i).length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.SearchVectorInFilesInfos.file_id_array"); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(1, this->file_id_array(i), target); + } + + // .milvus.grpc.SearchVectorInfos search_vector_infos = 2; + if (this->has_search_vector_infos()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, HasBitSetters::search_vector_infos(this), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.SearchVectorInFilesInfos) + return target; +} + +size_t SearchVectorInFilesInfos::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.SearchVectorInFilesInfos) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string file_id_array = 1; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->file_id_array_size()); + for (int i = 0, n = this->file_id_array_size(); i < n; i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->file_id_array(i)); + } + + // .milvus.grpc.SearchVectorInfos search_vector_infos = 2; + if (this->has_search_vector_infos()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *search_vector_infos_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void SearchVectorInFilesInfos::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.SearchVectorInFilesInfos) + GOOGLE_DCHECK_NE(&from, this); + const SearchVectorInFilesInfos* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.SearchVectorInFilesInfos) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.SearchVectorInFilesInfos) + MergeFrom(*source); + } +} + +void SearchVectorInFilesInfos::MergeFrom(const SearchVectorInFilesInfos& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.SearchVectorInFilesInfos) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + file_id_array_.MergeFrom(from.file_id_array_); + if (from.has_search_vector_infos()) { + mutable_search_vector_infos()->::milvus::grpc::SearchVectorInfos::MergeFrom(from.search_vector_infos()); + } +} + +void SearchVectorInFilesInfos::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.SearchVectorInFilesInfos) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void SearchVectorInFilesInfos::CopyFrom(const SearchVectorInFilesInfos& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.SearchVectorInFilesInfos) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SearchVectorInFilesInfos::IsInitialized() const { + return true; +} + +void SearchVectorInFilesInfos::Swap(SearchVectorInFilesInfos* other) { + if (other == this) return; + InternalSwap(other); +} +void SearchVectorInFilesInfos::InternalSwap(SearchVectorInFilesInfos* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + file_id_array_.InternalSwap(CastToBase(&other->file_id_array_)); + swap(search_vector_infos_, other->search_vector_infos_); +} + +::google::protobuf::Metadata SearchVectorInFilesInfos::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void QueryResult::InitAsDefaultInstance() { +} +class QueryResult::HasBitSetters { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int QueryResult::kIdFieldNumber; +const int QueryResult::kDistanceFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +QueryResult::QueryResult() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.QueryResult) +} +QueryResult::QueryResult(const QueryResult& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&id_, &from.id_, + static_cast(reinterpret_cast(&distance_) - + reinterpret_cast(&id_)) + sizeof(distance_)); + // @@protoc_insertion_point(copy_constructor:milvus.grpc.QueryResult) +} + +void QueryResult::SharedCtor() { + ::memset(&id_, 0, static_cast( + reinterpret_cast(&distance_) - + reinterpret_cast(&id_)) + sizeof(distance_)); +} + +QueryResult::~QueryResult() { + // @@protoc_insertion_point(destructor:milvus.grpc.QueryResult) + SharedDtor(); +} + +void QueryResult::SharedDtor() { +} + +void QueryResult::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const QueryResult& QueryResult::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_QueryResult_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void QueryResult::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.QueryResult) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&id_, 0, static_cast( + reinterpret_cast(&distance_) - + reinterpret_cast(&id_)) + sizeof(distance_)); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* QueryResult::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // int64 id = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; + msg->set_id(::google::protobuf::internal::ReadVarint(&ptr)); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + break; + } + // double distance = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 17) goto handle_unusual; + msg->set_distance(::google::protobuf::io::UnalignedLoad(ptr)); + ptr += sizeof(double); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool QueryResult::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.QueryResult) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // int64 id = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &id_))); + } else { + goto handle_unusual; + } + break; + } + + // double distance = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (17 & 0xFF)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + input, &distance_))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.QueryResult) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.QueryResult) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void QueryResult::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.QueryResult) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int64 id = 1; + if (this->id() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->id(), output); + } + + // double distance = 2; + if (this->distance() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->distance(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.QueryResult) +} + +::google::protobuf::uint8* QueryResult::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.QueryResult) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int64 id = 1; + if (this->id() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->id(), target); + } + + // double distance = 2; + if (this->distance() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->distance(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.QueryResult) + return target; +} + +size_t QueryResult::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.QueryResult) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // int64 id = 1; + if (this->id() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->id()); + } + + // double distance = 2; + if (this->distance() != 0) { + total_size += 1 + 8; + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void QueryResult::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.QueryResult) + GOOGLE_DCHECK_NE(&from, this); + const QueryResult* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.QueryResult) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.QueryResult) + MergeFrom(*source); + } +} + +void QueryResult::MergeFrom(const QueryResult& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.QueryResult) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.id() != 0) { + set_id(from.id()); + } + if (from.distance() != 0) { + set_distance(from.distance()); + } +} + +void QueryResult::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.QueryResult) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void QueryResult::CopyFrom(const QueryResult& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.QueryResult) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool QueryResult::IsInitialized() const { + return true; +} + +void QueryResult::Swap(QueryResult* other) { + if (other == this) return; + InternalSwap(other); +} +void QueryResult::InternalSwap(QueryResult* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(id_, other->id_); + swap(distance_, other->distance_); +} + +::google::protobuf::Metadata QueryResult::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void TopKQueryResult::InitAsDefaultInstance() { + ::milvus::grpc::_TopKQueryResult_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::Status*>( + ::milvus::Status::internal_default_instance()); +} +class TopKQueryResult::HasBitSetters { + public: + static const ::milvus::Status& status(const TopKQueryResult* msg); +}; + +const ::milvus::Status& +TopKQueryResult::HasBitSetters::status(const TopKQueryResult* msg) { + return *msg->status_; +} +void TopKQueryResult::clear_status() { + if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TopKQueryResult::kStatusFieldNumber; +const int TopKQueryResult::kQueryResultArraysFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TopKQueryResult::TopKQueryResult() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.TopKQueryResult) +} +TopKQueryResult::TopKQueryResult(const TopKQueryResult& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr), + query_result_arrays_(from.query_result_arrays_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_status()) { + status_ = new ::milvus::Status(*from.status_); + } else { + status_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:milvus.grpc.TopKQueryResult) +} + +void TopKQueryResult::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_TopKQueryResult_milvus_2eproto.base); + status_ = nullptr; +} + +TopKQueryResult::~TopKQueryResult() { + // @@protoc_insertion_point(destructor:milvus.grpc.TopKQueryResult) + SharedDtor(); +} + +void TopKQueryResult::SharedDtor() { + if (this != internal_default_instance()) delete status_; +} + +void TopKQueryResult::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const TopKQueryResult& TopKQueryResult::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_TopKQueryResult_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void TopKQueryResult::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.TopKQueryResult) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + query_result_arrays_.Clear(); + if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* TopKQueryResult::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // .milvus.Status status = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::milvus::Status::_InternalParse; + object = msg->mutable_status(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + // repeated .milvus.grpc.QueryResult query_result_arrays = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + do { + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::milvus::grpc::QueryResult::_InternalParse; + object = msg->add_query_result_arrays(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + if (ptr >= end) break; + } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool TopKQueryResult::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.TopKQueryResult) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // .milvus.Status status = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_status())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .milvus.grpc.QueryResult query_result_arrays = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_query_result_arrays())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.TopKQueryResult) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.TopKQueryResult) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void TopKQueryResult::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.TopKQueryResult) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, HasBitSetters::status(this), output); + } + + // repeated .milvus.grpc.QueryResult query_result_arrays = 2; + for (unsigned int i = 0, + n = static_cast(this->query_result_arrays_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, + this->query_result_arrays(static_cast(i)), + output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.TopKQueryResult) +} + +::google::protobuf::uint8* TopKQueryResult::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.TopKQueryResult) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, HasBitSetters::status(this), target); + } + + // repeated .milvus.grpc.QueryResult query_result_arrays = 2; + for (unsigned int i = 0, + n = static_cast(this->query_result_arrays_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, this->query_result_arrays(static_cast(i)), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.TopKQueryResult) + return target; +} + +size_t TopKQueryResult::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.TopKQueryResult) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .milvus.grpc.QueryResult query_result_arrays = 2; + { + unsigned int count = static_cast(this->query_result_arrays_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->query_result_arrays(static_cast(i))); + } + } + + // .milvus.Status status = 1; + if (this->has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *status_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TopKQueryResult::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.TopKQueryResult) + GOOGLE_DCHECK_NE(&from, this); + const TopKQueryResult* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.TopKQueryResult) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.TopKQueryResult) + MergeFrom(*source); + } +} + +void TopKQueryResult::MergeFrom(const TopKQueryResult& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.TopKQueryResult) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + query_result_arrays_.MergeFrom(from.query_result_arrays_); + if (from.has_status()) { + mutable_status()->::milvus::Status::MergeFrom(from.status()); + } +} + +void TopKQueryResult::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.TopKQueryResult) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TopKQueryResult::CopyFrom(const TopKQueryResult& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.TopKQueryResult) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TopKQueryResult::IsInitialized() const { + return true; +} + +void TopKQueryResult::Swap(TopKQueryResult* other) { + if (other == this) return; + InternalSwap(other); +} +void TopKQueryResult::InternalSwap(TopKQueryResult* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + CastToBase(&query_result_arrays_)->InternalSwap(CastToBase(&other->query_result_arrays_)); + swap(status_, other->status_); +} + +::google::protobuf::Metadata TopKQueryResult::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void StringReply::InitAsDefaultInstance() { + ::milvus::grpc::_StringReply_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::Status*>( + ::milvus::Status::internal_default_instance()); +} +class StringReply::HasBitSetters { + public: + static const ::milvus::Status& status(const StringReply* msg); +}; + +const ::milvus::Status& +StringReply::HasBitSetters::status(const StringReply* msg) { + return *msg->status_; +} +void StringReply::clear_status() { + if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int StringReply::kStatusFieldNumber; +const int StringReply::kStringReplyFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +StringReply::StringReply() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.StringReply) +} +StringReply::StringReply(const StringReply& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + string_reply_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.string_reply().size() > 0) { + string_reply_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string_reply_); + } + if (from.has_status()) { + status_ = new ::milvus::Status(*from.status_); + } else { + status_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:milvus.grpc.StringReply) +} + +void StringReply::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_StringReply_milvus_2eproto.base); + string_reply_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + status_ = nullptr; +} + +StringReply::~StringReply() { + // @@protoc_insertion_point(destructor:milvus.grpc.StringReply) + SharedDtor(); +} + +void StringReply::SharedDtor() { + string_reply_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete status_; +} + +void StringReply::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const StringReply& StringReply::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_StringReply_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void StringReply::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.StringReply) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + string_reply_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* StringReply::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // .milvus.Status status = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::milvus::Status::_InternalParse; + object = msg->mutable_status(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + // string string_reply = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("milvus.grpc.StringReply.string_reply"); + object = msg->mutable_string_reply(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool StringReply::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.StringReply) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // .milvus.Status status = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_status())); + } else { + goto handle_unusual; + } + break; + } + + // string string_reply = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_string_reply())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->string_reply().data(), static_cast(this->string_reply().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "milvus.grpc.StringReply.string_reply")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.StringReply) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.StringReply) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void StringReply::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.StringReply) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, HasBitSetters::status(this), output); + } + + // string string_reply = 2; + if (this->string_reply().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->string_reply().data(), static_cast(this->string_reply().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.StringReply.string_reply"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->string_reply(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.StringReply) +} + +::google::protobuf::uint8* StringReply::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.StringReply) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, HasBitSetters::status(this), target); + } + + // string string_reply = 2; + if (this->string_reply().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->string_reply().data(), static_cast(this->string_reply().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.StringReply.string_reply"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->string_reply(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.StringReply) + return target; +} + +size_t StringReply::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.StringReply) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string string_reply = 2; + if (this->string_reply().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->string_reply()); + } + + // .milvus.Status status = 1; + if (this->has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *status_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void StringReply::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.StringReply) + GOOGLE_DCHECK_NE(&from, this); + const StringReply* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.StringReply) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.StringReply) + MergeFrom(*source); + } +} + +void StringReply::MergeFrom(const StringReply& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.StringReply) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.string_reply().size() > 0) { + + string_reply_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string_reply_); + } + if (from.has_status()) { + mutable_status()->::milvus::Status::MergeFrom(from.status()); + } +} + +void StringReply::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.StringReply) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void StringReply::CopyFrom(const StringReply& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.StringReply) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool StringReply::IsInitialized() const { + return true; +} + +void StringReply::Swap(StringReply* other) { + if (other == this) return; + InternalSwap(other); +} +void StringReply::InternalSwap(StringReply* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + string_reply_.Swap(&other->string_reply_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(status_, other->status_); +} + +::google::protobuf::Metadata StringReply::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void BoolReply::InitAsDefaultInstance() { + ::milvus::grpc::_BoolReply_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::Status*>( + ::milvus::Status::internal_default_instance()); +} +class BoolReply::HasBitSetters { + public: + static const ::milvus::Status& status(const BoolReply* msg); +}; + +const ::milvus::Status& +BoolReply::HasBitSetters::status(const BoolReply* msg) { + return *msg->status_; +} +void BoolReply::clear_status() { + if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int BoolReply::kStatusFieldNumber; +const int BoolReply::kBoolReplyFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +BoolReply::BoolReply() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.BoolReply) +} +BoolReply::BoolReply(const BoolReply& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_status()) { + status_ = new ::milvus::Status(*from.status_); + } else { + status_ = nullptr; + } + bool_reply_ = from.bool_reply_; + // @@protoc_insertion_point(copy_constructor:milvus.grpc.BoolReply) +} + +void BoolReply::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_BoolReply_milvus_2eproto.base); + ::memset(&status_, 0, static_cast( + reinterpret_cast(&bool_reply_) - + reinterpret_cast(&status_)) + sizeof(bool_reply_)); +} + +BoolReply::~BoolReply() { + // @@protoc_insertion_point(destructor:milvus.grpc.BoolReply) + SharedDtor(); +} + +void BoolReply::SharedDtor() { + if (this != internal_default_instance()) delete status_; +} + +void BoolReply::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const BoolReply& BoolReply::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_BoolReply_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void BoolReply::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.BoolReply) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; + bool_reply_ = false; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* BoolReply::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // .milvus.Status status = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::milvus::Status::_InternalParse; + object = msg->mutable_status(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + // bool bool_reply = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; + msg->set_bool_reply(::google::protobuf::internal::ReadVarint(&ptr)); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool BoolReply::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.BoolReply) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // .milvus.Status status = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_status())); + } else { + goto handle_unusual; + } + break; + } + + // bool bool_reply = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &bool_reply_))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.BoolReply) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.BoolReply) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void BoolReply::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.BoolReply) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, HasBitSetters::status(this), output); + } + + // bool bool_reply = 2; + if (this->bool_reply() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->bool_reply(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.BoolReply) +} + +::google::protobuf::uint8* BoolReply::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.BoolReply) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, HasBitSetters::status(this), target); + } + + // bool bool_reply = 2; + if (this->bool_reply() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->bool_reply(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.BoolReply) + return target; +} + +size_t BoolReply::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.BoolReply) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *status_); + } + + // bool bool_reply = 2; + if (this->bool_reply() != 0) { + total_size += 1 + 1; + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void BoolReply::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.BoolReply) + GOOGLE_DCHECK_NE(&from, this); + const BoolReply* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.BoolReply) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.BoolReply) + MergeFrom(*source); + } +} + +void BoolReply::MergeFrom(const BoolReply& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.BoolReply) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.has_status()) { + mutable_status()->::milvus::Status::MergeFrom(from.status()); + } + if (from.bool_reply() != 0) { + set_bool_reply(from.bool_reply()); + } +} + +void BoolReply::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.BoolReply) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void BoolReply::CopyFrom(const BoolReply& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.BoolReply) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BoolReply::IsInitialized() const { + return true; +} + +void BoolReply::Swap(BoolReply* other) { + if (other == this) return; + InternalSwap(other); +} +void BoolReply::InternalSwap(BoolReply* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(status_, other->status_); + swap(bool_reply_, other->bool_reply_); +} + +::google::protobuf::Metadata BoolReply::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void TableRowCount::InitAsDefaultInstance() { + ::milvus::grpc::_TableRowCount_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::Status*>( + ::milvus::Status::internal_default_instance()); +} +class TableRowCount::HasBitSetters { + public: + static const ::milvus::Status& status(const TableRowCount* msg); +}; + +const ::milvus::Status& +TableRowCount::HasBitSetters::status(const TableRowCount* msg) { + return *msg->status_; +} +void TableRowCount::clear_status() { + if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TableRowCount::kStatusFieldNumber; +const int TableRowCount::kTableRowCountFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TableRowCount::TableRowCount() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.TableRowCount) +} +TableRowCount::TableRowCount(const TableRowCount& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_status()) { + status_ = new ::milvus::Status(*from.status_); + } else { + status_ = nullptr; + } + table_row_count_ = from.table_row_count_; + // @@protoc_insertion_point(copy_constructor:milvus.grpc.TableRowCount) +} + +void TableRowCount::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_TableRowCount_milvus_2eproto.base); + ::memset(&status_, 0, static_cast( + reinterpret_cast(&table_row_count_) - + reinterpret_cast(&status_)) + sizeof(table_row_count_)); +} + +TableRowCount::~TableRowCount() { + // @@protoc_insertion_point(destructor:milvus.grpc.TableRowCount) + SharedDtor(); +} + +void TableRowCount::SharedDtor() { + if (this != internal_default_instance()) delete status_; +} + +void TableRowCount::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const TableRowCount& TableRowCount::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_TableRowCount_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void TableRowCount::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.TableRowCount) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; + table_row_count_ = PROTOBUF_LONGLONG(0); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* TableRowCount::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // .milvus.Status status = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::milvus::Status::_InternalParse; + object = msg->mutable_status(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + // int64 table_row_count = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; + msg->set_table_row_count(::google::protobuf::internal::ReadVarint(&ptr)); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool TableRowCount::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.TableRowCount) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // .milvus.Status status = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_status())); + } else { + goto handle_unusual; + } + break; + } + + // int64 table_row_count = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &table_row_count_))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.TableRowCount) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.TableRowCount) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void TableRowCount::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.TableRowCount) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, HasBitSetters::status(this), output); + } + + // int64 table_row_count = 2; + if (this->table_row_count() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->table_row_count(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.TableRowCount) +} + +::google::protobuf::uint8* TableRowCount::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.TableRowCount) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, HasBitSetters::status(this), target); + } + + // int64 table_row_count = 2; + if (this->table_row_count() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->table_row_count(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.TableRowCount) + return target; +} + +size_t TableRowCount::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.TableRowCount) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *status_); + } + + // int64 table_row_count = 2; + if (this->table_row_count() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->table_row_count()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TableRowCount::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.TableRowCount) + GOOGLE_DCHECK_NE(&from, this); + const TableRowCount* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.TableRowCount) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.TableRowCount) + MergeFrom(*source); + } +} + +void TableRowCount::MergeFrom(const TableRowCount& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.TableRowCount) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.has_status()) { + mutable_status()->::milvus::Status::MergeFrom(from.status()); + } + if (from.table_row_count() != 0) { + set_table_row_count(from.table_row_count()); + } +} + +void TableRowCount::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.TableRowCount) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TableRowCount::CopyFrom(const TableRowCount& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.TableRowCount) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TableRowCount::IsInitialized() const { + return true; +} + +void TableRowCount::Swap(TableRowCount* other) { + if (other == this) return; + InternalSwap(other); +} +void TableRowCount::InternalSwap(TableRowCount* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(status_, other->status_); + swap(table_row_count_, other->table_row_count_); +} + +::google::protobuf::Metadata TableRowCount::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void Command::InitAsDefaultInstance() { +} +class Command::HasBitSetters { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int Command::kCmdFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +Command::Command() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.Command) +} +Command::Command(const Command& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + cmd_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.cmd().size() > 0) { + cmd_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cmd_); + } + // @@protoc_insertion_point(copy_constructor:milvus.grpc.Command) +} + +void Command::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_Command_milvus_2eproto.base); + cmd_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +Command::~Command() { + // @@protoc_insertion_point(destructor:milvus.grpc.Command) + SharedDtor(); +} + +void Command::SharedDtor() { + cmd_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void Command::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Command& Command::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_Command_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void Command::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.Command) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cmd_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* Command::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // string cmd = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("milvus.grpc.Command.cmd"); + object = msg->mutable_cmd(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool Command::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.Command) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string cmd = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_cmd())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->cmd().data(), static_cast(this->cmd().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "milvus.grpc.Command.cmd")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.Command) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.Command) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void Command::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.Command) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string cmd = 1; + if (this->cmd().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->cmd().data(), static_cast(this->cmd().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.Command.cmd"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->cmd(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.Command) +} + +::google::protobuf::uint8* Command::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.Command) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string cmd = 1; + if (this->cmd().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->cmd().data(), static_cast(this->cmd().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.Command.cmd"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->cmd(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.Command) + return target; +} + +size_t Command::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.Command) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string cmd = 1; + if (this->cmd().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->cmd()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Command::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.Command) + GOOGLE_DCHECK_NE(&from, this); + const Command* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.Command) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.Command) + MergeFrom(*source); + } +} + +void Command::MergeFrom(const Command& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.Command) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.cmd().size() > 0) { + + cmd_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cmd_); + } +} + +void Command::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.Command) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Command::CopyFrom(const Command& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.Command) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Command::IsInitialized() const { + return true; +} + +void Command::Swap(Command* other) { + if (other == this) return; + InternalSwap(other); +} +void Command::InternalSwap(Command* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + cmd_.Swap(&other->cmd_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::google::protobuf::Metadata Command::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void ServerStatus::InitAsDefaultInstance() { + ::milvus::grpc::_ServerStatus_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::Status*>( + ::milvus::Status::internal_default_instance()); +} +class ServerStatus::HasBitSetters { + public: + static const ::milvus::Status& status(const ServerStatus* msg); +}; + +const ::milvus::Status& +ServerStatus::HasBitSetters::status(const ServerStatus* msg) { + return *msg->status_; +} +void ServerStatus::clear_status() { + if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ServerStatus::kStatusFieldNumber; +const int ServerStatus::kInfoFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ServerStatus::ServerStatus() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.ServerStatus) +} +ServerStatus::ServerStatus(const ServerStatus& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + info_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.info().size() > 0) { + info_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.info_); + } + if (from.has_status()) { + status_ = new ::milvus::Status(*from.status_); + } else { + status_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:milvus.grpc.ServerStatus) +} + +void ServerStatus::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_ServerStatus_milvus_2eproto.base); + info_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + status_ = nullptr; +} + +ServerStatus::~ServerStatus() { + // @@protoc_insertion_point(destructor:milvus.grpc.ServerStatus) + SharedDtor(); +} + +void ServerStatus::SharedDtor() { + info_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete status_; +} + +void ServerStatus::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ServerStatus& ServerStatus::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_ServerStatus_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void ServerStatus::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.ServerStatus) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + info_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* ServerStatus::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // .milvus.Status status = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::milvus::Status::_InternalParse; + object = msg->mutable_status(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + // string info = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("milvus.grpc.ServerStatus.info"); + object = msg->mutable_info(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool ServerStatus::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.ServerStatus) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // .milvus.Status status = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_status())); + } else { + goto handle_unusual; + } + break; + } + + // string info = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_info())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->info().data(), static_cast(this->info().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "milvus.grpc.ServerStatus.info")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.ServerStatus) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.ServerStatus) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void ServerStatus::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.ServerStatus) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, HasBitSetters::status(this), output); + } + + // string info = 2; + if (this->info().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->info().data(), static_cast(this->info().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.ServerStatus.info"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->info(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.ServerStatus) +} + +::google::protobuf::uint8* ServerStatus::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.ServerStatus) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.Status status = 1; + if (this->has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, HasBitSetters::status(this), target); + } + + // string info = 2; + if (this->info().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->info().data(), static_cast(this->info().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.ServerStatus.info"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->info(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.ServerStatus) + return target; +} + +size_t ServerStatus::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.ServerStatus) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string info = 2; + if (this->info().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->info()); + } + + // .milvus.Status status = 1; + if (this->has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *status_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ServerStatus::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.ServerStatus) + GOOGLE_DCHECK_NE(&from, this); + const ServerStatus* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.ServerStatus) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.ServerStatus) + MergeFrom(*source); + } +} + +void ServerStatus::MergeFrom(const ServerStatus& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.ServerStatus) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.info().size() > 0) { + + info_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.info_); + } + if (from.has_status()) { + mutable_status()->::milvus::Status::MergeFrom(from.status()); + } +} + +void ServerStatus::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.ServerStatus) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ServerStatus::CopyFrom(const ServerStatus& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.ServerStatus) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ServerStatus::IsInitialized() const { + return true; +} + +void ServerStatus::Swap(ServerStatus* other) { + if (other == this) return; + InternalSwap(other); +} +void ServerStatus::InternalSwap(ServerStatus* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + info_.Swap(&other->info_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(status_, other->status_); +} + +::google::protobuf::Metadata ServerStatus::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); + return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace grpc +} // namespace milvus +namespace google { +namespace protobuf { +template<> PROTOBUF_NOINLINE ::milvus::grpc::TableName* Arena::CreateMaybeMessage< ::milvus::grpc::TableName >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::TableName >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::grpc::TableSchema* Arena::CreateMaybeMessage< ::milvus::grpc::TableSchema >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::TableSchema >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::grpc::Range* Arena::CreateMaybeMessage< ::milvus::grpc::Range >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::Range >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::grpc::RowRecord* Arena::CreateMaybeMessage< ::milvus::grpc::RowRecord >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::RowRecord >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::grpc::InsertInfos* Arena::CreateMaybeMessage< ::milvus::grpc::InsertInfos >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::InsertInfos >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::grpc::VectorIds* Arena::CreateMaybeMessage< ::milvus::grpc::VectorIds >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::VectorIds >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::grpc::SearchVectorInfos* Arena::CreateMaybeMessage< ::milvus::grpc::SearchVectorInfos >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::SearchVectorInfos >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::grpc::SearchVectorInFilesInfos* Arena::CreateMaybeMessage< ::milvus::grpc::SearchVectorInFilesInfos >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::SearchVectorInFilesInfos >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::grpc::QueryResult* Arena::CreateMaybeMessage< ::milvus::grpc::QueryResult >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::QueryResult >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::grpc::TopKQueryResult* Arena::CreateMaybeMessage< ::milvus::grpc::TopKQueryResult >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::TopKQueryResult >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::grpc::StringReply* Arena::CreateMaybeMessage< ::milvus::grpc::StringReply >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::StringReply >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::grpc::BoolReply* Arena::CreateMaybeMessage< ::milvus::grpc::BoolReply >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::BoolReply >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::grpc::TableRowCount* Arena::CreateMaybeMessage< ::milvus::grpc::TableRowCount >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::TableRowCount >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::grpc::Command* Arena::CreateMaybeMessage< ::milvus::grpc::Command >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::Command >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::grpc::ServerStatus* Arena::CreateMaybeMessage< ::milvus::grpc::ServerStatus >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::ServerStatus >(arena); +} +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) +#include diff --git a/cpp/src/grpc/gen-milvus/milvus.pb.h b/cpp/src/grpc/gen-milvus/milvus.pb.h new file mode 100644 index 0000000000..7061eac44b --- /dev/null +++ b/cpp/src/grpc/gen-milvus/milvus.pb.h @@ -0,0 +1,3376 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: milvus.proto + +#ifndef PROTOBUF_INCLUDED_milvus_2eproto +#define PROTOBUF_INCLUDED_milvus_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3007000 +#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 3007000 < 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "status.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_milvus_2eproto + +// Internal implementation detail -- do not use these members. +struct TableStruct_milvus_2eproto { + static const ::google::protobuf::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::google::protobuf::internal::ParseTable schema[15] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; + static const ::google::protobuf::uint32 offsets[]; +}; +void AddDescriptors_milvus_2eproto(); +namespace milvus { +namespace grpc { +class BoolReply; +class BoolReplyDefaultTypeInternal; +extern BoolReplyDefaultTypeInternal _BoolReply_default_instance_; +class Command; +class CommandDefaultTypeInternal; +extern CommandDefaultTypeInternal _Command_default_instance_; +class InsertInfos; +class InsertInfosDefaultTypeInternal; +extern InsertInfosDefaultTypeInternal _InsertInfos_default_instance_; +class QueryResult; +class QueryResultDefaultTypeInternal; +extern QueryResultDefaultTypeInternal _QueryResult_default_instance_; +class Range; +class RangeDefaultTypeInternal; +extern RangeDefaultTypeInternal _Range_default_instance_; +class RowRecord; +class RowRecordDefaultTypeInternal; +extern RowRecordDefaultTypeInternal _RowRecord_default_instance_; +class SearchVectorInFilesInfos; +class SearchVectorInFilesInfosDefaultTypeInternal; +extern SearchVectorInFilesInfosDefaultTypeInternal _SearchVectorInFilesInfos_default_instance_; +class SearchVectorInfos; +class SearchVectorInfosDefaultTypeInternal; +extern SearchVectorInfosDefaultTypeInternal _SearchVectorInfos_default_instance_; +class ServerStatus; +class ServerStatusDefaultTypeInternal; +extern ServerStatusDefaultTypeInternal _ServerStatus_default_instance_; +class StringReply; +class StringReplyDefaultTypeInternal; +extern StringReplyDefaultTypeInternal _StringReply_default_instance_; +class TableName; +class TableNameDefaultTypeInternal; +extern TableNameDefaultTypeInternal _TableName_default_instance_; +class TableRowCount; +class TableRowCountDefaultTypeInternal; +extern TableRowCountDefaultTypeInternal _TableRowCount_default_instance_; +class TableSchema; +class TableSchemaDefaultTypeInternal; +extern TableSchemaDefaultTypeInternal _TableSchema_default_instance_; +class TopKQueryResult; +class TopKQueryResultDefaultTypeInternal; +extern TopKQueryResultDefaultTypeInternal _TopKQueryResult_default_instance_; +class VectorIds; +class VectorIdsDefaultTypeInternal; +extern VectorIdsDefaultTypeInternal _VectorIds_default_instance_; +} // namespace grpc +} // namespace milvus +namespace google { +namespace protobuf { +template<> ::milvus::grpc::BoolReply* Arena::CreateMaybeMessage<::milvus::grpc::BoolReply>(Arena*); +template<> ::milvus::grpc::Command* Arena::CreateMaybeMessage<::milvus::grpc::Command>(Arena*); +template<> ::milvus::grpc::InsertInfos* Arena::CreateMaybeMessage<::milvus::grpc::InsertInfos>(Arena*); +template<> ::milvus::grpc::QueryResult* Arena::CreateMaybeMessage<::milvus::grpc::QueryResult>(Arena*); +template<> ::milvus::grpc::Range* Arena::CreateMaybeMessage<::milvus::grpc::Range>(Arena*); +template<> ::milvus::grpc::RowRecord* Arena::CreateMaybeMessage<::milvus::grpc::RowRecord>(Arena*); +template<> ::milvus::grpc::SearchVectorInFilesInfos* Arena::CreateMaybeMessage<::milvus::grpc::SearchVectorInFilesInfos>(Arena*); +template<> ::milvus::grpc::SearchVectorInfos* Arena::CreateMaybeMessage<::milvus::grpc::SearchVectorInfos>(Arena*); +template<> ::milvus::grpc::ServerStatus* Arena::CreateMaybeMessage<::milvus::grpc::ServerStatus>(Arena*); +template<> ::milvus::grpc::StringReply* Arena::CreateMaybeMessage<::milvus::grpc::StringReply>(Arena*); +template<> ::milvus::grpc::TableName* Arena::CreateMaybeMessage<::milvus::grpc::TableName>(Arena*); +template<> ::milvus::grpc::TableRowCount* Arena::CreateMaybeMessage<::milvus::grpc::TableRowCount>(Arena*); +template<> ::milvus::grpc::TableSchema* Arena::CreateMaybeMessage<::milvus::grpc::TableSchema>(Arena*); +template<> ::milvus::grpc::TopKQueryResult* Arena::CreateMaybeMessage<::milvus::grpc::TopKQueryResult>(Arena*); +template<> ::milvus::grpc::VectorIds* Arena::CreateMaybeMessage<::milvus::grpc::VectorIds>(Arena*); +} // namespace protobuf +} // namespace google +namespace milvus { +namespace grpc { + +// =================================================================== + +class TableName final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TableName) */ { + public: + TableName(); + virtual ~TableName(); + + TableName(const TableName& from); + + inline TableName& operator=(const TableName& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + TableName(TableName&& from) noexcept + : TableName() { + *this = ::std::move(from); + } + + inline TableName& operator=(TableName&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const TableName& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const TableName* internal_default_instance() { + return reinterpret_cast( + &_TableName_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + void Swap(TableName* other); + friend void swap(TableName& a, TableName& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline TableName* New() const final { + return CreateMaybeMessage(nullptr); + } + + TableName* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const TableName& from); + void MergeFrom(const TableName& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TableName* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string table_name = 2; + void clear_table_name(); + static const int kTableNameFieldNumber = 2; + const ::std::string& table_name() const; + void set_table_name(const ::std::string& value); + #if LANG_CXX11 + void set_table_name(::std::string&& value); + #endif + void set_table_name(const char* value); + void set_table_name(const char* value, size_t size); + ::std::string* mutable_table_name(); + ::std::string* release_table_name(); + void set_allocated_table_name(::std::string* table_name); + + // .milvus.Status status = 1; + bool has_status() const; + void clear_status(); + static const int kStatusFieldNumber = 1; + const ::milvus::Status& status() const; + ::milvus::Status* release_status(); + ::milvus::Status* mutable_status(); + void set_allocated_status(::milvus::Status* status); + + // @@protoc_insertion_point(class_scope:milvus.grpc.TableName) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr table_name_; + ::milvus::Status* status_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class TableSchema final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TableSchema) */ { + public: + TableSchema(); + virtual ~TableSchema(); + + TableSchema(const TableSchema& from); + + inline TableSchema& operator=(const TableSchema& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + TableSchema(TableSchema&& from) noexcept + : TableSchema() { + *this = ::std::move(from); + } + + inline TableSchema& operator=(TableSchema&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const TableSchema& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const TableSchema* internal_default_instance() { + return reinterpret_cast( + &_TableSchema_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + void Swap(TableSchema* other); + friend void swap(TableSchema& a, TableSchema& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline TableSchema* New() const final { + return CreateMaybeMessage(nullptr); + } + + TableSchema* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const TableSchema& from); + void MergeFrom(const TableSchema& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TableSchema* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // .milvus.grpc.TableName table_name = 1; + bool has_table_name() const; + void clear_table_name(); + static const int kTableNameFieldNumber = 1; + const ::milvus::grpc::TableName& table_name() const; + ::milvus::grpc::TableName* release_table_name(); + ::milvus::grpc::TableName* mutable_table_name(); + void set_allocated_table_name(::milvus::grpc::TableName* table_name); + + // int64 dimension = 3; + void clear_dimension(); + static const int kDimensionFieldNumber = 3; + ::google::protobuf::int64 dimension() const; + void set_dimension(::google::protobuf::int64 value); + + // int32 index_type = 2; + void clear_index_type(); + static const int kIndexTypeFieldNumber = 2; + ::google::protobuf::int32 index_type() const; + void set_index_type(::google::protobuf::int32 value); + + // bool store_raw_vector = 4; + void clear_store_raw_vector(); + static const int kStoreRawVectorFieldNumber = 4; + bool store_raw_vector() const; + void set_store_raw_vector(bool value); + + // @@protoc_insertion_point(class_scope:milvus.grpc.TableSchema) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::milvus::grpc::TableName* table_name_; + ::google::protobuf::int64 dimension_; + ::google::protobuf::int32 index_type_; + bool store_raw_vector_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class Range final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.Range) */ { + public: + Range(); + virtual ~Range(); + + Range(const Range& from); + + inline Range& operator=(const Range& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + Range(Range&& from) noexcept + : Range() { + *this = ::std::move(from); + } + + inline Range& operator=(Range&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const Range& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Range* internal_default_instance() { + return reinterpret_cast( + &_Range_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + void Swap(Range* other); + friend void swap(Range& a, Range& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline Range* New() const final { + return CreateMaybeMessage(nullptr); + } + + Range* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const Range& from); + void MergeFrom(const Range& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Range* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string start_value = 1; + void clear_start_value(); + static const int kStartValueFieldNumber = 1; + const ::std::string& start_value() const; + void set_start_value(const ::std::string& value); + #if LANG_CXX11 + void set_start_value(::std::string&& value); + #endif + void set_start_value(const char* value); + void set_start_value(const char* value, size_t size); + ::std::string* mutable_start_value(); + ::std::string* release_start_value(); + void set_allocated_start_value(::std::string* start_value); + + // string end_value = 2; + void clear_end_value(); + static const int kEndValueFieldNumber = 2; + const ::std::string& end_value() const; + void set_end_value(const ::std::string& value); + #if LANG_CXX11 + void set_end_value(::std::string&& value); + #endif + void set_end_value(const char* value); + void set_end_value(const char* value, size_t size); + ::std::string* mutable_end_value(); + ::std::string* release_end_value(); + void set_allocated_end_value(::std::string* end_value); + + // @@protoc_insertion_point(class_scope:milvus.grpc.Range) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr start_value_; + ::google::protobuf::internal::ArenaStringPtr end_value_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class RowRecord final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.RowRecord) */ { + public: + RowRecord(); + virtual ~RowRecord(); + + RowRecord(const RowRecord& from); + + inline RowRecord& operator=(const RowRecord& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + RowRecord(RowRecord&& from) noexcept + : RowRecord() { + *this = ::std::move(from); + } + + inline RowRecord& operator=(RowRecord&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const RowRecord& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const RowRecord* internal_default_instance() { + return reinterpret_cast( + &_RowRecord_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + void Swap(RowRecord* other); + friend void swap(RowRecord& a, RowRecord& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline RowRecord* New() const final { + return CreateMaybeMessage(nullptr); + } + + RowRecord* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const RowRecord& from); + void MergeFrom(const RowRecord& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RowRecord* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated float vector_data = 1; + int vector_data_size() const; + void clear_vector_data(); + static const int kVectorDataFieldNumber = 1; + float vector_data(int index) const; + void set_vector_data(int index, float value); + void add_vector_data(float value); + const ::google::protobuf::RepeatedField< float >& + vector_data() const; + ::google::protobuf::RepeatedField< float >* + mutable_vector_data(); + + // @@protoc_insertion_point(class_scope:milvus.grpc.RowRecord) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedField< float > vector_data_; + mutable std::atomic _vector_data_cached_byte_size_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class InsertInfos final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.InsertInfos) */ { + public: + InsertInfos(); + virtual ~InsertInfos(); + + InsertInfos(const InsertInfos& from); + + inline InsertInfos& operator=(const InsertInfos& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + InsertInfos(InsertInfos&& from) noexcept + : InsertInfos() { + *this = ::std::move(from); + } + + inline InsertInfos& operator=(InsertInfos&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const InsertInfos& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const InsertInfos* internal_default_instance() { + return reinterpret_cast( + &_InsertInfos_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + void Swap(InsertInfos* other); + friend void swap(InsertInfos& a, InsertInfos& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline InsertInfos* New() const final { + return CreateMaybeMessage(nullptr); + } + + InsertInfos* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const InsertInfos& from); + void MergeFrom(const InsertInfos& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(InsertInfos* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .milvus.grpc.RowRecord row_record_array = 2; + int row_record_array_size() const; + void clear_row_record_array(); + static const int kRowRecordArrayFieldNumber = 2; + ::milvus::grpc::RowRecord* mutable_row_record_array(int index); + ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >* + mutable_row_record_array(); + const ::milvus::grpc::RowRecord& row_record_array(int index) const; + ::milvus::grpc::RowRecord* add_row_record_array(); + const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >& + row_record_array() const; + + // string table_name = 1; + void clear_table_name(); + static const int kTableNameFieldNumber = 1; + const ::std::string& table_name() const; + void set_table_name(const ::std::string& value); + #if LANG_CXX11 + void set_table_name(::std::string&& value); + #endif + void set_table_name(const char* value); + void set_table_name(const char* value, size_t size); + ::std::string* mutable_table_name(); + ::std::string* release_table_name(); + void set_allocated_table_name(::std::string* table_name); + + // @@protoc_insertion_point(class_scope:milvus.grpc.InsertInfos) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord > row_record_array_; + ::google::protobuf::internal::ArenaStringPtr table_name_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class VectorIds final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.VectorIds) */ { + public: + VectorIds(); + virtual ~VectorIds(); + + VectorIds(const VectorIds& from); + + inline VectorIds& operator=(const VectorIds& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + VectorIds(VectorIds&& from) noexcept + : VectorIds() { + *this = ::std::move(from); + } + + inline VectorIds& operator=(VectorIds&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const VectorIds& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const VectorIds* internal_default_instance() { + return reinterpret_cast( + &_VectorIds_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + void Swap(VectorIds* other); + friend void swap(VectorIds& a, VectorIds& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline VectorIds* New() const final { + return CreateMaybeMessage(nullptr); + } + + VectorIds* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const VectorIds& from); + void MergeFrom(const VectorIds& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(VectorIds* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated int64 vector_id_array = 2; + int vector_id_array_size() const; + void clear_vector_id_array(); + static const int kVectorIdArrayFieldNumber = 2; + ::google::protobuf::int64 vector_id_array(int index) const; + void set_vector_id_array(int index, ::google::protobuf::int64 value); + void add_vector_id_array(::google::protobuf::int64 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& + vector_id_array() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* + mutable_vector_id_array(); + + // .milvus.Status status = 1; + bool has_status() const; + void clear_status(); + static const int kStatusFieldNumber = 1; + const ::milvus::Status& status() const; + ::milvus::Status* release_status(); + ::milvus::Status* mutable_status(); + void set_allocated_status(::milvus::Status* status); + + // @@protoc_insertion_point(class_scope:milvus.grpc.VectorIds) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 > vector_id_array_; + mutable std::atomic _vector_id_array_cached_byte_size_; + ::milvus::Status* status_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class SearchVectorInfos final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.SearchVectorInfos) */ { + public: + SearchVectorInfos(); + virtual ~SearchVectorInfos(); + + SearchVectorInfos(const SearchVectorInfos& from); + + inline SearchVectorInfos& operator=(const SearchVectorInfos& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + SearchVectorInfos(SearchVectorInfos&& from) noexcept + : SearchVectorInfos() { + *this = ::std::move(from); + } + + inline SearchVectorInfos& operator=(SearchVectorInfos&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const SearchVectorInfos& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const SearchVectorInfos* internal_default_instance() { + return reinterpret_cast( + &_SearchVectorInfos_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + void Swap(SearchVectorInfos* other); + friend void swap(SearchVectorInfos& a, SearchVectorInfos& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline SearchVectorInfos* New() const final { + return CreateMaybeMessage(nullptr); + } + + SearchVectorInfos* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const SearchVectorInfos& from); + void MergeFrom(const SearchVectorInfos& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SearchVectorInfos* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .milvus.grpc.RowRecord query_record_array = 2; + int query_record_array_size() const; + void clear_query_record_array(); + static const int kQueryRecordArrayFieldNumber = 2; + ::milvus::grpc::RowRecord* mutable_query_record_array(int index); + ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >* + mutable_query_record_array(); + const ::milvus::grpc::RowRecord& query_record_array(int index) const; + ::milvus::grpc::RowRecord* add_query_record_array(); + const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >& + query_record_array() const; + + // repeated .milvus.grpc.Range query_range_array = 3; + int query_range_array_size() const; + void clear_query_range_array(); + static const int kQueryRangeArrayFieldNumber = 3; + ::milvus::grpc::Range* mutable_query_range_array(int index); + ::google::protobuf::RepeatedPtrField< ::milvus::grpc::Range >* + mutable_query_range_array(); + const ::milvus::grpc::Range& query_range_array(int index) const; + ::milvus::grpc::Range* add_query_range_array(); + const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::Range >& + query_range_array() const; + + // string table_name = 1; + void clear_table_name(); + static const int kTableNameFieldNumber = 1; + const ::std::string& table_name() const; + void set_table_name(const ::std::string& value); + #if LANG_CXX11 + void set_table_name(::std::string&& value); + #endif + void set_table_name(const char* value); + void set_table_name(const char* value, size_t size); + ::std::string* mutable_table_name(); + ::std::string* release_table_name(); + void set_allocated_table_name(::std::string* table_name); + + // int64 topk = 4; + void clear_topk(); + static const int kTopkFieldNumber = 4; + ::google::protobuf::int64 topk() const; + void set_topk(::google::protobuf::int64 value); + + // @@protoc_insertion_point(class_scope:milvus.grpc.SearchVectorInfos) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord > query_record_array_; + ::google::protobuf::RepeatedPtrField< ::milvus::grpc::Range > query_range_array_; + ::google::protobuf::internal::ArenaStringPtr table_name_; + ::google::protobuf::int64 topk_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class SearchVectorInFilesInfos final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.SearchVectorInFilesInfos) */ { + public: + SearchVectorInFilesInfos(); + virtual ~SearchVectorInFilesInfos(); + + SearchVectorInFilesInfos(const SearchVectorInFilesInfos& from); + + inline SearchVectorInFilesInfos& operator=(const SearchVectorInFilesInfos& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + SearchVectorInFilesInfos(SearchVectorInFilesInfos&& from) noexcept + : SearchVectorInFilesInfos() { + *this = ::std::move(from); + } + + inline SearchVectorInFilesInfos& operator=(SearchVectorInFilesInfos&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const SearchVectorInFilesInfos& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const SearchVectorInFilesInfos* internal_default_instance() { + return reinterpret_cast( + &_SearchVectorInFilesInfos_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + void Swap(SearchVectorInFilesInfos* other); + friend void swap(SearchVectorInFilesInfos& a, SearchVectorInFilesInfos& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline SearchVectorInFilesInfos* New() const final { + return CreateMaybeMessage(nullptr); + } + + SearchVectorInFilesInfos* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const SearchVectorInFilesInfos& from); + void MergeFrom(const SearchVectorInFilesInfos& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SearchVectorInFilesInfos* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated string file_id_array = 1; + int file_id_array_size() const; + void clear_file_id_array(); + static const int kFileIdArrayFieldNumber = 1; + const ::std::string& file_id_array(int index) const; + ::std::string* mutable_file_id_array(int index); + void set_file_id_array(int index, const ::std::string& value); + #if LANG_CXX11 + void set_file_id_array(int index, ::std::string&& value); + #endif + void set_file_id_array(int index, const char* value); + void set_file_id_array(int index, const char* value, size_t size); + ::std::string* add_file_id_array(); + void add_file_id_array(const ::std::string& value); + #if LANG_CXX11 + void add_file_id_array(::std::string&& value); + #endif + void add_file_id_array(const char* value); + void add_file_id_array(const char* value, size_t size); + const ::google::protobuf::RepeatedPtrField<::std::string>& file_id_array() const; + ::google::protobuf::RepeatedPtrField<::std::string>* mutable_file_id_array(); + + // .milvus.grpc.SearchVectorInfos search_vector_infos = 2; + bool has_search_vector_infos() const; + void clear_search_vector_infos(); + static const int kSearchVectorInfosFieldNumber = 2; + const ::milvus::grpc::SearchVectorInfos& search_vector_infos() const; + ::milvus::grpc::SearchVectorInfos* release_search_vector_infos(); + ::milvus::grpc::SearchVectorInfos* mutable_search_vector_infos(); + void set_allocated_search_vector_infos(::milvus::grpc::SearchVectorInfos* search_vector_infos); + + // @@protoc_insertion_point(class_scope:milvus.grpc.SearchVectorInFilesInfos) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedPtrField<::std::string> file_id_array_; + ::milvus::grpc::SearchVectorInfos* search_vector_infos_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class QueryResult final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.QueryResult) */ { + public: + QueryResult(); + virtual ~QueryResult(); + + QueryResult(const QueryResult& from); + + inline QueryResult& operator=(const QueryResult& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + QueryResult(QueryResult&& from) noexcept + : QueryResult() { + *this = ::std::move(from); + } + + inline QueryResult& operator=(QueryResult&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const QueryResult& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const QueryResult* internal_default_instance() { + return reinterpret_cast( + &_QueryResult_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + void Swap(QueryResult* other); + friend void swap(QueryResult& a, QueryResult& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline QueryResult* New() const final { + return CreateMaybeMessage(nullptr); + } + + QueryResult* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const QueryResult& from); + void MergeFrom(const QueryResult& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(QueryResult* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // int64 id = 1; + void clear_id(); + static const int kIdFieldNumber = 1; + ::google::protobuf::int64 id() const; + void set_id(::google::protobuf::int64 value); + + // double distance = 2; + void clear_distance(); + static const int kDistanceFieldNumber = 2; + double distance() const; + void set_distance(double value); + + // @@protoc_insertion_point(class_scope:milvus.grpc.QueryResult) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::int64 id_; + double distance_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class TopKQueryResult final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TopKQueryResult) */ { + public: + TopKQueryResult(); + virtual ~TopKQueryResult(); + + TopKQueryResult(const TopKQueryResult& from); + + inline TopKQueryResult& operator=(const TopKQueryResult& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + TopKQueryResult(TopKQueryResult&& from) noexcept + : TopKQueryResult() { + *this = ::std::move(from); + } + + inline TopKQueryResult& operator=(TopKQueryResult&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const TopKQueryResult& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const TopKQueryResult* internal_default_instance() { + return reinterpret_cast( + &_TopKQueryResult_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + void Swap(TopKQueryResult* other); + friend void swap(TopKQueryResult& a, TopKQueryResult& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline TopKQueryResult* New() const final { + return CreateMaybeMessage(nullptr); + } + + TopKQueryResult* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const TopKQueryResult& from); + void MergeFrom(const TopKQueryResult& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TopKQueryResult* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .milvus.grpc.QueryResult query_result_arrays = 2; + int query_result_arrays_size() const; + void clear_query_result_arrays(); + static const int kQueryResultArraysFieldNumber = 2; + ::milvus::grpc::QueryResult* mutable_query_result_arrays(int index); + ::google::protobuf::RepeatedPtrField< ::milvus::grpc::QueryResult >* + mutable_query_result_arrays(); + const ::milvus::grpc::QueryResult& query_result_arrays(int index) const; + ::milvus::grpc::QueryResult* add_query_result_arrays(); + const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::QueryResult >& + query_result_arrays() const; + + // .milvus.Status status = 1; + bool has_status() const; + void clear_status(); + static const int kStatusFieldNumber = 1; + const ::milvus::Status& status() const; + ::milvus::Status* release_status(); + ::milvus::Status* mutable_status(); + void set_allocated_status(::milvus::Status* status); + + // @@protoc_insertion_point(class_scope:milvus.grpc.TopKQueryResult) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedPtrField< ::milvus::grpc::QueryResult > query_result_arrays_; + ::milvus::Status* status_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class StringReply final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.StringReply) */ { + public: + StringReply(); + virtual ~StringReply(); + + StringReply(const StringReply& from); + + inline StringReply& operator=(const StringReply& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + StringReply(StringReply&& from) noexcept + : StringReply() { + *this = ::std::move(from); + } + + inline StringReply& operator=(StringReply&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const StringReply& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const StringReply* internal_default_instance() { + return reinterpret_cast( + &_StringReply_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + void Swap(StringReply* other); + friend void swap(StringReply& a, StringReply& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline StringReply* New() const final { + return CreateMaybeMessage(nullptr); + } + + StringReply* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const StringReply& from); + void MergeFrom(const StringReply& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(StringReply* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string string_reply = 2; + void clear_string_reply(); + static const int kStringReplyFieldNumber = 2; + const ::std::string& string_reply() const; + void set_string_reply(const ::std::string& value); + #if LANG_CXX11 + void set_string_reply(::std::string&& value); + #endif + void set_string_reply(const char* value); + void set_string_reply(const char* value, size_t size); + ::std::string* mutable_string_reply(); + ::std::string* release_string_reply(); + void set_allocated_string_reply(::std::string* string_reply); + + // .milvus.Status status = 1; + bool has_status() const; + void clear_status(); + static const int kStatusFieldNumber = 1; + const ::milvus::Status& status() const; + ::milvus::Status* release_status(); + ::milvus::Status* mutable_status(); + void set_allocated_status(::milvus::Status* status); + + // @@protoc_insertion_point(class_scope:milvus.grpc.StringReply) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr string_reply_; + ::milvus::Status* status_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class BoolReply final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.BoolReply) */ { + public: + BoolReply(); + virtual ~BoolReply(); + + BoolReply(const BoolReply& from); + + inline BoolReply& operator=(const BoolReply& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + BoolReply(BoolReply&& from) noexcept + : BoolReply() { + *this = ::std::move(from); + } + + inline BoolReply& operator=(BoolReply&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const BoolReply& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const BoolReply* internal_default_instance() { + return reinterpret_cast( + &_BoolReply_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + void Swap(BoolReply* other); + friend void swap(BoolReply& a, BoolReply& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline BoolReply* New() const final { + return CreateMaybeMessage(nullptr); + } + + BoolReply* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const BoolReply& from); + void MergeFrom(const BoolReply& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BoolReply* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // .milvus.Status status = 1; + bool has_status() const; + void clear_status(); + static const int kStatusFieldNumber = 1; + const ::milvus::Status& status() const; + ::milvus::Status* release_status(); + ::milvus::Status* mutable_status(); + void set_allocated_status(::milvus::Status* status); + + // bool bool_reply = 2; + void clear_bool_reply(); + static const int kBoolReplyFieldNumber = 2; + bool bool_reply() const; + void set_bool_reply(bool value); + + // @@protoc_insertion_point(class_scope:milvus.grpc.BoolReply) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::milvus::Status* status_; + bool bool_reply_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class TableRowCount final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TableRowCount) */ { + public: + TableRowCount(); + virtual ~TableRowCount(); + + TableRowCount(const TableRowCount& from); + + inline TableRowCount& operator=(const TableRowCount& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + TableRowCount(TableRowCount&& from) noexcept + : TableRowCount() { + *this = ::std::move(from); + } + + inline TableRowCount& operator=(TableRowCount&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const TableRowCount& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const TableRowCount* internal_default_instance() { + return reinterpret_cast( + &_TableRowCount_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + void Swap(TableRowCount* other); + friend void swap(TableRowCount& a, TableRowCount& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline TableRowCount* New() const final { + return CreateMaybeMessage(nullptr); + } + + TableRowCount* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const TableRowCount& from); + void MergeFrom(const TableRowCount& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TableRowCount* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // .milvus.Status status = 1; + bool has_status() const; + void clear_status(); + static const int kStatusFieldNumber = 1; + const ::milvus::Status& status() const; + ::milvus::Status* release_status(); + ::milvus::Status* mutable_status(); + void set_allocated_status(::milvus::Status* status); + + // int64 table_row_count = 2; + void clear_table_row_count(); + static const int kTableRowCountFieldNumber = 2; + ::google::protobuf::int64 table_row_count() const; + void set_table_row_count(::google::protobuf::int64 value); + + // @@protoc_insertion_point(class_scope:milvus.grpc.TableRowCount) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::milvus::Status* status_; + ::google::protobuf::int64 table_row_count_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class Command final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.Command) */ { + public: + Command(); + virtual ~Command(); + + Command(const Command& from); + + inline Command& operator=(const Command& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + Command(Command&& from) noexcept + : Command() { + *this = ::std::move(from); + } + + inline Command& operator=(Command&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const Command& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Command* internal_default_instance() { + return reinterpret_cast( + &_Command_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + void Swap(Command* other); + friend void swap(Command& a, Command& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline Command* New() const final { + return CreateMaybeMessage(nullptr); + } + + Command* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const Command& from); + void MergeFrom(const Command& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Command* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string cmd = 1; + void clear_cmd(); + static const int kCmdFieldNumber = 1; + const ::std::string& cmd() const; + void set_cmd(const ::std::string& value); + #if LANG_CXX11 + void set_cmd(::std::string&& value); + #endif + void set_cmd(const char* value); + void set_cmd(const char* value, size_t size); + ::std::string* mutable_cmd(); + ::std::string* release_cmd(); + void set_allocated_cmd(::std::string* cmd); + + // @@protoc_insertion_point(class_scope:milvus.grpc.Command) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr cmd_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class ServerStatus final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.ServerStatus) */ { + public: + ServerStatus(); + virtual ~ServerStatus(); + + ServerStatus(const ServerStatus& from); + + inline ServerStatus& operator=(const ServerStatus& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + ServerStatus(ServerStatus&& from) noexcept + : ServerStatus() { + *this = ::std::move(from); + } + + inline ServerStatus& operator=(ServerStatus&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const ServerStatus& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ServerStatus* internal_default_instance() { + return reinterpret_cast( + &_ServerStatus_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + void Swap(ServerStatus* other); + friend void swap(ServerStatus& a, ServerStatus& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline ServerStatus* New() const final { + return CreateMaybeMessage(nullptr); + } + + ServerStatus* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ServerStatus& from); + void MergeFrom(const ServerStatus& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ServerStatus* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string info = 2; + void clear_info(); + static const int kInfoFieldNumber = 2; + const ::std::string& info() const; + void set_info(const ::std::string& value); + #if LANG_CXX11 + void set_info(::std::string&& value); + #endif + void set_info(const char* value); + void set_info(const char* value, size_t size); + ::std::string* mutable_info(); + ::std::string* release_info(); + void set_allocated_info(::std::string* info); + + // .milvus.Status status = 1; + bool has_status() const; + void clear_status(); + static const int kStatusFieldNumber = 1; + const ::milvus::Status& status() const; + ::milvus::Status* release_status(); + ::milvus::Status* mutable_status(); + void set_allocated_status(::milvus::Status* status); + + // @@protoc_insertion_point(class_scope:milvus.grpc.ServerStatus) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr info_; + ::milvus::Status* status_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// TableName + +// .milvus.Status status = 1; +inline bool TableName::has_status() const { + return this != internal_default_instance() && status_ != nullptr; +} +inline const ::milvus::Status& TableName::status() const { + const ::milvus::Status* p = status_; + // @@protoc_insertion_point(field_get:milvus.grpc.TableName.status) + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::_Status_default_instance_); +} +inline ::milvus::Status* TableName::release_status() { + // @@protoc_insertion_point(field_release:milvus.grpc.TableName.status) + + ::milvus::Status* temp = status_; + status_ = nullptr; + return temp; +} +inline ::milvus::Status* TableName::mutable_status() { + + if (status_ == nullptr) { + auto* p = CreateMaybeMessage<::milvus::Status>(GetArenaNoVirtual()); + status_ = p; + } + // @@protoc_insertion_point(field_mutable:milvus.grpc.TableName.status) + return status_; +} +inline void TableName::set_allocated_status(::milvus::Status* status) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); + } + if (status) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + status = ::google::protobuf::internal::GetOwnedMessage( + message_arena, status, submessage_arena); + } + + } else { + + } + status_ = status; + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.TableName.status) +} + +// string table_name = 2; +inline void TableName::clear_table_name() { + table_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& TableName::table_name() const { + // @@protoc_insertion_point(field_get:milvus.grpc.TableName.table_name) + return table_name_.GetNoArena(); +} +inline void TableName::set_table_name(const ::std::string& value) { + + table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.grpc.TableName.table_name) +} +#if LANG_CXX11 +inline void TableName::set_table_name(::std::string&& value) { + + table_name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.TableName.table_name) +} +#endif +inline void TableName::set_table_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.grpc.TableName.table_name) +} +inline void TableName::set_table_name(const char* value, size_t size) { + + table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.TableName.table_name) +} +inline ::std::string* TableName::mutable_table_name() { + + // @@protoc_insertion_point(field_mutable:milvus.grpc.TableName.table_name) + return table_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* TableName::release_table_name() { + // @@protoc_insertion_point(field_release:milvus.grpc.TableName.table_name) + + return table_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void TableName::set_allocated_table_name(::std::string* table_name) { + if (table_name != nullptr) { + + } else { + + } + table_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), table_name); + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.TableName.table_name) +} + +// ------------------------------------------------------------------- + +// TableSchema + +// .milvus.grpc.TableName table_name = 1; +inline bool TableSchema::has_table_name() const { + return this != internal_default_instance() && table_name_ != nullptr; +} +inline void TableSchema::clear_table_name() { + if (GetArenaNoVirtual() == nullptr && table_name_ != nullptr) { + delete table_name_; + } + table_name_ = nullptr; +} +inline const ::milvus::grpc::TableName& TableSchema::table_name() const { + const ::milvus::grpc::TableName* p = table_name_; + // @@protoc_insertion_point(field_get:milvus.grpc.TableSchema.table_name) + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::grpc::_TableName_default_instance_); +} +inline ::milvus::grpc::TableName* TableSchema::release_table_name() { + // @@protoc_insertion_point(field_release:milvus.grpc.TableSchema.table_name) + + ::milvus::grpc::TableName* temp = table_name_; + table_name_ = nullptr; + return temp; +} +inline ::milvus::grpc::TableName* TableSchema::mutable_table_name() { + + if (table_name_ == nullptr) { + auto* p = CreateMaybeMessage<::milvus::grpc::TableName>(GetArenaNoVirtual()); + table_name_ = p; + } + // @@protoc_insertion_point(field_mutable:milvus.grpc.TableSchema.table_name) + return table_name_; +} +inline void TableSchema::set_allocated_table_name(::milvus::grpc::TableName* table_name) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete table_name_; + } + if (table_name) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + table_name = ::google::protobuf::internal::GetOwnedMessage( + message_arena, table_name, submessage_arena); + } + + } else { + + } + table_name_ = table_name; + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.TableSchema.table_name) +} + +// int32 index_type = 2; +inline void TableSchema::clear_index_type() { + index_type_ = 0; +} +inline ::google::protobuf::int32 TableSchema::index_type() const { + // @@protoc_insertion_point(field_get:milvus.grpc.TableSchema.index_type) + return index_type_; +} +inline void TableSchema::set_index_type(::google::protobuf::int32 value) { + + index_type_ = value; + // @@protoc_insertion_point(field_set:milvus.grpc.TableSchema.index_type) +} + +// int64 dimension = 3; +inline void TableSchema::clear_dimension() { + dimension_ = PROTOBUF_LONGLONG(0); +} +inline ::google::protobuf::int64 TableSchema::dimension() const { + // @@protoc_insertion_point(field_get:milvus.grpc.TableSchema.dimension) + return dimension_; +} +inline void TableSchema::set_dimension(::google::protobuf::int64 value) { + + dimension_ = value; + // @@protoc_insertion_point(field_set:milvus.grpc.TableSchema.dimension) +} + +// bool store_raw_vector = 4; +inline void TableSchema::clear_store_raw_vector() { + store_raw_vector_ = false; +} +inline bool TableSchema::store_raw_vector() const { + // @@protoc_insertion_point(field_get:milvus.grpc.TableSchema.store_raw_vector) + return store_raw_vector_; +} +inline void TableSchema::set_store_raw_vector(bool value) { + + store_raw_vector_ = value; + // @@protoc_insertion_point(field_set:milvus.grpc.TableSchema.store_raw_vector) +} + +// ------------------------------------------------------------------- + +// Range + +// string start_value = 1; +inline void Range::clear_start_value() { + start_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Range::start_value() const { + // @@protoc_insertion_point(field_get:milvus.grpc.Range.start_value) + return start_value_.GetNoArena(); +} +inline void Range::set_start_value(const ::std::string& value) { + + start_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.grpc.Range.start_value) +} +#if LANG_CXX11 +inline void Range::set_start_value(::std::string&& value) { + + start_value_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.Range.start_value) +} +#endif +inline void Range::set_start_value(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + start_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.grpc.Range.start_value) +} +inline void Range::set_start_value(const char* value, size_t size) { + + start_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.Range.start_value) +} +inline ::std::string* Range::mutable_start_value() { + + // @@protoc_insertion_point(field_mutable:milvus.grpc.Range.start_value) + return start_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Range::release_start_value() { + // @@protoc_insertion_point(field_release:milvus.grpc.Range.start_value) + + return start_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Range::set_allocated_start_value(::std::string* start_value) { + if (start_value != nullptr) { + + } else { + + } + start_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), start_value); + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.Range.start_value) +} + +// string end_value = 2; +inline void Range::clear_end_value() { + end_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Range::end_value() const { + // @@protoc_insertion_point(field_get:milvus.grpc.Range.end_value) + return end_value_.GetNoArena(); +} +inline void Range::set_end_value(const ::std::string& value) { + + end_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.grpc.Range.end_value) +} +#if LANG_CXX11 +inline void Range::set_end_value(::std::string&& value) { + + end_value_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.Range.end_value) +} +#endif +inline void Range::set_end_value(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + end_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.grpc.Range.end_value) +} +inline void Range::set_end_value(const char* value, size_t size) { + + end_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.Range.end_value) +} +inline ::std::string* Range::mutable_end_value() { + + // @@protoc_insertion_point(field_mutable:milvus.grpc.Range.end_value) + return end_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Range::release_end_value() { + // @@protoc_insertion_point(field_release:milvus.grpc.Range.end_value) + + return end_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Range::set_allocated_end_value(::std::string* end_value) { + if (end_value != nullptr) { + + } else { + + } + end_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), end_value); + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.Range.end_value) +} + +// ------------------------------------------------------------------- + +// RowRecord + +// repeated float vector_data = 1; +inline int RowRecord::vector_data_size() const { + return vector_data_.size(); +} +inline void RowRecord::clear_vector_data() { + vector_data_.Clear(); +} +inline float RowRecord::vector_data(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.RowRecord.vector_data) + return vector_data_.Get(index); +} +inline void RowRecord::set_vector_data(int index, float value) { + vector_data_.Set(index, value); + // @@protoc_insertion_point(field_set:milvus.grpc.RowRecord.vector_data) +} +inline void RowRecord::add_vector_data(float value) { + vector_data_.Add(value); + // @@protoc_insertion_point(field_add:milvus.grpc.RowRecord.vector_data) +} +inline const ::google::protobuf::RepeatedField< float >& +RowRecord::vector_data() const { + // @@protoc_insertion_point(field_list:milvus.grpc.RowRecord.vector_data) + return vector_data_; +} +inline ::google::protobuf::RepeatedField< float >* +RowRecord::mutable_vector_data() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.RowRecord.vector_data) + return &vector_data_; +} + +// ------------------------------------------------------------------- + +// InsertInfos + +// string table_name = 1; +inline void InsertInfos::clear_table_name() { + table_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& InsertInfos::table_name() const { + // @@protoc_insertion_point(field_get:milvus.grpc.InsertInfos.table_name) + return table_name_.GetNoArena(); +} +inline void InsertInfos::set_table_name(const ::std::string& value) { + + table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.grpc.InsertInfos.table_name) +} +#if LANG_CXX11 +inline void InsertInfos::set_table_name(::std::string&& value) { + + table_name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.InsertInfos.table_name) +} +#endif +inline void InsertInfos::set_table_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.grpc.InsertInfos.table_name) +} +inline void InsertInfos::set_table_name(const char* value, size_t size) { + + table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.InsertInfos.table_name) +} +inline ::std::string* InsertInfos::mutable_table_name() { + + // @@protoc_insertion_point(field_mutable:milvus.grpc.InsertInfos.table_name) + return table_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* InsertInfos::release_table_name() { + // @@protoc_insertion_point(field_release:milvus.grpc.InsertInfos.table_name) + + return table_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void InsertInfos::set_allocated_table_name(::std::string* table_name) { + if (table_name != nullptr) { + + } else { + + } + table_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), table_name); + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.InsertInfos.table_name) +} + +// repeated .milvus.grpc.RowRecord row_record_array = 2; +inline int InsertInfos::row_record_array_size() const { + return row_record_array_.size(); +} +inline void InsertInfos::clear_row_record_array() { + row_record_array_.Clear(); +} +inline ::milvus::grpc::RowRecord* InsertInfos::mutable_row_record_array(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.InsertInfos.row_record_array) + return row_record_array_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >* +InsertInfos::mutable_row_record_array() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.InsertInfos.row_record_array) + return &row_record_array_; +} +inline const ::milvus::grpc::RowRecord& InsertInfos::row_record_array(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.InsertInfos.row_record_array) + return row_record_array_.Get(index); +} +inline ::milvus::grpc::RowRecord* InsertInfos::add_row_record_array() { + // @@protoc_insertion_point(field_add:milvus.grpc.InsertInfos.row_record_array) + return row_record_array_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >& +InsertInfos::row_record_array() const { + // @@protoc_insertion_point(field_list:milvus.grpc.InsertInfos.row_record_array) + return row_record_array_; +} + +// ------------------------------------------------------------------- + +// VectorIds + +// .milvus.Status status = 1; +inline bool VectorIds::has_status() const { + return this != internal_default_instance() && status_ != nullptr; +} +inline const ::milvus::Status& VectorIds::status() const { + const ::milvus::Status* p = status_; + // @@protoc_insertion_point(field_get:milvus.grpc.VectorIds.status) + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::_Status_default_instance_); +} +inline ::milvus::Status* VectorIds::release_status() { + // @@protoc_insertion_point(field_release:milvus.grpc.VectorIds.status) + + ::milvus::Status* temp = status_; + status_ = nullptr; + return temp; +} +inline ::milvus::Status* VectorIds::mutable_status() { + + if (status_ == nullptr) { + auto* p = CreateMaybeMessage<::milvus::Status>(GetArenaNoVirtual()); + status_ = p; + } + // @@protoc_insertion_point(field_mutable:milvus.grpc.VectorIds.status) + return status_; +} +inline void VectorIds::set_allocated_status(::milvus::Status* status) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); + } + if (status) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + status = ::google::protobuf::internal::GetOwnedMessage( + message_arena, status, submessage_arena); + } + + } else { + + } + status_ = status; + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.VectorIds.status) +} + +// repeated int64 vector_id_array = 2; +inline int VectorIds::vector_id_array_size() const { + return vector_id_array_.size(); +} +inline void VectorIds::clear_vector_id_array() { + vector_id_array_.Clear(); +} +inline ::google::protobuf::int64 VectorIds::vector_id_array(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.VectorIds.vector_id_array) + return vector_id_array_.Get(index); +} +inline void VectorIds::set_vector_id_array(int index, ::google::protobuf::int64 value) { + vector_id_array_.Set(index, value); + // @@protoc_insertion_point(field_set:milvus.grpc.VectorIds.vector_id_array) +} +inline void VectorIds::add_vector_id_array(::google::protobuf::int64 value) { + vector_id_array_.Add(value); + // @@protoc_insertion_point(field_add:milvus.grpc.VectorIds.vector_id_array) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& +VectorIds::vector_id_array() const { + // @@protoc_insertion_point(field_list:milvus.grpc.VectorIds.vector_id_array) + return vector_id_array_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* +VectorIds::mutable_vector_id_array() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.VectorIds.vector_id_array) + return &vector_id_array_; +} + +// ------------------------------------------------------------------- + +// SearchVectorInfos + +// string table_name = 1; +inline void SearchVectorInfos::clear_table_name() { + table_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& SearchVectorInfos::table_name() const { + // @@protoc_insertion_point(field_get:milvus.grpc.SearchVectorInfos.table_name) + return table_name_.GetNoArena(); +} +inline void SearchVectorInfos::set_table_name(const ::std::string& value) { + + table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.grpc.SearchVectorInfos.table_name) +} +#if LANG_CXX11 +inline void SearchVectorInfos::set_table_name(::std::string&& value) { + + table_name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.SearchVectorInfos.table_name) +} +#endif +inline void SearchVectorInfos::set_table_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.grpc.SearchVectorInfos.table_name) +} +inline void SearchVectorInfos::set_table_name(const char* value, size_t size) { + + table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.SearchVectorInfos.table_name) +} +inline ::std::string* SearchVectorInfos::mutable_table_name() { + + // @@protoc_insertion_point(field_mutable:milvus.grpc.SearchVectorInfos.table_name) + return table_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* SearchVectorInfos::release_table_name() { + // @@protoc_insertion_point(field_release:milvus.grpc.SearchVectorInfos.table_name) + + return table_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void SearchVectorInfos::set_allocated_table_name(::std::string* table_name) { + if (table_name != nullptr) { + + } else { + + } + table_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), table_name); + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.SearchVectorInfos.table_name) +} + +// repeated .milvus.grpc.RowRecord query_record_array = 2; +inline int SearchVectorInfos::query_record_array_size() const { + return query_record_array_.size(); +} +inline void SearchVectorInfos::clear_query_record_array() { + query_record_array_.Clear(); +} +inline ::milvus::grpc::RowRecord* SearchVectorInfos::mutable_query_record_array(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.SearchVectorInfos.query_record_array) + return query_record_array_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >* +SearchVectorInfos::mutable_query_record_array() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.SearchVectorInfos.query_record_array) + return &query_record_array_; +} +inline const ::milvus::grpc::RowRecord& SearchVectorInfos::query_record_array(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.SearchVectorInfos.query_record_array) + return query_record_array_.Get(index); +} +inline ::milvus::grpc::RowRecord* SearchVectorInfos::add_query_record_array() { + // @@protoc_insertion_point(field_add:milvus.grpc.SearchVectorInfos.query_record_array) + return query_record_array_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >& +SearchVectorInfos::query_record_array() const { + // @@protoc_insertion_point(field_list:milvus.grpc.SearchVectorInfos.query_record_array) + return query_record_array_; +} + +// repeated .milvus.grpc.Range query_range_array = 3; +inline int SearchVectorInfos::query_range_array_size() const { + return query_range_array_.size(); +} +inline void SearchVectorInfos::clear_query_range_array() { + query_range_array_.Clear(); +} +inline ::milvus::grpc::Range* SearchVectorInfos::mutable_query_range_array(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.SearchVectorInfos.query_range_array) + return query_range_array_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::milvus::grpc::Range >* +SearchVectorInfos::mutable_query_range_array() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.SearchVectorInfos.query_range_array) + return &query_range_array_; +} +inline const ::milvus::grpc::Range& SearchVectorInfos::query_range_array(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.SearchVectorInfos.query_range_array) + return query_range_array_.Get(index); +} +inline ::milvus::grpc::Range* SearchVectorInfos::add_query_range_array() { + // @@protoc_insertion_point(field_add:milvus.grpc.SearchVectorInfos.query_range_array) + return query_range_array_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::Range >& +SearchVectorInfos::query_range_array() const { + // @@protoc_insertion_point(field_list:milvus.grpc.SearchVectorInfos.query_range_array) + return query_range_array_; +} + +// int64 topk = 4; +inline void SearchVectorInfos::clear_topk() { + topk_ = PROTOBUF_LONGLONG(0); +} +inline ::google::protobuf::int64 SearchVectorInfos::topk() const { + // @@protoc_insertion_point(field_get:milvus.grpc.SearchVectorInfos.topk) + return topk_; +} +inline void SearchVectorInfos::set_topk(::google::protobuf::int64 value) { + + topk_ = value; + // @@protoc_insertion_point(field_set:milvus.grpc.SearchVectorInfos.topk) +} + +// ------------------------------------------------------------------- + +// SearchVectorInFilesInfos + +// repeated string file_id_array = 1; +inline int SearchVectorInFilesInfos::file_id_array_size() const { + return file_id_array_.size(); +} +inline void SearchVectorInFilesInfos::clear_file_id_array() { + file_id_array_.Clear(); +} +inline const ::std::string& SearchVectorInFilesInfos::file_id_array(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.SearchVectorInFilesInfos.file_id_array) + return file_id_array_.Get(index); +} +inline ::std::string* SearchVectorInFilesInfos::mutable_file_id_array(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.SearchVectorInFilesInfos.file_id_array) + return file_id_array_.Mutable(index); +} +inline void SearchVectorInFilesInfos::set_file_id_array(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:milvus.grpc.SearchVectorInFilesInfos.file_id_array) + file_id_array_.Mutable(index)->assign(value); +} +#if LANG_CXX11 +inline void SearchVectorInFilesInfos::set_file_id_array(int index, ::std::string&& value) { + // @@protoc_insertion_point(field_set:milvus.grpc.SearchVectorInFilesInfos.file_id_array) + file_id_array_.Mutable(index)->assign(std::move(value)); +} +#endif +inline void SearchVectorInFilesInfos::set_file_id_array(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + file_id_array_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:milvus.grpc.SearchVectorInFilesInfos.file_id_array) +} +inline void SearchVectorInFilesInfos::set_file_id_array(int index, const char* value, size_t size) { + file_id_array_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.SearchVectorInFilesInfos.file_id_array) +} +inline ::std::string* SearchVectorInFilesInfos::add_file_id_array() { + // @@protoc_insertion_point(field_add_mutable:milvus.grpc.SearchVectorInFilesInfos.file_id_array) + return file_id_array_.Add(); +} +inline void SearchVectorInFilesInfos::add_file_id_array(const ::std::string& value) { + file_id_array_.Add()->assign(value); + // @@protoc_insertion_point(field_add:milvus.grpc.SearchVectorInFilesInfos.file_id_array) +} +#if LANG_CXX11 +inline void SearchVectorInFilesInfos::add_file_id_array(::std::string&& value) { + file_id_array_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:milvus.grpc.SearchVectorInFilesInfos.file_id_array) +} +#endif +inline void SearchVectorInFilesInfos::add_file_id_array(const char* value) { + GOOGLE_DCHECK(value != nullptr); + file_id_array_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:milvus.grpc.SearchVectorInFilesInfos.file_id_array) +} +inline void SearchVectorInFilesInfos::add_file_id_array(const char* value, size_t size) { + file_id_array_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:milvus.grpc.SearchVectorInFilesInfos.file_id_array) +} +inline const ::google::protobuf::RepeatedPtrField<::std::string>& +SearchVectorInFilesInfos::file_id_array() const { + // @@protoc_insertion_point(field_list:milvus.grpc.SearchVectorInFilesInfos.file_id_array) + return file_id_array_; +} +inline ::google::protobuf::RepeatedPtrField<::std::string>* +SearchVectorInFilesInfos::mutable_file_id_array() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.SearchVectorInFilesInfos.file_id_array) + return &file_id_array_; +} + +// .milvus.grpc.SearchVectorInfos search_vector_infos = 2; +inline bool SearchVectorInFilesInfos::has_search_vector_infos() const { + return this != internal_default_instance() && search_vector_infos_ != nullptr; +} +inline void SearchVectorInFilesInfos::clear_search_vector_infos() { + if (GetArenaNoVirtual() == nullptr && search_vector_infos_ != nullptr) { + delete search_vector_infos_; + } + search_vector_infos_ = nullptr; +} +inline const ::milvus::grpc::SearchVectorInfos& SearchVectorInFilesInfos::search_vector_infos() const { + const ::milvus::grpc::SearchVectorInfos* p = search_vector_infos_; + // @@protoc_insertion_point(field_get:milvus.grpc.SearchVectorInFilesInfos.search_vector_infos) + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::grpc::_SearchVectorInfos_default_instance_); +} +inline ::milvus::grpc::SearchVectorInfos* SearchVectorInFilesInfos::release_search_vector_infos() { + // @@protoc_insertion_point(field_release:milvus.grpc.SearchVectorInFilesInfos.search_vector_infos) + + ::milvus::grpc::SearchVectorInfos* temp = search_vector_infos_; + search_vector_infos_ = nullptr; + return temp; +} +inline ::milvus::grpc::SearchVectorInfos* SearchVectorInFilesInfos::mutable_search_vector_infos() { + + if (search_vector_infos_ == nullptr) { + auto* p = CreateMaybeMessage<::milvus::grpc::SearchVectorInfos>(GetArenaNoVirtual()); + search_vector_infos_ = p; + } + // @@protoc_insertion_point(field_mutable:milvus.grpc.SearchVectorInFilesInfos.search_vector_infos) + return search_vector_infos_; +} +inline void SearchVectorInFilesInfos::set_allocated_search_vector_infos(::milvus::grpc::SearchVectorInfos* search_vector_infos) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete search_vector_infos_; + } + if (search_vector_infos) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + search_vector_infos = ::google::protobuf::internal::GetOwnedMessage( + message_arena, search_vector_infos, submessage_arena); + } + + } else { + + } + search_vector_infos_ = search_vector_infos; + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.SearchVectorInFilesInfos.search_vector_infos) +} + +// ------------------------------------------------------------------- + +// QueryResult + +// int64 id = 1; +inline void QueryResult::clear_id() { + id_ = PROTOBUF_LONGLONG(0); +} +inline ::google::protobuf::int64 QueryResult::id() const { + // @@protoc_insertion_point(field_get:milvus.grpc.QueryResult.id) + return id_; +} +inline void QueryResult::set_id(::google::protobuf::int64 value) { + + id_ = value; + // @@protoc_insertion_point(field_set:milvus.grpc.QueryResult.id) +} + +// double distance = 2; +inline void QueryResult::clear_distance() { + distance_ = 0; +} +inline double QueryResult::distance() const { + // @@protoc_insertion_point(field_get:milvus.grpc.QueryResult.distance) + return distance_; +} +inline void QueryResult::set_distance(double value) { + + distance_ = value; + // @@protoc_insertion_point(field_set:milvus.grpc.QueryResult.distance) +} + +// ------------------------------------------------------------------- + +// TopKQueryResult + +// .milvus.Status status = 1; +inline bool TopKQueryResult::has_status() const { + return this != internal_default_instance() && status_ != nullptr; +} +inline const ::milvus::Status& TopKQueryResult::status() const { + const ::milvus::Status* p = status_; + // @@protoc_insertion_point(field_get:milvus.grpc.TopKQueryResult.status) + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::_Status_default_instance_); +} +inline ::milvus::Status* TopKQueryResult::release_status() { + // @@protoc_insertion_point(field_release:milvus.grpc.TopKQueryResult.status) + + ::milvus::Status* temp = status_; + status_ = nullptr; + return temp; +} +inline ::milvus::Status* TopKQueryResult::mutable_status() { + + if (status_ == nullptr) { + auto* p = CreateMaybeMessage<::milvus::Status>(GetArenaNoVirtual()); + status_ = p; + } + // @@protoc_insertion_point(field_mutable:milvus.grpc.TopKQueryResult.status) + return status_; +} +inline void TopKQueryResult::set_allocated_status(::milvus::Status* status) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); + } + if (status) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + status = ::google::protobuf::internal::GetOwnedMessage( + message_arena, status, submessage_arena); + } + + } else { + + } + status_ = status; + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.TopKQueryResult.status) +} + +// repeated .milvus.grpc.QueryResult query_result_arrays = 2; +inline int TopKQueryResult::query_result_arrays_size() const { + return query_result_arrays_.size(); +} +inline void TopKQueryResult::clear_query_result_arrays() { + query_result_arrays_.Clear(); +} +inline ::milvus::grpc::QueryResult* TopKQueryResult::mutable_query_result_arrays(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.TopKQueryResult.query_result_arrays) + return query_result_arrays_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::milvus::grpc::QueryResult >* +TopKQueryResult::mutable_query_result_arrays() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.TopKQueryResult.query_result_arrays) + return &query_result_arrays_; +} +inline const ::milvus::grpc::QueryResult& TopKQueryResult::query_result_arrays(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.TopKQueryResult.query_result_arrays) + return query_result_arrays_.Get(index); +} +inline ::milvus::grpc::QueryResult* TopKQueryResult::add_query_result_arrays() { + // @@protoc_insertion_point(field_add:milvus.grpc.TopKQueryResult.query_result_arrays) + return query_result_arrays_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::QueryResult >& +TopKQueryResult::query_result_arrays() const { + // @@protoc_insertion_point(field_list:milvus.grpc.TopKQueryResult.query_result_arrays) + return query_result_arrays_; +} + +// ------------------------------------------------------------------- + +// StringReply + +// .milvus.Status status = 1; +inline bool StringReply::has_status() const { + return this != internal_default_instance() && status_ != nullptr; +} +inline const ::milvus::Status& StringReply::status() const { + const ::milvus::Status* p = status_; + // @@protoc_insertion_point(field_get:milvus.grpc.StringReply.status) + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::_Status_default_instance_); +} +inline ::milvus::Status* StringReply::release_status() { + // @@protoc_insertion_point(field_release:milvus.grpc.StringReply.status) + + ::milvus::Status* temp = status_; + status_ = nullptr; + return temp; +} +inline ::milvus::Status* StringReply::mutable_status() { + + if (status_ == nullptr) { + auto* p = CreateMaybeMessage<::milvus::Status>(GetArenaNoVirtual()); + status_ = p; + } + // @@protoc_insertion_point(field_mutable:milvus.grpc.StringReply.status) + return status_; +} +inline void StringReply::set_allocated_status(::milvus::Status* status) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); + } + if (status) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + status = ::google::protobuf::internal::GetOwnedMessage( + message_arena, status, submessage_arena); + } + + } else { + + } + status_ = status; + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.StringReply.status) +} + +// string string_reply = 2; +inline void StringReply::clear_string_reply() { + string_reply_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& StringReply::string_reply() const { + // @@protoc_insertion_point(field_get:milvus.grpc.StringReply.string_reply) + return string_reply_.GetNoArena(); +} +inline void StringReply::set_string_reply(const ::std::string& value) { + + string_reply_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.grpc.StringReply.string_reply) +} +#if LANG_CXX11 +inline void StringReply::set_string_reply(::std::string&& value) { + + string_reply_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.StringReply.string_reply) +} +#endif +inline void StringReply::set_string_reply(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + string_reply_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.grpc.StringReply.string_reply) +} +inline void StringReply::set_string_reply(const char* value, size_t size) { + + string_reply_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.StringReply.string_reply) +} +inline ::std::string* StringReply::mutable_string_reply() { + + // @@protoc_insertion_point(field_mutable:milvus.grpc.StringReply.string_reply) + return string_reply_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* StringReply::release_string_reply() { + // @@protoc_insertion_point(field_release:milvus.grpc.StringReply.string_reply) + + return string_reply_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void StringReply::set_allocated_string_reply(::std::string* string_reply) { + if (string_reply != nullptr) { + + } else { + + } + string_reply_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_reply); + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.StringReply.string_reply) +} + +// ------------------------------------------------------------------- + +// BoolReply + +// .milvus.Status status = 1; +inline bool BoolReply::has_status() const { + return this != internal_default_instance() && status_ != nullptr; +} +inline const ::milvus::Status& BoolReply::status() const { + const ::milvus::Status* p = status_; + // @@protoc_insertion_point(field_get:milvus.grpc.BoolReply.status) + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::_Status_default_instance_); +} +inline ::milvus::Status* BoolReply::release_status() { + // @@protoc_insertion_point(field_release:milvus.grpc.BoolReply.status) + + ::milvus::Status* temp = status_; + status_ = nullptr; + return temp; +} +inline ::milvus::Status* BoolReply::mutable_status() { + + if (status_ == nullptr) { + auto* p = CreateMaybeMessage<::milvus::Status>(GetArenaNoVirtual()); + status_ = p; + } + // @@protoc_insertion_point(field_mutable:milvus.grpc.BoolReply.status) + return status_; +} +inline void BoolReply::set_allocated_status(::milvus::Status* status) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); + } + if (status) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + status = ::google::protobuf::internal::GetOwnedMessage( + message_arena, status, submessage_arena); + } + + } else { + + } + status_ = status; + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.BoolReply.status) +} + +// bool bool_reply = 2; +inline void BoolReply::clear_bool_reply() { + bool_reply_ = false; +} +inline bool BoolReply::bool_reply() const { + // @@protoc_insertion_point(field_get:milvus.grpc.BoolReply.bool_reply) + return bool_reply_; +} +inline void BoolReply::set_bool_reply(bool value) { + + bool_reply_ = value; + // @@protoc_insertion_point(field_set:milvus.grpc.BoolReply.bool_reply) +} + +// ------------------------------------------------------------------- + +// TableRowCount + +// .milvus.Status status = 1; +inline bool TableRowCount::has_status() const { + return this != internal_default_instance() && status_ != nullptr; +} +inline const ::milvus::Status& TableRowCount::status() const { + const ::milvus::Status* p = status_; + // @@protoc_insertion_point(field_get:milvus.grpc.TableRowCount.status) + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::_Status_default_instance_); +} +inline ::milvus::Status* TableRowCount::release_status() { + // @@protoc_insertion_point(field_release:milvus.grpc.TableRowCount.status) + + ::milvus::Status* temp = status_; + status_ = nullptr; + return temp; +} +inline ::milvus::Status* TableRowCount::mutable_status() { + + if (status_ == nullptr) { + auto* p = CreateMaybeMessage<::milvus::Status>(GetArenaNoVirtual()); + status_ = p; + } + // @@protoc_insertion_point(field_mutable:milvus.grpc.TableRowCount.status) + return status_; +} +inline void TableRowCount::set_allocated_status(::milvus::Status* status) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); + } + if (status) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + status = ::google::protobuf::internal::GetOwnedMessage( + message_arena, status, submessage_arena); + } + + } else { + + } + status_ = status; + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.TableRowCount.status) +} + +// int64 table_row_count = 2; +inline void TableRowCount::clear_table_row_count() { + table_row_count_ = PROTOBUF_LONGLONG(0); +} +inline ::google::protobuf::int64 TableRowCount::table_row_count() const { + // @@protoc_insertion_point(field_get:milvus.grpc.TableRowCount.table_row_count) + return table_row_count_; +} +inline void TableRowCount::set_table_row_count(::google::protobuf::int64 value) { + + table_row_count_ = value; + // @@protoc_insertion_point(field_set:milvus.grpc.TableRowCount.table_row_count) +} + +// ------------------------------------------------------------------- + +// Command + +// string cmd = 1; +inline void Command::clear_cmd() { + cmd_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Command::cmd() const { + // @@protoc_insertion_point(field_get:milvus.grpc.Command.cmd) + return cmd_.GetNoArena(); +} +inline void Command::set_cmd(const ::std::string& value) { + + cmd_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.grpc.Command.cmd) +} +#if LANG_CXX11 +inline void Command::set_cmd(::std::string&& value) { + + cmd_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.Command.cmd) +} +#endif +inline void Command::set_cmd(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + cmd_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.grpc.Command.cmd) +} +inline void Command::set_cmd(const char* value, size_t size) { + + cmd_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.Command.cmd) +} +inline ::std::string* Command::mutable_cmd() { + + // @@protoc_insertion_point(field_mutable:milvus.grpc.Command.cmd) + return cmd_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Command::release_cmd() { + // @@protoc_insertion_point(field_release:milvus.grpc.Command.cmd) + + return cmd_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Command::set_allocated_cmd(::std::string* cmd) { + if (cmd != nullptr) { + + } else { + + } + cmd_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), cmd); + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.Command.cmd) +} + +// ------------------------------------------------------------------- + +// ServerStatus + +// .milvus.Status status = 1; +inline bool ServerStatus::has_status() const { + return this != internal_default_instance() && status_ != nullptr; +} +inline const ::milvus::Status& ServerStatus::status() const { + const ::milvus::Status* p = status_; + // @@protoc_insertion_point(field_get:milvus.grpc.ServerStatus.status) + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::_Status_default_instance_); +} +inline ::milvus::Status* ServerStatus::release_status() { + // @@protoc_insertion_point(field_release:milvus.grpc.ServerStatus.status) + + ::milvus::Status* temp = status_; + status_ = nullptr; + return temp; +} +inline ::milvus::Status* ServerStatus::mutable_status() { + + if (status_ == nullptr) { + auto* p = CreateMaybeMessage<::milvus::Status>(GetArenaNoVirtual()); + status_ = p; + } + // @@protoc_insertion_point(field_mutable:milvus.grpc.ServerStatus.status) + return status_; +} +inline void ServerStatus::set_allocated_status(::milvus::Status* status) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); + } + if (status) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + status = ::google::protobuf::internal::GetOwnedMessage( + message_arena, status, submessage_arena); + } + + } else { + + } + status_ = status; + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.ServerStatus.status) +} + +// string info = 2; +inline void ServerStatus::clear_info() { + info_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ServerStatus::info() const { + // @@protoc_insertion_point(field_get:milvus.grpc.ServerStatus.info) + return info_.GetNoArena(); +} +inline void ServerStatus::set_info(const ::std::string& value) { + + info_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.grpc.ServerStatus.info) +} +#if LANG_CXX11 +inline void ServerStatus::set_info(::std::string&& value) { + + info_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.ServerStatus.info) +} +#endif +inline void ServerStatus::set_info(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + info_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.grpc.ServerStatus.info) +} +inline void ServerStatus::set_info(const char* value, size_t size) { + + info_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.ServerStatus.info) +} +inline ::std::string* ServerStatus::mutable_info() { + + // @@protoc_insertion_point(field_mutable:milvus.grpc.ServerStatus.info) + return info_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ServerStatus::release_info() { + // @@protoc_insertion_point(field_release:milvus.grpc.ServerStatus.info) + + return info_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ServerStatus::set_allocated_info(::std::string* info) { + if (info != nullptr) { + + } else { + + } + info_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), info); + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.ServerStatus.info) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace grpc +} // namespace milvus + +// @@protoc_insertion_point(global_scope) + +#include +#endif // PROTOBUF_INCLUDED_milvus_2eproto diff --git a/cpp/src/grpc/gen-status/status.grpc.pb.cc b/cpp/src/grpc/gen-status/status.grpc.pb.cc new file mode 100644 index 0000000000..2e8c230b82 --- /dev/null +++ b/cpp/src/grpc/gen-status/status.grpc.pb.cc @@ -0,0 +1,22 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: status.proto + +#include "status.pb.h" +#include "status.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace milvus { + +} // namespace milvus + diff --git a/cpp/src/grpc/gen-status/status.grpc.pb.h b/cpp/src/grpc/gen-status/status.grpc.pb.h new file mode 100644 index 0000000000..81831c6f2a --- /dev/null +++ b/cpp/src/grpc/gen-status/status.grpc.pb.h @@ -0,0 +1,35 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: status.proto +#ifndef GRPC_status_2eproto__INCLUDED +#define GRPC_status_2eproto__INCLUDED + +#include "status.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace grpc { +class CompletionQueue; +class Channel; +class ServerCompletionQueue; +class ServerContext; +} // namespace grpc + +namespace milvus { + +} // namespace milvus + + +#endif // GRPC_status_2eproto__INCLUDED diff --git a/cpp/src/grpc/gen-status/status.pb.cc b/cpp/src/grpc/gen-status/status.pb.cc new file mode 100644 index 0000000000..b213dbb062 --- /dev/null +++ b/cpp/src/grpc/gen-status/status.pb.cc @@ -0,0 +1,494 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: status.proto + +#include "status.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +namespace milvus { +class StatusDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _Status_default_instance_; +} // namespace milvus +static void InitDefaultsStatus_status_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::_Status_default_instance_; + new (ptr) ::milvus::Status(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::Status::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_Status_status_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsStatus_status_2eproto}, {}}; + +void InitDefaults_status_2eproto() { + ::google::protobuf::internal::InitSCC(&scc_info_Status_status_2eproto.base); +} + +::google::protobuf::Metadata file_level_metadata_status_2eproto[1]; +const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors_status_2eproto[1]; +constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_status_2eproto = nullptr; + +const ::google::protobuf::uint32 TableStruct_status_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::Status, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::Status, error_code_), + PROTOBUF_FIELD_OFFSET(::milvus::Status, reason_), +}; +static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::milvus::Status)}, +}; + +static ::google::protobuf::Message const * const file_default_instances[] = { + reinterpret_cast(&::milvus::_Status_default_instance_), +}; + +::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_status_2eproto = { + {}, AddDescriptors_status_2eproto, "status.proto", schemas, + file_default_instances, TableStruct_status_2eproto::offsets, + file_level_metadata_status_2eproto, 1, file_level_enum_descriptors_status_2eproto, file_level_service_descriptors_status_2eproto, +}; + +const char descriptor_table_protodef_status_2eproto[] = + "\n\014status.proto\022\006milvus\"\?\n\006Status\022%\n\nerro" + "r_code\030\001 \001(\0162\021.milvus.ErrorCode\022\016\n\006reaso" + "n\030\002 \001(\t*\354\003\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\024\n\020TABLE_NOT_EXISTS\020" + "\004\022\024\n\020ILLEGAL_ARGUMENT\020\005\022\021\n\rILLEGAL_RANGE" + "\020\006\022\025\n\021ILLEGAL_DIMENSION\020\007\022\026\n\022ILLEGAL_IND" + "EX_TYPE\020\010\022\026\n\022ILLEGAL_TABLE_NAME\020\t\022\020\n\014ILL" + "EGAL_TOPK\020\n\022\025\n\021ILLEGAL_ROWRECORD\020\013\022\025\n\021IL" + "LEGAL_VECTOR_ID\020\014\022\031\n\025ILLEGAL_SEARCH_RESU" + "LT\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_FOL" + "DER\020\021\022\026\n\022CANNOT_CREATE_FILE\020\022\022\030\n\024CANNOT_" + "DELETE_FOLDER\020\023\022\026\n\022CANNOT_DELETE_FILE\020\024\022" + "\025\n\021BUILD_INDEX_ERROR\020\025b\006proto3" + ; +::google::protobuf::internal::DescriptorTable descriptor_table_status_2eproto = { + false, InitDefaults_status_2eproto, + descriptor_table_protodef_status_2eproto, + "status.proto", &assign_descriptors_table_status_2eproto, 590, +}; + +void AddDescriptors_status_2eproto() { + static constexpr ::google::protobuf::internal::InitFunc deps[1] = + { + }; + ::google::protobuf::internal::AddDescriptors(&descriptor_table_status_2eproto, deps, 0); +} + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_status_2eproto = []() { AddDescriptors_status_2eproto(); return true; }(); +namespace milvus { +const ::google::protobuf::EnumDescriptor* ErrorCode_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_status_2eproto); + return file_level_enum_descriptors_status_2eproto[0]; +} +bool ErrorCode_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + return true; + default: + return false; + } +} + + +// =================================================================== + +void Status::InitAsDefaultInstance() { +} +class Status::HasBitSetters { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int Status::kErrorCodeFieldNumber; +const int Status::kReasonFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +Status::Status() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.Status) +} +Status::Status(const Status& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + reason_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.reason().size() > 0) { + reason_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reason_); + } + error_code_ = from.error_code_; + // @@protoc_insertion_point(copy_constructor:milvus.Status) +} + +void Status::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_Status_status_2eproto.base); + reason_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_code_ = 0; +} + +Status::~Status() { + // @@protoc_insertion_point(destructor:milvus.Status) + SharedDtor(); +} + +void Status::SharedDtor() { + reason_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void Status::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Status& Status::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_Status_status_2eproto.base); + return *internal_default_instance(); +} + + +void Status::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.Status) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + reason_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_code_ = 0; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* Status::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // .milvus.ErrorCode error_code = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; + ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); + msg->set_error_code(static_cast<::milvus::ErrorCode>(val)); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + break; + } + // string reason = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("milvus.Status.reason"); + object = msg->mutable_reason(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool Status::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.Status) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // .milvus.ErrorCode error_code = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + int value = 0; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + set_error_code(static_cast< ::milvus::ErrorCode >(value)); + } else { + goto handle_unusual; + } + break; + } + + // string reason = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_reason())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->reason().data(), static_cast(this->reason().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "milvus.Status.reason")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.Status) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.Status) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void Status::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.Status) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.ErrorCode error_code = 1; + if (this->error_code() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->error_code(), output); + } + + // string reason = 2; + if (this->reason().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->reason().data(), static_cast(this->reason().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.Status.reason"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->reason(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.Status) +} + +::google::protobuf::uint8* Status::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.Status) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.ErrorCode error_code = 1; + if (this->error_code() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->error_code(), target); + } + + // string reason = 2; + if (this->reason().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->reason().data(), static_cast(this->reason().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "milvus.Status.reason"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->reason(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.Status) + return target; +} + +size_t Status::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.Status) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string reason = 2; + if (this->reason().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->reason()); + } + + // .milvus.ErrorCode error_code = 1; + if (this->error_code() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->error_code()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Status::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.Status) + GOOGLE_DCHECK_NE(&from, this); + const Status* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.Status) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.Status) + MergeFrom(*source); + } +} + +void Status::MergeFrom(const Status& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.Status) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.reason().size() > 0) { + + reason_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reason_); + } + if (from.error_code() != 0) { + set_error_code(from.error_code()); + } +} + +void Status::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.Status) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Status::CopyFrom(const Status& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.Status) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Status::IsInitialized() const { + return true; +} + +void Status::Swap(Status* other) { + if (other == this) return; + InternalSwap(other); +} +void Status::InternalSwap(Status* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + reason_.Swap(&other->reason_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(error_code_, other->error_code_); +} + +::google::protobuf::Metadata Status::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_status_2eproto); + return ::file_level_metadata_status_2eproto[kIndexInFileMessages]; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace milvus +namespace google { +namespace protobuf { +template<> PROTOBUF_NOINLINE ::milvus::Status* Arena::CreateMaybeMessage< ::milvus::Status >(Arena* arena) { + return Arena::CreateInternal< ::milvus::Status >(arena); +} +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) +#include diff --git a/cpp/src/grpc/gen-status/status.pb.h b/cpp/src/grpc/gen-status/status.pb.h new file mode 100644 index 0000000000..5ff3d740c4 --- /dev/null +++ b/cpp/src/grpc/gen-status/status.pb.h @@ -0,0 +1,333 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: status.proto + +#ifndef PROTOBUF_INCLUDED_status_2eproto +#define PROTOBUF_INCLUDED_status_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3007000 +#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 3007000 < 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_status_2eproto + +// Internal implementation detail -- do not use these members. +struct TableStruct_status_2eproto { + static const ::google::protobuf::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::google::protobuf::internal::ParseTable schema[1] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; + static const ::google::protobuf::uint32 offsets[]; +}; +void AddDescriptors_status_2eproto(); +namespace milvus { +class Status; +class StatusDefaultTypeInternal; +extern StatusDefaultTypeInternal _Status_default_instance_; +} // namespace milvus +namespace google { +namespace protobuf { +template<> ::milvus::Status* Arena::CreateMaybeMessage<::milvus::Status>(Arena*); +} // namespace protobuf +} // namespace google +namespace milvus { + +enum ErrorCode { + SUCCESS = 0, + UNEXPECTED_ERROR = 1, + CONNECT_FAILED = 2, + PERMISSION_DENIED = 3, + TABLE_NOT_EXISTS = 4, + ILLEGAL_ARGUMENT = 5, + ILLEGAL_RANGE = 6, + ILLEGAL_DIMENSION = 7, + ILLEGAL_INDEX_TYPE = 8, + ILLEGAL_TABLE_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, + ErrorCode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::min(), + ErrorCode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::max() +}; +bool ErrorCode_IsValid(int value); +const ErrorCode ErrorCode_MIN = SUCCESS; +const ErrorCode ErrorCode_MAX = BUILD_INDEX_ERROR; +const int ErrorCode_ARRAYSIZE = ErrorCode_MAX + 1; + +const ::google::protobuf::EnumDescriptor* ErrorCode_descriptor(); +inline const ::std::string& ErrorCode_Name(ErrorCode value) { + return ::google::protobuf::internal::NameOfEnum( + ErrorCode_descriptor(), value); +} +inline bool ErrorCode_Parse( + const ::std::string& name, ErrorCode* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ErrorCode_descriptor(), name, value); +} +// =================================================================== + +class Status final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.Status) */ { + public: + Status(); + virtual ~Status(); + + Status(const Status& from); + + inline Status& operator=(const Status& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + Status(Status&& from) noexcept + : Status() { + *this = ::std::move(from); + } + + inline Status& operator=(Status&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const Status& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Status* internal_default_instance() { + return reinterpret_cast( + &_Status_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + void Swap(Status* other); + friend void swap(Status& a, Status& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline Status* New() const final { + return CreateMaybeMessage(nullptr); + } + + Status* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const Status& from); + void MergeFrom(const Status& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Status* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string reason = 2; + void clear_reason(); + static const int kReasonFieldNumber = 2; + const ::std::string& reason() const; + void set_reason(const ::std::string& value); + #if LANG_CXX11 + void set_reason(::std::string&& value); + #endif + void set_reason(const char* value); + void set_reason(const char* value, size_t size); + ::std::string* mutable_reason(); + ::std::string* release_reason(); + void set_allocated_reason(::std::string* reason); + + // .milvus.ErrorCode error_code = 1; + void clear_error_code(); + static const int kErrorCodeFieldNumber = 1; + ::milvus::ErrorCode error_code() const; + void set_error_code(::milvus::ErrorCode value); + + // @@protoc_insertion_point(class_scope:milvus.Status) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr reason_; + int error_code_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_status_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Status + +// .milvus.ErrorCode error_code = 1; +inline void Status::clear_error_code() { + error_code_ = 0; +} +inline ::milvus::ErrorCode Status::error_code() const { + // @@protoc_insertion_point(field_get:milvus.Status.error_code) + return static_cast< ::milvus::ErrorCode >(error_code_); +} +inline void Status::set_error_code(::milvus::ErrorCode value) { + + error_code_ = value; + // @@protoc_insertion_point(field_set:milvus.Status.error_code) +} + +// string reason = 2; +inline void Status::clear_reason() { + reason_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Status::reason() const { + // @@protoc_insertion_point(field_get:milvus.Status.reason) + return reason_.GetNoArena(); +} +inline void Status::set_reason(const ::std::string& value) { + + reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.Status.reason) +} +#if LANG_CXX11 +inline void Status::set_reason(::std::string&& value) { + + reason_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.Status.reason) +} +#endif +inline void Status::set_reason(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.Status.reason) +} +inline void Status::set_reason(const char* value, size_t size) { + + reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.Status.reason) +} +inline ::std::string* Status::mutable_reason() { + + // @@protoc_insertion_point(field_mutable:milvus.Status.reason) + return reason_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Status::release_reason() { + // @@protoc_insertion_point(field_release:milvus.Status.reason) + + return reason_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Status::set_allocated_reason(::std::string* reason) { + if (reason != nullptr) { + + } else { + + } + reason_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), reason); + // @@protoc_insertion_point(field_set_allocated:milvus.Status.reason) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace milvus + +namespace google { +namespace protobuf { + +template <> struct is_proto_enum< ::milvus::ErrorCode> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::milvus::ErrorCode>() { + return ::milvus::ErrorCode_descriptor(); +} + +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) + +#include +#endif // PROTOBUF_INCLUDED_status_2eproto diff --git a/cpp/src/grpc/milvus.proto b/cpp/src/grpc/milvus.proto new file mode 100644 index 0000000000..d81a286789 --- /dev/null +++ b/cpp/src/grpc/milvus.proto @@ -0,0 +1,250 @@ +syntax = "proto3"; + +import "status.proto"; + +package milvus.grpc; + +/** + * @brief Table Name + */ +message TableName { + milvus.Status status = 1; + string table_name = 2; +} + +/** + * @brief Table Schema + */ +message TableSchema { + TableName table_name = 1; + int32 index_type = 2; + int64 dimension = 3; + bool store_raw_vector = 4; +} + +/** + * @brief Range Schema + */ +message Range { + string start_value = 1; + string end_value = 2; +} + +/** + * @brief Record inserted + */ +message RowRecord { + repeated float vector_data = 1; //binary in thrift +} + +/** + * @brief Infos to be inserted + */ +message InsertInfos { + string table_name = 1; + repeated RowRecord row_record_array = 2; +} + +/** + * @brief Vector ids + */ +message VectorIds { + milvus.Status status = 1; + repeated int64 vector_id_array = 2; +} + +/** + * @brief Infos for searching vector + */ +message SearchVectorInfos { + string table_name = 1; + repeated RowRecord query_record_array = 2; + repeated Range query_range_array = 3; + int64 topk = 4; +} + +/** + * @brief Infos for searching vector in files + */ +message SearchVectorInFilesInfos { + repeated string file_id_array = 1; + SearchVectorInfos search_vector_infos = 2; +} + +/** + * @brief Query result infos + */ +message QueryResult { + int64 id = 1; + double distance = 2; +} + +/** + * @brief TopK query result + */ +message TopKQueryResult { + milvus.Status status = 1; + repeated QueryResult query_result_arrays = 2; +} + +/** + * @brief Server String Reply + */ +message StringReply { + milvus.Status status = 1; + string string_reply = 2; +} + +/** + * @brief Server bool Reply + */ +message BoolReply { + milvus.Status status = 1; + bool bool_reply = 2; +} + +/** + * @brief Return table row count + */ +message TableRowCount { + milvus.Status status = 1; + int64 table_row_count = 2; +} + +/** + * @brief Give Server Command + */ +message Command { + string cmd = 1; +} + +/** + * @brief Give Server Command + */ +message ServerStatus{ + milvus.Status status = 1; + string info = 2; +} + +service MilvusService { + /** + * @brief Create table method + * + * This method is used to create table + * + * @param param, use to provide table information to be created. + * + */ + rpc CreateTable(TableSchema) returns (milvus.Status){} + + /** + * @brief Test table existence method + * + * This method is used to test table existence. + * + * @param table_name, table name is going to be tested. + * + */ + rpc HasTable(TableName) returns (BoolReply) {} + + /** + * @brief Delete table method + * + * This method is used to delete table. + * + * @param table_name, table name is going to be deleted. + * + */ + rpc DropTable(TableName) returns (milvus.Status) {} + + /** + * @brief Build index by table method + * + * This method is used to build index by table in sync mode. + * + * @param table_name, table is going to be built index. + * + */ + rpc BuildIndex(TableName) returns (milvus.Status) {} + + /** + * @brief Add vector array to table + * + * This method is used to add vector array to table. + * + * @param table_name, table_name is inserted. + * @param record_array, vector array is inserted. + * + * @return vector id array + */ + rpc InsertVector(InsertInfos) returns (VectorIds) {} + + /** + * @brief Query vector + * + * This method is used to query vector in table. + * + * @param table_name, table_name is queried. + * @param query_record_array, all vector are going to be queried. + * @param query_range_array, optional ranges for conditional search. If not specified, search whole table + * @param topk, how many similarity vectors will be searched. + * + * @return query result array. + */ + rpc SearchVector(SearchVectorInfos) returns (stream TopKQueryResult) {} + + /** + * @brief Internal use query interface + * + * This method is used to query vector in specified files. + * + * @param file_id_array, specified files id array, queried. + * @param query_record_array, all vector are going to be queried. + * @param query_range_array, optional ranges for conditional search. If not specified, search whole table + * @param topk, how many similarity vectors will be searched. + * + * @return query result array. + */ + rpc SearchVectorInFiles(SearchVectorInFilesInfos) returns (stream TopKQueryResult) {} + + /** + * @brief Get table schema + * + * This method is used to get table schema. + * + * @param table_name, target table name. + * + * @return table schema + */ + rpc DescribeTable(TableName) returns (TableSchema) {} + + /** + * @brief Get table schema + * + * This method is used to get table schema. + * + * @param table_name, target table name. + * + * @return table schema + */ + rpc GetTableRowCount(TableName) returns (TableRowCount) {} + + /** + * @brief List all tables in database + * + * This method is used to list all tables. + * + * + * @return table names. + */ + rpc ShowTables(Command) returns (stream TableName) {} + + /** + * @brief Give the server status + * + * This method is used to give the server status. + * + * @return Server status. + */ + rpc Ping(Command) returns (ServerStatus) {} +} diff --git a/cpp/src/grpc/status.proto b/cpp/src/grpc/status.proto new file mode 100644 index 0000000000..6502f841b9 --- /dev/null +++ b/cpp/src/grpc/status.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; + +package milvus; + +enum ErrorCode { + SUCCESS = 0; + UNEXPECTED_ERROR = 1; + CONNECT_FAILED = 2; + PERMISSION_DENIED = 3; + TABLE_NOT_EXISTS = 4; + ILLEGAL_ARGUMENT = 5; + ILLEGAL_RANGE = 6; + ILLEGAL_DIMENSION = 7; + ILLEGAL_INDEX_TYPE = 8; + ILLEGAL_TABLE_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; +} + +message Status { + ErrorCode error_code = 1; + string reason = 2; +} \ No newline at end of file diff --git a/cpp/src/grpcsdk/CMakeLists.txt b/cpp/src/grpcsdk/CMakeLists.txt new file mode 100644 index 0000000000..2facdf28fa --- /dev/null +++ b/cpp/src/grpcsdk/CMakeLists.txt @@ -0,0 +1,38 @@ +#------------------------------------------------------------------------------- +# Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +# Unauthorized copying of this file, via any medium is strictly prohibited. +# Proprietary and confidential. +#------------------------------------------------------------------------------- + +aux_source_directory(src/interface interface_files) +aux_source_directory(src/client client_files) +aux_source_directory(src/util util_files) + +include_directories(src) +include_directories(include) +include_directories(/usr/include) +include_directories(${CMAKE_SOURCE_DIR}/src/grpc/gen-milvus) +include_directories(${CMAKE_SOURCE_DIR}/src/grpc/gen-status) +include_directories(/usr/local/include) + +set(service_files + ${CMAKE_SOURCE_DIR}/src/grpc/gen-milvus/milvus.grpc.pb.cc + ${CMAKE_SOURCE_DIR}/src/grpc/gen-milvus/milvus.pb.cc + ${CMAKE_SOURCE_DIR}/src/grpc/gen-status/status.grpc.pb.cc + ${CMAKE_SOURCE_DIR}/src/grpc/gen-status/status.pb.cc + ) + +add_library(milvus_grpc_sdk STATIC + ${interface_files} + ${client_files} + ${util_files} + ${service_files} + ) + +target_link_libraries(milvus_grpc_sdk + ${third_party_libs} + ) + +add_subdirectory(examples) + +install(TARGETS milvus_grpc_sdk DESTINATION lib) diff --git a/cpp/src/grpcsdk/examples/CMakeLists.txt b/cpp/src/grpcsdk/examples/CMakeLists.txt new file mode 100644 index 0000000000..6c4b9f0912 --- /dev/null +++ b/cpp/src/grpcsdk/examples/CMakeLists.txt @@ -0,0 +1,24 @@ +#------------------------------------------------------------------------------- +# Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +# Unauthorized copying of this file, via any medium is strictly prohibited. +# Proprietary and confidential. +#------------------------------------------------------------------------------- + +aux_source_directory(src src_files) + +include_directories(src) +include_directories(../include) + +link_directories(${CMAKE_BINARY_DIR}) + +add_executable(grpc_sdk_simple + ./main.cpp + ${src_files} + ) + +target_link_libraries(grpc_sdk_simple + milvus_grpc_sdk + pthread + ) + +install(TARGETS grpc_sdk_simple DESTINATION bin) diff --git a/cpp/src/grpcsdk/examples/main.cpp b/cpp/src/grpcsdk/examples/main.cpp new file mode 100644 index 0000000000..499b8a9935 --- /dev/null +++ b/cpp/src/grpcsdk/examples/main.cpp @@ -0,0 +1,68 @@ +//////////////////////////////////////////////////////////////////////////////// +// Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +// Unauthorized copying of this file, via any medium is strictly prohibited. +// Proprietary and confidential. +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include + +#include "src/ClientTest.h" + +void print_help(const std::string &app_name); + + +int +main(int argc, char *argv[]) { + printf("Client start...\n"); + + std::string app_name = basename(argv[0]); + static struct option long_options[] = {{"server", optional_argument, 0, 's'}, + {"port", optional_argument, 0, 'p'}, + {"help", no_argument, 0, 'h'}, + {NULL, 0, 0, 0}}; + + int option_index = 0; + std::string address = "127.0.0.1", port = "19530"; + app_name = argv[0]; + + int value; + while ((value = getopt_long(argc, argv, "s:p:h", long_options, &option_index)) != -1) { + switch (value) { + case 's': { + char *address_ptr = strdup(optarg); + address = address_ptr; + free(address_ptr); + break; + } + case 'p': { + char *port_ptr = strdup(optarg); + port = port_ptr; + free(port_ptr); + break; + } + case 'h': + default: + print_help(app_name); + return EXIT_SUCCESS; + } + } + + ClientTest test; + test.Test(address, port); + + printf("Client stop...\n"); + return 0; +} + +void +print_help(const std::string &app_name) { + printf("\n Usage: %s [OPTIONS]\n\n", app_name.c_str()); + printf(" Options:\n"); + printf(" -s --server Server address, default 127.0.0.1\n"); + printf(" -p --port Server port, default 19530\n"); + printf(" -h --help Print help information\n"); + printf("\n"); +} \ No newline at end of file diff --git a/cpp/src/grpcsdk/examples/src/ClientTest.cpp b/cpp/src/grpcsdk/examples/src/ClientTest.cpp new file mode 100644 index 0000000000..0038894ecf --- /dev/null +++ b/cpp/src/grpcsdk/examples/src/ClientTest.cpp @@ -0,0 +1,291 @@ +/******************************************************************************* + * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited. + * Proprietary and confidential. + ******************************************************************************/ +#include "ClientTest.h" +#include "MilvusApi.h" + +#include +#include +#include +#include +#include + +using namespace ::zilliz::milvus; + +namespace { + std::string GetTableName(); + + static const std::string TABLE_NAME = GetTableName(); + static constexpr int64_t TABLE_DIMENSION = 512; + static constexpr int64_t BATCH_ROW_COUNT = 100000; + static constexpr int64_t NQ = 10; + static constexpr int64_t TOP_K = 10; + static constexpr int64_t SEARCH_TARGET = 5000; //change this value, result is different + static constexpr int64_t ADD_VECTOR_LOOP = 5; + static constexpr int64_t SECONDS_EACH_HOUR = 3600; + +#define BLOCK_SPLITER std::cout << "===========================================" << std::endl; + + void PrintTableSchema(const TableSchema& tb_schema) { + BLOCK_SPLITER + std::cout << "Table name: " << tb_schema.table_name.table_name << std::endl; + std::cout << "Table index type: " << (int)tb_schema.index_type << std::endl; + std::cout << "Table dimension: " << tb_schema.dimension << std::endl; + std::cout << "Table store raw data: " << (tb_schema.store_raw_vector ? "true" : "false") << std::endl; + BLOCK_SPLITER + } + + void PrintSearchResult(const std::vector>& search_record_array, + const std::vector& topk_query_result_array) { + BLOCK_SPLITER + std::cout << "Returned result count: " << topk_query_result_array.size() << std::endl; + + int32_t index = 0; + for(auto& result : topk_query_result_array) { + auto search_id = search_record_array[index].first; + index++; + std::cout << "No." << std::to_string(index) << " vector " << std::to_string(search_id) + << " top " << std::to_string(result.query_result_arrays.size()) + << " search result:" << std::endl; + for(auto& item : result.query_result_arrays) { + std::cout << "\t" << std::to_string(item.id) << "\tdistance:" << std::to_string(item.distance); + std::cout << std::endl; + } + } + + BLOCK_SPLITER + } + + std::string CurrentTime() { + time_t tt; + time( &tt ); + tt = tt + 8*SECONDS_EACH_HOUR; + tm* t= gmtime( &tt ); + + std::string str = std::to_string(t->tm_year + 1900) + "_" + std::to_string(t->tm_mon + 1) + + "_" + std::to_string(t->tm_mday) + "_" + std::to_string(t->tm_hour) + + "_" + std::to_string(t->tm_min) + "_" + std::to_string(t->tm_sec); + + return str; + } + + std::string CurrentTmDate(int64_t offset_day = 0) { + time_t tt; + time( &tt ); + tt = tt + 8*SECONDS_EACH_HOUR; + tt = tt + 24*SECONDS_EACH_HOUR*offset_day; + tm* t= gmtime( &tt ); + + std::string str = std::to_string(t->tm_year + 1900) + "-" + std::to_string(t->tm_mon + 1) + + "-" + std::to_string(t->tm_mday); + + return str; + } + + std::string GetTableName() { + static std::string s_id(CurrentTime()); + return "tbl_" + s_id; + } + + TableSchema BuildTableSchema() { + TableSchema tb_schema; + tb_schema.table_name.table_name = TABLE_NAME; + tb_schema.index_type = IndexType::gpu_ivfflat; + tb_schema.dimension = TABLE_DIMENSION; + tb_schema.store_raw_vector = true; + + return tb_schema; + } + + void BuildVectors(int64_t from, int64_t to, + std::vector& vector_record_array) { + if(to <= from){ + return; + } + + vector_record_array.clear(); + for (int64_t k = from; k < to; k++) { + RowRecord record; + record.data.resize(TABLE_DIMENSION); + for(int64_t i = 0; i < TABLE_DIMENSION; i++) { + record.data[i] = (float)(k%(i+1)); + } + + vector_record_array.emplace_back(record); + } + } + + void Sleep(int seconds) { + std::cout << "Waiting " << seconds << " seconds ..." << std::endl; + sleep(seconds); + } + + class TimeRecorder { + public: + TimeRecorder(const std::string& title) + : title_(title) { + start_ = std::chrono::system_clock::now(); + } + + ~TimeRecorder() { + std::chrono::system_clock::time_point end = std::chrono::system_clock::now(); + long span = (std::chrono::duration_cast (end - start_)).count(); + std::cout << title_ << " totally cost: " << span << " ms" << std::endl; + } + + private: + std::string title_; + std::chrono::system_clock::time_point start_; + }; + + void CheckResult(const std::vector>& search_record_array, + const std::vector& topk_query_result_array) { + BLOCK_SPLITER + int64_t index = 0; + for(auto& result : topk_query_result_array) { + auto result_id = result.query_result_arrays[0].id; + auto search_id = search_record_array[index++].first; + if(result_id != search_id) { + std::cout << "The top 1 result is wrong: " << result_id + << " vs. " << search_id << std::endl; + } else { + std::cout << "Check result sucessfully" << std::endl; + } + } + BLOCK_SPLITER + } + + void DoSearch(std::shared_ptr conn, + const std::vector>& search_record_array, + const std::string& phase_name) { + std::vector query_range_array; + Range rg; + rg.start_value = CurrentTmDate(); + rg.end_value = CurrentTmDate(1); + query_range_array.emplace_back(rg); + + std::vector record_array; + for(auto& pair : search_record_array) { + record_array.push_back(pair.second); + } + + std::vector topk_query_result_array; + { + TimeRecorder rc(phase_name); + Status stat = conn->SearchVector(TABLE_NAME, record_array, query_range_array, TOP_K, topk_query_result_array); + std::cout << "SearchVector function call status: " << stat.ToString() << std::endl; + } + + PrintSearchResult(search_record_array, topk_query_result_array); + CheckResult(search_record_array, topk_query_result_array); + } +} + +void +ClientTest::Test(const std::string& address, const std::string& port) { + std::shared_ptr conn = Connection::Create(); + + {//connect server + ConnectParam param = {address, port}; + Status stat = conn->Connect(param); + std::cout << "Connect function call status: " << stat.ToString() << std::endl; + } + + {//server version + std::string version = conn->ServerVersion(); + std::cout << "Server version: " << version << std::endl; + } + + {//sdk version + std::string version = conn->ClientVersion(); + std::cout << "SDK version: " << version << std::endl; + } + + { + std::vector tables; + Status stat = conn->ShowTables(tables); + std::cout << "ShowTables function call status: " << stat.ToString() << std::endl; + std::cout << "All tables: " << std::endl; + for(auto& table : tables) { + int64_t row_count = 0; + stat = conn->GetTableRowCount(table, row_count); + std::cout << "\t" << table << "(" << row_count << " rows)" << std::endl; + } + } + + {//create table + TableSchema tb_schema = BuildTableSchema(); + Status stat = conn->CreateTable(tb_schema); + std::cout << "CreateTable function call status: " << stat.ToString() << std::endl; + PrintTableSchema(tb_schema); + + bool has_table = conn->HasTable(tb_schema.table_name.table_name); + if(has_table) { + std::cout << "Table is created" << std::endl; + } + } + + {//describe table + TableSchema tb_schema; + Status stat = conn->DescribeTable(TABLE_NAME, tb_schema); + std::cout << "DescribeTable function call status: " << stat.ToString() << std::endl; + PrintTableSchema(tb_schema); + } + + std::vector> search_record_array; + {//insert vectors + for (int i = 0; i < ADD_VECTOR_LOOP; i++) {//add vectors + std::vector record_array; + int64_t begin_index = i * BATCH_ROW_COUNT; + BuildVectors(begin_index, begin_index + BATCH_ROW_COUNT, record_array); + std::vector record_ids; + + auto start = std::chrono::high_resolution_clock::now(); + Status stat = conn->InsertVector(TABLE_NAME, record_array, record_ids); + auto finish = std::chrono::high_resolution_clock::now(); + std::cout << "InsertVector cost: " << std::chrono::duration_cast>(finish - start).count() << "s\n"; + + + std::cout << "InsertVector function call status: " << stat.ToString() << std::endl; + std::cout << "Returned id array count: " << record_ids.size() << std::endl; + + if(search_record_array.size() < NQ) { + search_record_array.push_back( + std::make_pair(record_ids[SEARCH_TARGET], record_array[SEARCH_TARGET])); + } + } + } + + {//search vectors without index + Sleep(2); + DoSearch(conn, search_record_array, "Search without index"); + } + + {//wait unit build index finish + std::cout << "Wait until build all index done" << std::endl; + Status stat = conn->BuildIndex(TABLE_NAME); + std::cout << "BuildIndex function call status: " << stat.ToString() << std::endl; + } + + {//search vectors after build index finish + DoSearch(conn, search_record_array, "Search after build index finish"); + } + + {//delete table + Status stat = conn->DropTable(TABLE_NAME); + std::cout << "DeleteTable function call status: " << stat.ToString() << std::endl; + } + + {//server status + std::string status = conn->ServerStatus(); + std::cout << "Server status before disconnect: " << status << std::endl; + } +// Connection::Destroy(conn); + conn->Disconnect(); + {//server status + std::string status = conn->ServerStatus(); + std::cout << "Server status after disconnect: " << status << std::endl; + } +} \ No newline at end of file diff --git a/cpp/src/grpcsdk/examples/src/ClientTest.h b/cpp/src/grpcsdk/examples/src/ClientTest.h new file mode 100644 index 0000000000..0f42577ad1 --- /dev/null +++ b/cpp/src/grpcsdk/examples/src/ClientTest.h @@ -0,0 +1,13 @@ +/******************************************************************************* + * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited. + * Proprietary and confidential. + ******************************************************************************/ +#pragma once + +#include + +class ClientTest { +public: + void Test(const std::string& address, const std::string& port); +}; \ No newline at end of file diff --git a/cpp/src/grpcsdk/include/MilvusApi.h b/cpp/src/grpcsdk/include/MilvusApi.h new file mode 100644 index 0000000000..69db9b79b5 --- /dev/null +++ b/cpp/src/grpcsdk/include/MilvusApi.h @@ -0,0 +1,384 @@ +#pragma onceinclude_directories(/usr/include) + + +#include "Status.h" + +#include +#include +#include +#include + +/** \brief Milvus SDK namespace +*/ +namespace zilliz { +namespace milvus { + +//enum Error_Code { +// SUCCESS = 0, +// UNEXPECTED_ERROR = 1, +// CONNECT_FAILED = 2, +// PERMISSION_DENIED = 3, +// TABLE_NOT_EXISTS = 4, +// ILLEGAL_ARGUMENT = 5, +// ILLEGAL_RANGE = 6, +// ILLEGAL_DIMENSION = 7, +// ILLEGAL_INDEX_TYPE = 8, +// ILLEGAL_TABLE_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, +//}; + +/** +* @brief Index Type +*/ + enum class IndexType { + invalid = 0, + cpu_idmap, + gpu_ivfflat, + gpu_ivfsq8, + }; + +/** +* @brief Connect API parameter +*/ + struct ConnectParam { + std::string ip_address; ///< Server IP address + std::string port; ///< Server PORT + }; + +/** +* @brief Status for return +*/ + struct StatusMsg { +// Error_Code errorCode; + std::string reason; + }; + +/** +* @brief Table Name +*/ + struct TableName { + StatusMsg status; + std::string table_name; + }; + +/** +* @brief Table Schema +*/ + struct TableSchema { + TableName table_name; ///< Table name + IndexType index_type = IndexType::invalid; ///< Index type + int64_t dimension = 0; ///< Vector dimension, must be a positive value + bool store_raw_vector = false; ///< Is vector raw data stored in the table + }; + +/** +* @brief Range information +* for DATE partition, the format is like: 'year-month-day' +*/ + struct Range { + std::string start_value; ///< Range start + std::string end_value; ///< Range stop + }; + +/** +* @brief Record inserted +*/ + struct RowRecord { + std::vector data; ///< Vector raw data + }; + + +//struct InsertInfos { +// std::string table_name; +// std::vector row_record_array; +//}; + +/** +* @brief Vector ids for return +*/ + struct VectorIds { + StatusMsg status; + std::vector vector_id_array; + }; + +/** +* @brief Infos for searching vector +*/ + struct SearchVectorInfos { + std::string table_name; + std::vector query_record_array; + std::vector query_range_array; + int64_t topk; + }; + +/** +* @brief Infos for searching vector in files +*/ + struct SearchVectorInFilesInfos { + std::vector file_id_array; + SearchVectorInfos search_vector_infos; + }; + +/** +* @brief Query result +*/ + struct QueryResult { + int64_t id; ///< Output result + double distance; ///< Vector similarity distance + }; + +/** +* @brief TopK query result +*/ + struct TopKQueryResult { + StatusMsg status; + std::vector query_result_arrays; ///< TopK query result + }; + +/** +* @brief Server bool Reply +*/ + struct BoolReply { + StatusMsg status; + bool bool_reply; + }; + +/** +* @brief Return table row count +*/ + struct TableRowCount { + StatusMsg status; + int64_t table_row_count; + }; + +/** +* @brief SDK main class +*/ + class Connection { + public: + + /** + * @brief CreateConnection + * + * Create a connection instance and return it's shared pointer + * + * @return Connection instance pointer + */ + + static std::shared_ptr + Create(); + + /** + * @brief DestroyConnection + * + * Destroy the connection instance + * + * @param connection, the shared pointer to the instance to be destroyed + * + * @return if destroy is successful + */ + + static Status + Destroy(std::shared_ptr connection_ptr); + + /** + * @brief Connect + * + * Connect function should be called before any operations + * Server will be connected after Connect return OK + * + * @param param, use to provide server information + * + * @return Indicate if connect is successful + */ + + virtual Status Connect(const ConnectParam ¶m) = 0; + + /** + * @brief Connect + * + * Connect function should be called before any operations + * Server will be connected after Connect return OK + * + * @param uri, use to provide server information, example: milvus://ipaddress:port + * + * @return Indicate if connect is successful + */ + virtual Status Connect(const std::string &uri) = 0; + + /** + * @brief connected + * + * Connection status. + * + * @return Indicate if connection status + */ + virtual Status Connected() const = 0; + + /** + * @brief Disconnect + * + * Server will be disconnected after Disconnect return OK + * + * @return Indicate if disconnect is successful + */ + virtual Status Disconnect() = 0; + + + /** + * @brief Create table method + * + * This method is used to create table + * + * @param param, use to provide table information to be created. + * + * @return Indicate if table is created successfully + */ + virtual Status CreateTable(const TableSchema ¶m) = 0; + + + /** + * @brief Test table existence method + * + * This method is used to create table + * + * @param table_name, table name is going to be tested. + * + * @return Indicate if table is cexist + */ + virtual bool HasTable(const std::string &table_name) = 0; + + + /** + * @brief Drop table method + * + * This method is used to drop table. + * + * @param table_name, table name is going to be dropped. + * + * @return Indicate if table is drop successfully. + */ + virtual Status DropTable(const std::string &table_name) = 0; + + + /** + * @brief Build index method + * + * This method is used to build index for whole table + * + * @param table_name, table name is going to be build index. + * + * @return Indicate if build index successfully. + */ + virtual Status BuildIndex(const std::string &table_name) = 0; + + /** + * @brief Add vector to table + * + * This method is used to add vector array to table. + * + * @param table_name, table_name is inserted. + * @param record_array, vector array is inserted. + * @param id_array, after inserted every vector is given a id. + * + * @return Indicate if vector array are inserted successfully + */ + virtual Status InsertVector(const std::string &table_name, + const std::vector &record_array, + std::vector &id_array) = 0; + + + /** + * @brief Search vector + * + * This method is used to query vector in table. + * + * @param table_name, table_name is queried. + * @param query_record_array, all vector are going to be queried. + * @param query_range_array, time ranges, if not specified, will search in whole table + * @param topk, how many similarity vectors will be searched. + * @param topk_query_result_array, result array. + * + * @return Indicate if query is successful. + */ + virtual Status SearchVector(const std::string &table_name, + const std::vector &query_record_array, + const std::vector &query_range_array, + int64_t topk, + std::vector &topk_query_result_array) = 0; + + /** + * @brief Show table description + * + * This method is used to show table information. + * + * @param table_name, which table is show. + * @param table_schema, table_schema is given when operation is successful. + * + * @return Indicate if this operation is successful. + */ + virtual Status DescribeTable(const std::string &table_name, TableSchema &table_schema) = 0; + + /** + * @brief Get table row count + * + * This method is used to get table row count. + * + * @param table_name, table's name. + * @param row_count, table total row count. + * + * @return Indicate if this operation is successful. + */ + virtual Status GetTableRowCount(const std::string &table_name, int64_t &row_count) = 0; + + /** + * @brief Show all tables in database + * + * This method is used to list all tables. + * + * @param table_array, all tables are push into the array. + * + * @return Indicate if this operation is successful. + */ + virtual Status ShowTables(std::vector &table_array) = 0; + + /** + * @brief Give the client version + * + * This method is used to give the client version. + * + * @return Client version. + */ + virtual std::string ClientVersion() const = 0; + + /** + * @brief Give the server version + * + * This method is used to give the server version. + * + * @return Server version. + */ + virtual std::string ServerVersion() const = 0; + + /** + * @brief Give the server status + * + * This method is used to give the server status. + * + * @return Server status. + */ + virtual std::string ServerStatus() const = 0; + }; + +} +} \ No newline at end of file diff --git a/cpp/src/grpcsdk/include/Status.h b/cpp/src/grpcsdk/include/Status.h new file mode 100644 index 0000000000..df94373491 --- /dev/null +++ b/cpp/src/grpcsdk/include/Status.h @@ -0,0 +1,330 @@ +#pragma once + +#include +#include + +/** \brief Milvus SDK namespace +*/ +namespace zilliz { +namespace milvus { + +/** +* @brief Status Code for SDK interface return +*/ +enum class StatusCode { +OK = 0, +// system error section + UnknownError = 1, +NotSupported, +NotConnected, + +// function error section + InvalidAgument = 1000, +}; + +/** +* @brief Status for SDK interface return +*/ +class Status { +public: +/** + * @brief Status + * + * Default constructor. + * + */ +Status() = default; + +/** + * @brief Status + * + * Destructor. + * + */ +~Status() noexcept; + +/** + * @brief Status + * + * Constructor + * + * @param code, status code. + * @param message, status message. + * + */ +Status(StatusCode code, const std::string &message); + +/** + * @brief Status + * + * Copy constructor + * + * @param status, status to be copied. + * + */ +inline Status(const Status &status); + +/** + * @brief Status + * + * Assignment operator + * + * @param status, status to be copied. + * @return, the status is assigned. + * + */ +Status &operator=(const Status &s); + +/** + * @brief Status + * + * Move constructor + * + * @param status, status to be moved. + * + */ +inline Status(Status &&s) noexcept : state_(s.state_) {}; + +/** + * @brief Status + * + * Move assignment operator + * + * @param status, status to be moved. + * @return, the status is moved. + * + */ +Status &operator=(Status &&s) noexcept; + +/** + * @brief Status + * + * AND operator + * + * @param status, status to be AND. + * @return, the status after AND operation. + * + */ +inline Status operator&(const Status &s) const noexcept; + +/** + * @brief Status + * + * AND operator + * + * @param status, status to be AND. + * @return, the status after AND operation. + * + */ +inline Status operator&(Status &&s) const noexcept; + +/** + * @brief Status + * + * AND operator + * + * @param status, status to be AND. + * @return, the status after AND operation. + * + */ +inline Status &operator&=(const Status &s) noexcept; + +/** + * @brief Status + * + * AND operator + * + * @param status, status to be AND. + * @return, the status after AND operation. + * + */ +inline Status &operator&=(Status &&s) noexcept; + +/** + * @brief OK + * + * static OK status constructor + * + * @return, the status with OK. + * + */ +static Status OK() { return Status(); } + +/** + * @brief OK + * + * static OK status constructor with a specific message + * + * @param, serveral specific messages + * @return, the status with OK. + * + */ +template +static Status OK(Args &&... args) { + return Status(StatusCode::OK, MessageBuilder(std::forward(args)...)); +} + +/** + * @brief Invalid + * + * static Invalid status constructor with a specific message + * + * @param, serveral specific messages + * @return, the status with Invalid. + * + */ +template +static Status Invalid(Args &&... args) { + return Status(StatusCode::InvalidAgument, + MessageBuilder(std::forward(args)...)); +} + +/** + * @brief Unknown Error + * + * static unknown error status constructor with a specific message + * + * @param, serveral specific messages + * @return, the status with unknown error. + * + */ +template +static Status UnknownError(Args &&... args) { + return Status(StatusCode::UnknownError, MessageBuilder(std::forward(args)...)); +} + +/** + * @brief not supported Error + * + * static not supported status constructor with a specific message + * + * @param, serveral specific messages + * @return, the status with not supported error. + * + */ +template +static Status NotSupported(Args &&... args) { + return Status(StatusCode::NotSupported, MessageBuilder(std::forward(args)...)); +} + +/** + * @brief ok + * + * Return true iff the status indicates success. + * + * @return, if the status indicates success. + * + */ +bool ok() const { return (state_ == nullptr); } + +/** + * @brief IsInvalid + * + * Return true iff the status indicates invalid. + * + * @return, if the status indicates invalid. + * + */ +bool IsInvalid() const { return code() == StatusCode::InvalidAgument; } + +/** + * @brief IsUnknownError + * + * Return true iff the status indicates unknown error. + * + * @return, if the status indicates unknown error. + * + */ +bool IsUnknownError() const { return code() == StatusCode::UnknownError; } + +/** + * @brief IsNotSupported + * + * Return true iff the status indicates not supported. + * + * @return, if the status indicates not supported. + * + */ +bool IsNotSupported() const { return code() == StatusCode::NotSupported; } + +/** + * @brief ToString + * + * Return error message string. + * + * @return, error message string. + * + */ +std::string ToString() const; + +/** + * @brief CodeAsString + * + * Return a string representation of the status code. + * + * @return, a string representation of the status code. + * + */ +std::string CodeAsString() const; + +/** + * @brief code + * + * Return the StatusCode value attached to this status. + * + * @return, the status code value attached to this status. + * + */ +StatusCode code() const { return ok() ? StatusCode::OK : state_->code; } + +/** + * @brief message + * + * Return the specific error message attached to this status. + * + * @return, the specific error message attached to this status. + * + */ +std::string message() const { return ok() ? "" : state_->message; } + +private: +struct State { + StatusCode code; + std::string message; +}; + +// OK status has a `nullptr` state_. Otherwise, `state_` points to +// a `State` structure containing the error code and message. +State *state_ = nullptr; + +void DeleteState() { + delete state_; + state_ = nullptr; +} + +void CopyFrom(const Status &s); + +inline void MoveFrom(Status &s); + +template +static void MessageBuilderRecursive(std::stringstream &stream, Head &&head) { + stream << head; +} + +template +static void MessageBuilderRecursive(std::stringstream &stream, Head &&head, Tail &&... tail) { + MessageBuilderRecursive(stream, std::forward(head)); + MessageBuilderRecursive(stream, std::forward(tail)...); +} + +template +static std::string MessageBuilder(Args &&... args) { + std::stringstream stream; + + MessageBuilderRecursive(stream, std::forward(args)...); + + return stream.str(); +} +}; +} +} \ No newline at end of file diff --git a/cpp/src/grpcsdk/src/client/ClientProxy.cpp b/cpp/src/grpcsdk/src/client/ClientProxy.cpp new file mode 100644 index 0000000000..d3c9585fda --- /dev/null +++ b/cpp/src/grpcsdk/src/client/ClientProxy.cpp @@ -0,0 +1,313 @@ +/******************************************************************************* +* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +* Unauthorized copying of this file, via any medium is strictly prohibited. +* Proprietary and confidential. +******************************************************************************/ +#include "ClientProxy.h" +#include "milvus.grpc.pb.h" + +namespace zilliz { +namespace milvus { + +Status +ClientProxy::Connect(const ConnectParam ¶m) { +// Disconnect(); + + std::string uri = param.ip_address + ":" + param.port; + + channel_ = ::grpc::CreateChannel(uri, ::grpc::InsecureChannelCredentials()); + client_ptr = new grpcClient(channel_); + + if (channel_ != nullptr) { + connected_ = true; + } + return Status::OK(); +} + +Status +ClientProxy::Connect(const std::string &uri) { +// Disconnect(); + + size_t index = uri.find_first_of(":", 0); + if ((index == std::string::npos)) { + return Status::Invalid("Invalid uri"); + } + + ConnectParam param; + param.ip_address = uri.substr(0, index); + param.port = uri.substr(index + 1); + + return Connect(param); +} + +Status +ClientProxy::Connected() const { + try { + std::string info; + client_ptr->Ping(info, ""); + } catch (std::exception &ex) { + return Status(StatusCode::NotConnected, "connection lost: " + std::string(ex.what())); + } + + return Status::OK(); +} + +Status +ClientProxy::Disconnect() { + connected_ = false; +// delete client_ptr; + return Status::OK(); +} + +std::string +ClientProxy::ClientVersion() const { + return ""; +} + +Status +ClientProxy::CreateTable(const TableSchema ¶m) { + try { + ::milvus::grpc::TableSchema schema; +// ::milvus::grpc::TableName *grpc_tablename = new ::milvus::grpc::TableName; +// grpc_tablename->set_table_name(param.table_name.table_name); +// schema.set_allocated_table_name(grpc_tablename); + + schema.mutable_table_name()->set_table_name(param.table_name.table_name); + schema.set_index_type((int) param.index_type); + schema.set_dimension(param.dimension); + schema.set_store_raw_vector(param.store_raw_vector); + + client_ptr->CreateTable(schema);//stub call + } catch (std::exception &ex) { + return Status(StatusCode::UnknownError, "failed to create table: " + std::string(ex.what())); + } + return Status::OK(); +} + +bool +ClientProxy::HasTable(const std::string &table_name) { + ::milvus::grpc::TableName grpc_table_name; + grpc_table_name.set_table_name(table_name); + return client_ptr->HasTable(grpc_table_name); +} + +Status +ClientProxy::DropTable(const std::string &table_name) { + try { + ::milvus::grpc::TableName grpc_table_name; + grpc_table_name.set_table_name(table_name); + client_ptr->DropTable(grpc_table_name); + + } catch (std::exception &ex) { + return Status(StatusCode::UnknownError, "failed to drop table: " + std::string(ex.what())); + } + + return Status::OK(); +} + +Status +ClientProxy::BuildIndex(const std::string &table_name) { + try { + ::milvus::grpc::TableName grpc_table_name; + grpc_table_name.set_table_name(table_name); + client_ptr->BuildIndex(grpc_table_name); + + } catch (std::exception &ex) { + return Status(StatusCode::UnknownError, "failed to build index: " + std::string(ex.what())); + } + + return Status::OK(); +} + +Status +ClientProxy::InsertVector(const std::string &table_name, + const std::vector &record_array, + std::vector &id_array) { + try { +// ::milvus::grpc::InsertInfos insert_infos; +// insert_infos.set_table_name(table_name); +// +// for (auto &record : record_array) { +// ::milvus::grpc::RowRecord *grpc_record = insert_infos.add_row_record_array(); +// for (size_t i = 0; i < record.data.size(); i++) { +// grpc_record->add_vector_data(record.data[i]); +// } +// } +// +// ::milvus::grpc::VectorIds vector_ids; +// +// std::cout << "*****************************************************\n"; +// auto start = std::chrono::high_resolution_clock::now(); +// //Single thread +// client_ptr->InsertVector(vector_ids, insert_infos); +// auto finish = std::chrono::high_resolution_clock::now(); +// std::cout << "InsertVector cost: " << std::chrono::duration_cast>(finish - start).count() << "s\n"; +// std::cout << "*****************************************************\n"; +// +// for (size_t i = 0; i < vector_ids.vector_id_array_size(); i++) { +// id_array.push_back(vector_ids.vector_id_array(i)); +// } + +//////////////////////////////////////////////////////////////////////////// + //multithread + std::vector threads; +// int thread_count = std::thread::hardware_concurrency(); + int thread_count = 10; + + ::milvus::grpc::InsertInfos *insert_info_array = new ::milvus::grpc::InsertInfos[thread_count]; + ::milvus::grpc::VectorIds *vector_ids_array = new ::milvus::grpc::VectorIds[thread_count]; + int64_t record_count = record_array.size() / thread_count; + + for (size_t i = 0; i < thread_count; i++) { + insert_info_array[i].set_table_name(table_name); + for (size_t j = i * record_count; j < record_count * (i + 1); j++) { + ::milvus::grpc::RowRecord *grpc_record = insert_info_array[i].add_row_record_array(); + for (size_t k = 0; k < record_array[j].data.size(); k++) { + grpc_record->add_vector_data(record_array[j].data[k]); + } + } + } + + std::cout << "*****************************************************\n"; + auto start = std::chrono::high_resolution_clock::now(); + for (size_t j = 0; j < thread_count; j++) { + threads.push_back( + std::thread(&grpcClient::InsertVector, client_ptr, std::ref(vector_ids_array[j]), insert_info_array[j])); + } + std::for_each(threads.begin(), threads.end(), std::mem_fn(&std::thread::join)); + auto finish = std::chrono::high_resolution_clock::now(); + std::cout << "InsertVector cost: " << std::chrono::duration_cast>(finish - start).count() << "s\n"; + std::cout << "*****************************************************\n"; + + for (size_t i = 0; i < thread_count; i++) { + for (size_t j = 0; j < vector_ids_array[i].vector_id_array_size(); j++) { + id_array.push_back(vector_ids_array[i].vector_id_array(j)); + } + } + + } catch (std::exception &ex) { + return Status(StatusCode::UnknownError, "failed to add vector: " + std::string(ex.what())); + } + + return Status::OK(); +} + +Status +ClientProxy::SearchVector(const std::string &table_name, + const std::vector &query_record_array, + const std::vector &query_range_array, + int64_t topk, + std::vector &topk_query_result_array) { + try { + //step 1: convert vectors data + ::milvus::grpc::SearchVectorInfos search_vector_infos; + search_vector_infos.set_table_name(table_name); + search_vector_infos.set_topk(topk); + for (auto &record : query_record_array) { + ::milvus::grpc::RowRecord *row_record = search_vector_infos.add_query_record_array(); + for (size_t i = 0; i < record.data.size(); i++) { + row_record->add_vector_data(record.data[i]); + } + } + + //step 2: convert range array + for (auto &range : query_range_array) { + ::milvus::grpc::Range *grpc_range = search_vector_infos.add_query_range_array(); + grpc_range->set_start_value(range.start_value); + grpc_range->set_end_value(range.end_value); + } + + //step 3: search vectors + std::vector<::milvus::grpc::TopKQueryResult> result_array; + client_ptr->SearchVector(result_array, search_vector_infos); + + //step 4: convert result array + for (auto &grpc_topk_result : result_array) { + TopKQueryResult result; + for (size_t i = 0; i < grpc_topk_result.query_result_arrays_size(); i++) { + QueryResult query_result; + query_result.id = grpc_topk_result.query_result_arrays(i).id(); + query_result.distance = grpc_topk_result.query_result_arrays(i).distance(); + result.query_result_arrays.emplace_back(query_result); + } + + topk_query_result_array.emplace_back(result); + } + + } catch (std::exception &ex) { + return Status(StatusCode::UnknownError, "failed to search vectors: " + std::string(ex.what())); + } + + return Status::OK(); +} + +Status +ClientProxy::DescribeTable(const std::string &table_name, TableSchema &table_schema) { + try { + ::milvus::grpc::TableSchema grpc_schema; + + client_ptr->DescribeTable(grpc_schema, table_name); + + table_schema.table_name.table_name = grpc_schema.table_name().table_name(); + table_schema.index_type = (IndexType) grpc_schema.index_type(); + table_schema.dimension = grpc_schema.dimension(); + table_schema.store_raw_vector = grpc_schema.store_raw_vector(); + } catch (std::exception &ex) { + return Status(StatusCode::UnknownError, "failed to describe table: " + std::string(ex.what())); + } + + return Status::OK(); +} + +Status +ClientProxy::GetTableRowCount(const std::string &table_name, int64_t &row_count) { + try { + row_count = client_ptr->GetTableRowCount(table_name); + + } catch (std::exception &ex) { + return Status(StatusCode::UnknownError, "failed to show tables: " + std::string(ex.what())); + } + + return Status::OK(); +} + +Status +ClientProxy::ShowTables(std::vector &table_array) { + try { + client_ptr->ShowTables(table_array); + + } catch (std::exception &ex) { + return Status(StatusCode::UnknownError, "failed to show tables: " + std::string(ex.what())); + } + + return Status::OK(); +} + +std::string +ClientProxy::ServerVersion() const { + try { + std::string version; + client_ptr->Ping(version, "version"); + return version; + } catch (std::exception &ex) { + return ""; + } +} + +std::string +ClientProxy::ServerStatus() const { + if (connected_ == false) { + return "not connected to server"; + } + + try { + std::string dummy; + client_ptr->Ping(dummy, ""); + return "server alive"; + } catch (std::exception &ex) { + return "connection lost"; + } +} + +} +} diff --git a/cpp/src/grpcsdk/src/client/ClientProxy.h b/cpp/src/grpcsdk/src/client/ClientProxy.h new file mode 100644 index 0000000000..7b1d24248b --- /dev/null +++ b/cpp/src/grpcsdk/src/client/ClientProxy.h @@ -0,0 +1,66 @@ +/******************************************************************************* +* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +* Unauthorized copying of this file, via any medium is strictly prohibited. +* Proprietary and confidential. +******************************************************************************/ +#pragma once + +#include "MilvusApi.h" +#include "grpcClient.h" + +namespace zilliz { +namespace milvus { + +class ClientProxy : public Connection { +public: + // Implementations of the Connection interface + virtual Status Connect(const ConnectParam ¶m) override; + + virtual Status Connect(const std::string &uri) override; + + virtual Status Connected() const override; + + virtual Status Disconnect() override; + + virtual Status CreateTable(const TableSchema ¶m) override; + + virtual bool HasTable(const std::string &table_name) override; + + virtual Status DropTable(const std::string &table_name) override; + + virtual Status BuildIndex(const std::string &table_name) override; + + virtual Status InsertVector(const std::string &table_name, + const std::vector &record_array, + std::vector &id_array) override; + + virtual Status SearchVector(const std::string &table_name, + const std::vector &query_record_array, + const std::vector &query_range_array, + int64_t topk, + std::vector &topk_query_result_array) override; + + virtual Status DescribeTable(const std::string &table_name, TableSchema &table_schema) override; + + virtual Status GetTableRowCount(const std::string &table_name, int64_t &row_count) override; + + virtual Status ShowTables(std::vector &table_array) override; + + virtual std::string ClientVersion() const override; + + virtual std::string ServerVersion() const override; + + virtual std::string ServerStatus() const override; + +private: + + std::shared_ptr<::grpc::Channel> channel_; + +private: + grpcClient *client_ptr; +// std::shared_ptr client_ptr; + bool connected_ = false; +}; + +} +} diff --git a/cpp/src/grpcsdk/src/client/grpcClient.cpp b/cpp/src/grpcsdk/src/client/grpcClient.cpp new file mode 100644 index 0000000000..8014e1410f --- /dev/null +++ b/cpp/src/grpcsdk/src/client/grpcClient.cpp @@ -0,0 +1,168 @@ +/******************************************************************************* +* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +* Unauthorized copying of this file, via any medium is strictly prohibited. +* Proprietary and confidential. +******************************************************************************/ +#include +#include +#include +#include +#include + +#include "grpcClient.h" + +using grpc::Channel; +using grpc::ClientContext; +using grpc::ClientReader; +using grpc::ClientReaderWriter; +using grpc::ClientWriter; +using grpc::Status; + +namespace zilliz { +namespace milvus { +grpcClient::grpcClient(std::shared_ptr<::grpc::Channel> channel) + : stub_(::milvus::grpc::MilvusService::NewStub(channel)) { + +} + +grpcClient::~grpcClient() { + +} + +void +grpcClient::CreateTable(const ::milvus::grpc::TableSchema table_schema) { + ClientContext context; + ::milvus::Status response; + ::grpc::Status status = stub_->CreateTable(&context, table_schema, &response); + + if (!status.ok()) { + std::cout << "CreateTable rpc failed!\n"; + } +} + +bool +grpcClient::HasTable(const ::milvus::grpc::TableName table_name) { + ClientContext context; + ::milvus::grpc::BoolReply response; + ::grpc::Status status = stub_->HasTable(&context, table_name, &response); + + if (!status.ok()) { + std::cout << "HasTable rpc failed!\n"; + } + return response.bool_reply(); +} + +void +grpcClient::DropTable(const ::milvus::grpc::TableName table_name) { + ClientContext context; + ::milvus::Status response; + ::grpc::Status status = stub_->DropTable(&context, table_name, &response); + + if (!status.ok()) { + std::cout << "DropTable rpc failed!\n"; + } +} + +void +grpcClient::BuildIndex(const ::milvus::grpc::TableName table_name) { + ClientContext context; + ::milvus::Status response; + ::grpc::Status status = stub_->BuildIndex(&context, table_name, &response); + + if (!status.ok()) { + std::cout << "BuildIndex rpc failed!\n"; + } +} + +void +grpcClient::InsertVector(::milvus::grpc::VectorIds& vector_ids, const ::milvus::grpc::InsertInfos insert_infos) { + ClientContext context; + ::grpc::Status status = stub_->InsertVector(&context, insert_infos, &vector_ids); +// std::cout << vector_ids.vector_id_array_size(); + if (!status.ok()) { + std::cout << "InsertVector rpc failed!\n"; + } +} + +void +grpcClient::SearchVector(std::vector<::milvus::grpc::TopKQueryResult>& result_array, + const ::milvus::grpc::SearchVectorInfos search_vector_infos) { + ::milvus::grpc::TopKQueryResult query_result; + ClientContext context; + std::unique_ptr > reader( + stub_->SearchVector(&context, search_vector_infos)); + + while (reader->Read(&query_result)) { + result_array.emplace_back(query_result); + } + + ::grpc::Status status = reader->Finish(); + + if (!status.ok()) { + std::cout << "SearchVector rpc failed!\n"; + } +} + +void +grpcClient::DescribeTable(::milvus::grpc::TableSchema &grpc_schema, const std::string table_name) { + ClientContext context; + ::milvus::grpc::TableName grpc_tablename; + grpc_tablename.set_table_name(table_name); + ::grpc::Status status = stub_->DescribeTable(&context, grpc_tablename, &grpc_schema); + + if (!status.ok()) { + std::cout << "DescribeTable rpc failed!\n"; + } +} + +int64_t +grpcClient::GetTableRowCount(const std::string table_name) { + ClientContext context; + ::milvus::grpc::TableRowCount response; + ::milvus::grpc::TableName grpc_tablename; + ::grpc::Status status = stub_->GetTableRowCount(&context, grpc_tablename, &response); + + if (!status.ok()) { + std::cout << "DescribeTable rpc failed!\n"; + } + return response.table_row_count(); +} + +void +grpcClient::ShowTables(std::vector &table_array) { + ClientContext context; + ::milvus::grpc::Command command; + std::unique_ptr > reader( + stub_->ShowTables(&context, command)); + + ::milvus::grpc::TableName table_name; + while (reader->Read(&table_name)) { + table_array.emplace_back(table_name.table_name()); + } + ::grpc::Status status = reader->Finish(); + + if (!status.ok()) { + std::cout << "ShowTables rpc failed!\n"; + } +} + +void +grpcClient::Ping(std::string &result, const std::string cmd) { + ClientContext context; + ::milvus::grpc::ServerStatus response; + ::milvus::grpc::Command command; + command.set_cmd(cmd); + ::grpc::Status status = stub_->Ping(&context, command, &response); + + result = response.info(); + if (!status.ok()) { + std::cout << "Ping rpc failed!\n"; + } +} + +void +grpcClient::Disconnect() { +} + +} +} \ No newline at end of file diff --git a/cpp/src/grpcsdk/src/client/grpcClient.h b/cpp/src/grpcsdk/src/client/grpcClient.h new file mode 100644 index 0000000000..738c6d0a02 --- /dev/null +++ b/cpp/src/grpcsdk/src/client/grpcClient.h @@ -0,0 +1,62 @@ +/******************************************************************************* +* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +* Unauthorized copying of this file, via any medium is strictly prohibited. +* Proprietary and confidential. +******************************************************************************/ +#pragma once +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "Status.h" +#include "milvus.grpc.pb.h" +#include "status.grpc.pb.h" + +#include + +namespace zilliz { +namespace milvus { +class grpcClient { +public: + grpcClient(std::shared_ptr<::grpc::Channel> channel); + + virtual ~grpcClient(); + + void CreateTable(const ::milvus::grpc::TableSchema table_schema); + + bool HasTable(const ::milvus::grpc::TableName table_name); + + void DropTable(const ::milvus::grpc::TableName table_name); + + void BuildIndex(const ::milvus::grpc::TableName table_name); + + void InsertVector(::milvus::grpc::VectorIds& vector_ids, const ::milvus::grpc::InsertInfos insert_infos); + + void SearchVector(std::vector<::milvus::grpc::TopKQueryResult>& result_array, + const ::milvus::grpc::SearchVectorInfos search_vector_infos); + + void DescribeTable(::milvus::grpc::TableSchema& grpc_schema, const std::string table_name); + + int64_t GetTableRowCount(const std::string table_name); + + void ShowTables(std::vector &table_array); + + void Ping(std::string &result, const std::string cmd); + + void Disconnect(); + +private: + std::unique_ptr<::milvus::grpc::MilvusService::Stub> stub_; +}; + +} +} \ No newline at end of file diff --git a/cpp/src/grpcsdk/src/interface/ConnectionImpl.cpp b/cpp/src/grpcsdk/src/interface/ConnectionImpl.cpp new file mode 100644 index 0000000000..61556f93aa --- /dev/null +++ b/cpp/src/grpcsdk/src/interface/ConnectionImpl.cpp @@ -0,0 +1,118 @@ +/******************************************************************************* +* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +* Unauthorized copying of this file, via any medium is strictly prohibited. +* Proprietary and confidential. +******************************************************************************/ +#include "ConnectionImpl.h" +#include "version.h" + +namespace zilliz { +namespace milvus { + +std::shared_ptr +Connection::Create() { + return std::shared_ptr(new ConnectionImpl()); +} + +Status +Connection::Destroy(std::shared_ptr connection_ptr) { +// if (connection_ptr != nullptr) { +// return connection_ptr->Disconnect(); +// } + return Status::OK(); +} + +////////////////////////////////////////////////////////////////////////////////////////////// +ConnectionImpl::ConnectionImpl() { + client_proxy_ = std::make_shared(); +} + +Status +ConnectionImpl::Connect(const ConnectParam ¶m) { + return client_proxy_->Connect(param); +} + +Status +ConnectionImpl::Connect(const std::string &uri) { + return client_proxy_->Connect(uri); +} + +Status +ConnectionImpl::Connected() const { + return client_proxy_->Connected(); +} + +Status +ConnectionImpl::Disconnect() { + return client_proxy_->Disconnect(); +} + +std::string +ConnectionImpl::ClientVersion() const { + return MILVUS_VERSION; +} + +Status +ConnectionImpl::CreateTable(const TableSchema ¶m) { + return client_proxy_->CreateTable(param); +} + +bool +ConnectionImpl::HasTable(const std::string &table_name) { + return client_proxy_->HasTable(table_name); +} + +Status +ConnectionImpl::DropTable(const std::string &table_name) { + return client_proxy_->DropTable(table_name); +} + +Status +ConnectionImpl::BuildIndex(const std::string &table_name) { + return client_proxy_->BuildIndex(table_name); +} + +Status +ConnectionImpl::InsertVector(const std::string &table_name, + const std::vector &record_array, + std::vector &id_array) { + return client_proxy_->InsertVector(table_name, record_array, id_array); +} + +Status +ConnectionImpl::SearchVector(const std::string &table_name, + const std::vector &query_record_array, + const std::vector &query_range_array, + int64_t topk, + std::vector &topk_query_result_array) { + return client_proxy_->SearchVector(table_name, query_record_array, query_range_array, topk, + topk_query_result_array); +} + +Status +ConnectionImpl::DescribeTable(const std::string &table_name, TableSchema &table_schema) { + return client_proxy_->DescribeTable(table_name, table_schema); +} + +Status +ConnectionImpl::GetTableRowCount(const std::string &table_name, int64_t &row_count) { + return client_proxy_->GetTableRowCount(table_name, row_count); +} + +Status +ConnectionImpl::ShowTables(std::vector &table_array) { + return client_proxy_->ShowTables(table_array); +} + +std::string +ConnectionImpl::ServerVersion() const { + return client_proxy_->ServerVersion(); +} + +std::string +ConnectionImpl::ServerStatus() const { + return client_proxy_->ServerStatus(); +} + +} +} diff --git a/cpp/src/grpcsdk/src/interface/ConnectionImpl.h b/cpp/src/grpcsdk/src/interface/ConnectionImpl.h new file mode 100644 index 0000000000..1262e9783d --- /dev/null +++ b/cpp/src/grpcsdk/src/interface/ConnectionImpl.h @@ -0,0 +1,62 @@ +/******************************************************************************* +* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +* Unauthorized copying of this file, via any medium is strictly prohibited. +* Proprietary and confidential. +******************************************************************************/ +#pragma once + +//#include "MilvusApi.h" +#include "client/ClientProxy.h" + +namespace zilliz { +namespace milvus { + +class ConnectionImpl : public Connection { +public: + ConnectionImpl(); + + // Implementations of the Connection interface + virtual Status Connect(const ConnectParam ¶m) override; + + virtual Status Connect(const std::string &uri) override; + + virtual Status Connected() const override; + + virtual Status Disconnect() override; + + virtual Status CreateTable(const TableSchema ¶m) override; + + virtual bool HasTable(const std::string &table_name) override; + + virtual Status DropTable(const std::string &table_name) override; + + virtual Status BuildIndex(const std::string &table_name) override; + + virtual Status InsertVector(const std::string &table_name, + const std::vector &record_array, + std::vector &id_array) override; + + virtual Status SearchVector(const std::string &table_name, + const std::vector &query_record_array, + const std::vector &query_range_array, + int64_t topk, + std::vector &topk_query_result_array) override; + + virtual Status DescribeTable(const std::string &table_name, TableSchema &table_schema) override; + + virtual Status GetTableRowCount(const std::string &table_name, int64_t &row_count) override; + + virtual Status ShowTables(std::vector &table_array) override; + + virtual std::string ClientVersion() const override; + + virtual std::string ServerVersion() const override; + + virtual std::string ServerStatus() const override; + +private: + std::shared_ptr client_proxy_; +}; + +} +} diff --git a/cpp/src/grpcsdk/src/interface/Status.cpp b/cpp/src/grpcsdk/src/interface/Status.cpp new file mode 100644 index 0000000000..51fd7cc3fc --- /dev/null +++ b/cpp/src/grpcsdk/src/interface/Status.cpp @@ -0,0 +1,129 @@ +/******************************************************************************* +* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +* Unauthorized copying of this file, via any medium is strictly prohibited. +* Proprietary and confidential. +******************************************************************************/ +#include "Status.h" + +namespace zilliz { +namespace milvus { + +Status::~Status() noexcept { + if (state_ != nullptr) { + delete state_; + state_ = nullptr; + } +} + +static inline std::ostream &operator<<(std::ostream &os, const Status &x) { + os << x.ToString(); + return os; +} + +void Status::MoveFrom(Status &s) { + delete state_; + state_ = s.state_; + s.state_ = nullptr; +} + +Status::Status(const Status &s) + : state_((s.state_ == nullptr) ? nullptr : new State(*s.state_)) {} + +Status &Status::operator=(const Status &s) { + if (state_ != s.state_) { + CopyFrom(s); + } + return *this; +} + +Status &Status::operator=(Status &&s) noexcept { + MoveFrom(s); + return *this; +} + +Status Status::operator&(const Status &status) const noexcept { + if (ok()) { + return status; + } else { + return *this; + } +} + +Status Status::operator&(Status &&s) const noexcept { + if (ok()) { + return std::move(s); + } else { + return *this; + } +} + +Status &Status::operator&=(const Status &s) noexcept { + if (ok() && !s.ok()) { + CopyFrom(s); + } + return *this; +} + +Status &Status::operator&=(Status &&s) noexcept { + if (ok() && !s.ok()) { + MoveFrom(s); + } + return *this; +} + +Status::Status(StatusCode code, const std::string &message) { + state_ = new State; + state_->code = code; + state_->message = message; +} + +void Status::CopyFrom(const Status &status) { + delete state_; + if (status.state_ == nullptr) { + state_ = nullptr; + } else { + state_ = new State(*status.state_); + } +} + +std::string Status::CodeAsString() const { + if (state_ == nullptr) { + return "OK"; + } + + const char *type = nullptr; + switch (code()) { + case StatusCode::OK: + type = "OK"; + break; + case StatusCode::InvalidAgument: + type = "Invalid agument"; + break; + case StatusCode::UnknownError: + type = "Unknown error"; + break; + case StatusCode::NotSupported: + type = "Not Supported"; + break; + case StatusCode::NotConnected: + type = "Not Connected"; + break; + default: + type = "Unknown"; + break; + } + return std::string(type); +} + +std::string Status::ToString() const { + std::string result(CodeAsString()); + if (state_ == nullptr) { + return result; + } + result += ": "; + result += state_->message; + return result; +} + +} +} diff --git a/cpp/src/grpcsdk/src/util/Exception.h b/cpp/src/grpcsdk/src/util/Exception.h new file mode 100644 index 0000000000..bb7fc09241 --- /dev/null +++ b/cpp/src/grpcsdk/src/util/Exception.h @@ -0,0 +1,34 @@ +/******************************************************************************* +* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +* Unauthorized copying of this file, via any medium is strictly prohibited. +* Proprietary and confidential. +******************************************************************************/ +#pragma once + +#include "Status.h" + +#include + +namespace zilliz { +namespace milvus { +class Exception : public std::exception { +public: + Exception(StatusCode error_code, + const std::string &message = std::string()) + : error_code_(error_code), message_(message) {} + +public: + StatusCode error_code() const { + return error_code_; + } + + virtual const char *what() const noexcept { + return message_.c_str(); + } + +private: + StatusCode error_code_; + std::string message_; +}; +} +} \ No newline at end of file diff --git a/cpp/src/grpcserver/DBWrapper.cpp b/cpp/src/grpcserver/DBWrapper.cpp new file mode 100644 index 0000000000..6c67176571 --- /dev/null +++ b/cpp/src/grpcserver/DBWrapper.cpp @@ -0,0 +1,102 @@ +/******************************************************************************* + * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited. + * Proprietary and confidential. + ******************************************************************************/ + +#include "DBWrapper.h" +#include "ServerConfig.h" +#include "utils/CommonUtil.h" +#include "utils/Log.h" +#include "utils/StringHelpFunctions.h" + +namespace zilliz { +namespace milvus { +namespace server { + +DBWrapper::DBWrapper() { + zilliz::milvus::engine::Options opt; + ConfigNode& config = ServerConfig::GetInstance().GetConfig(CONFIG_DB); + opt.meta.backend_uri = config.GetValue(CONFIG_DB_URL); + std::string db_path = config.GetValue(CONFIG_DB_PATH); + opt.meta.path = db_path + "/db"; + + std::string db_slave_path = config.GetValue(CONFIG_DB_SLAVE_PATH); + StringHelpFunctions::SplitStringByDelimeter(db_slave_path, ";", opt.meta.slave_paths); + + int64_t index_size = config.GetInt64Value(CONFIG_DB_INDEX_TRIGGER_SIZE); + if(index_size > 0) {//ensure larger than zero, unit is MB + opt.index_trigger_size = (size_t)index_size * engine::ONE_MB; + } + int64_t insert_buffer_size = config.GetInt64Value(CONFIG_DB_INSERT_BUFFER_SIZE, 4); + if (insert_buffer_size >= 1) { + opt.insert_buffer_size = insert_buffer_size * engine::ONE_GB; + } + else { + std::cout << "ERROR: insert_buffer_size should be at least 1 GB" << std::endl; + kill(0, SIGUSR1); + } + + ConfigNode& serverConfig = ServerConfig::GetInstance().GetConfig(CONFIG_SERVER); + std::string mode = serverConfig.GetValue(CONFIG_CLUSTER_MODE, "single"); + if (mode == "single") { + opt.mode = zilliz::milvus::engine::Options::MODE::SINGLE; + } + else if (mode == "cluster") { + opt.mode = zilliz::milvus::engine::Options::MODE::CLUSTER; + } + else if (mode == "read_only") { + opt.mode = zilliz::milvus::engine::Options::MODE::READ_ONLY; + } + else { + std::cout << "ERROR: mode specified in server_config is not one of ['single', 'cluster', 'read_only']" << std::endl; + kill(0, SIGUSR1); + } + + //set archive config + engine::ArchiveConf::CriteriaT criterial; + int64_t disk = config.GetInt64Value(CONFIG_DB_ARCHIVE_DISK, 0); + int64_t days = config.GetInt64Value(CONFIG_DB_ARCHIVE_DAYS, 0); + if(disk > 0) { + criterial[engine::ARCHIVE_CONF_DISK] = disk; + } + if(days > 0) { + criterial[engine::ARCHIVE_CONF_DAYS] = days; + } + opt.meta.archive_conf.SetCriterias(criterial); + + //create db root folder + ServerError err = CommonUtil::CreateDirectory(opt.meta.path); + if(err != SERVER_SUCCESS) { + std::cout << "ERROR! Failed to create database root path: " << opt.meta.path << std::endl; + kill(0, SIGUSR1); + } + + for(auto& path : opt.meta.slave_paths) { + err = CommonUtil::CreateDirectory(path); + if(err != SERVER_SUCCESS) { + std::cout << "ERROR! Failed to create database slave path: " << path << std::endl; + kill(0, SIGUSR1); + } + } + + std::string msg = opt.meta.path; + try { + zilliz::milvus::engine::DB::Open(opt, &db_); + } catch(std::exception& ex) { + msg = ex.what(); + } + + if(db_ == nullptr) { + std::cout << "ERROR! Failed to open database: " << msg << std::endl; + kill(0, SIGUSR1); + } +} + +DBWrapper::~DBWrapper() { + delete db_; +} + +} +} +} \ No newline at end of file diff --git a/cpp/src/grpcserver/DBWrapper.h b/cpp/src/grpcserver/DBWrapper.h new file mode 100644 index 0000000000..5bd09bd0f4 --- /dev/null +++ b/cpp/src/grpcserver/DBWrapper.h @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited. + * Proprietary and confidential. + ******************************************************************************/ +#pragma once + +#include "db/DB.h" +#include "db/Meta.h" + +namespace zilliz { +namespace milvus { +namespace server { + +class DBWrapper { +private: + DBWrapper(); + ~DBWrapper(); + +public: + static zilliz::milvus::engine::DB* DB() { + static DBWrapper db_wrapper; + return db_wrapper.db(); + } + + zilliz::milvus::engine::DB* db() { return db_; } + +private: + zilliz::milvus::engine::DB* db_ = nullptr; +}; + +} +} +} diff --git a/cpp/src/grpcserver/MilvusServer.cpp b/cpp/src/grpcserver/MilvusServer.cpp new file mode 100644 index 0000000000..781521ea79 --- /dev/null +++ b/cpp/src/grpcserver/MilvusServer.cpp @@ -0,0 +1,101 @@ +/******************************************************************************* + * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited. + * Proprietary and confidential. + ******************************************************************************/ +#include "milvus.grpc.pb.h" +#include "MilvusServer.h" +#include "ServerConfig.h" +#include "DBWrapper.h" +#include "utils/Log.h" +#include "faiss/utils.h" +#include "RequestHandler.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace zilliz { +namespace milvus { +namespace server { +using grpc::Server; +using grpc::ServerBuilder; +using grpc::ServerContext; +using grpc::ServerReader; +using grpc::ServerReaderWriter; +using grpc::ServerWriter; +using grpc::Status; + +static std::unique_ptr server; + +void +MilvusServer::StartService() { + if (server != nullptr){ + std::cout << "stopservice!\n"; + StopService(); + } + + ServerConfig &config = ServerConfig::GetInstance(); + ConfigNode server_config = config.GetConfig(CONFIG_SERVER); + ConfigNode engine_config = config.GetConfig(CONFIG_ENGINE); + std::string address = server_config.GetValue(CONFIG_SERVER_ADDRESS, "127.0.0.1"); + int32_t port = server_config.GetInt32Value(CONFIG_SERVER_PORT, 19530); + + faiss::distance_compute_blas_threshold = engine_config.GetInt32Value(CONFIG_DCBT, 20); + //TODO:add exception handle + DBWrapper::DB();//initialize db + + std::string server_address("127.0.0.1:19530"); + + ServerBuilder builder; + builder.SetMaxReceiveMessageSize(400 * 1024 * 1024); //default 4 * 1024 * 1024 + builder.SetMaxSendMessageSize(400 * 1024 * 1024); + + builder.SetCompressionAlgorithmSupportStatus(GRPC_COMPRESS_STREAM_GZIP, true); + +// builder.SetDefaultCompressionAlgorithm(GRPC_COMPRESS_DEFLATE); +// builder.SetDefaultCompressionAlgorithm(GRPC_COMPRESS_GZIP); + builder.SetDefaultCompressionAlgorithm(GRPC_COMPRESS_STREAM_GZIP); +// builder.SetDefaultCompressionAlgorithm(GRPC_COMPRESS_ALGORITHMS_COUNT); + builder.SetDefaultCompressionLevel(GRPC_COMPRESS_LEVEL_HIGH); + + RequestHandler service; + + builder.AddListeningPort(server_address, grpc::InsecureServerCredentials()); + + builder.RegisterService(&service); + + builder.SetSyncServerOption(builder.MIN_POLLERS, 10); + builder.SetSyncServerOption(builder.MAX_POLLERS, 10); + + server = builder.BuildAndStart(); + + server->Wait(); + +} + +void +MilvusServer::StopService() { + auto stop_server_worker = [&]{ + if (server != nullptr) { + server->Shutdown(); + } + }; + + std::shared_ptr stop_thread = std::make_shared(stop_server_worker); + stop_thread->join(); +} + +} +} +} \ No newline at end of file diff --git a/cpp/src/grpcserver/MilvusServer.h b/cpp/src/grpcserver/MilvusServer.h new file mode 100644 index 0000000000..10966300e4 --- /dev/null +++ b/cpp/src/grpcserver/MilvusServer.h @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited. + * Proprietary and confidential. + ******************************************************************************/ +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +using grpc::Channel; +using grpc::ClientContext; +using grpc::ClientReader; +using grpc::ClientReaderWriter; +using grpc::ClientWriter; + +namespace zilliz { +namespace milvus { +namespace server { +class MilvusServer { +public: + static void StartService(); + static void StopService(); +}; + +} +} +} diff --git a/cpp/src/grpcserver/RequestHandler.cpp b/cpp/src/grpcserver/RequestHandler.cpp new file mode 100644 index 0000000000..37f7d2f780 --- /dev/null +++ b/cpp/src/grpcserver/RequestHandler.cpp @@ -0,0 +1,120 @@ +/******************************************************************************* + * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited. + * Proprietary and confidential. + ******************************************************************************/ + +#include "RequestHandler.h" +#include "RequestTask.h" +#include "utils/TimeRecorder.h" + +namespace zilliz { +namespace milvus { +namespace server { + +::grpc::Status +RequestHandler::CreateTable(::grpc::ServerContext *context, const ::milvus::grpc::TableSchema *request, ::milvus::Status *response) { + BaseTaskPtr task_ptr = CreateTableTask::Create(*request); + RequestScheduler::ExecTask(task_ptr, response); + return ::grpc::Status::OK; +} + +//TODO: handle Response +::grpc::Status +RequestHandler::HasTable(::grpc::ServerContext *context, const ::milvus::grpc::TableName *request, ::milvus::grpc::BoolReply *response) { + bool has_table = false; + BaseTaskPtr task_ptr = HasTableTask::Create(request->table_name(), has_table); + ::milvus::Status grpc_status; + RequestScheduler::ExecTask(task_ptr, &grpc_status); + response->set_bool_reply(has_table); + response->mutable_status()->set_reason(grpc_status.reason()); + response->mutable_status()->set_error_code(grpc_status.error_code()); + return ::grpc::Status::OK; +} + +::grpc::Status +RequestHandler::DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) { + BaseTaskPtr task_ptr = DropTableTask::Create(request->table_name()); + RequestScheduler::ExecTask(task_ptr, response); + return ::grpc::Status::OK; +} + +::grpc::Status +RequestHandler::BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) { + BaseTaskPtr task_ptr = BuildIndexTask::Create(request->table_name()); + RequestScheduler::ExecTask(task_ptr, response); + return ::grpc::Status::OK; +} + +::grpc::Status +RequestHandler::InsertVector(::grpc::ServerContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response) { + BaseTaskPtr task_ptr = InsertVectorTask::Create(*request, *response); + ::milvus::Status grpc_status; + RequestScheduler::ExecTask(task_ptr, &grpc_status); + response->mutable_status()->set_reason(grpc_status.reason()); + response->mutable_status()->set_error_code(grpc_status.error_code()); + return ::grpc::Status::OK; +} + +::grpc::Status +RequestHandler::SearchVector(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInfos* request, ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult>* writer) { + std::vector file_id_array; + //TODO: handle status + BaseTaskPtr task_ptr = SearchVectorTask::Create(*request, file_id_array, *writer); + RequestScheduler::ExecTask(task_ptr, nullptr); + return ::grpc::Status::OK; +} + +::grpc::Status +RequestHandler::SearchVectorInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult>* writer) { + std::vector file_id_array; + BaseTaskPtr task_ptr = SearchVectorTask::Create(request->search_vector_infos(), file_id_array, *writer); + RequestScheduler::ExecTask(task_ptr, nullptr); + return ::grpc::Status::OK; +} + +::grpc::Status +RequestHandler::DescribeTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response) { + BaseTaskPtr task_ptr = DescribeTableTask::Create(request->table_name(), response); + ::milvus::Status grpc_status; + RequestScheduler::ExecTask(task_ptr, &grpc_status); + response->mutable_table_name()->mutable_status()->set_error_code(grpc_status.error_code()); + response->mutable_table_name()->mutable_status()->set_reason(grpc_status.reason()); + return ::grpc::Status::OK; +} + +::grpc::Status +RequestHandler::GetTableRowCount(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response) { + int64_t row_count = 0; + BaseTaskPtr task_ptr = GetTableRowCountTask::Create(request->table_name(), row_count); + ::milvus::Status grpc_status; + RequestScheduler::ExecTask(task_ptr, &grpc_status); + response->set_table_row_count(row_count); + response->mutable_status()->set_reason(grpc_status.reason()); + response->mutable_status()->set_error_code(grpc_status.error_code()); + return ::grpc::Status::OK; +} + +::grpc::Status +RequestHandler::ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::grpc::ServerWriter< ::milvus::grpc::TableName>* writer) { + BaseTaskPtr task_ptr = ShowTablesTask::Create(*writer); + RequestScheduler::ExecTask(task_ptr, nullptr); + return ::grpc::Status::OK; +} + +::grpc::Status +RequestHandler::Ping(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response) { + std::string result; + BaseTaskPtr task_ptr = PingTask::Create(request->cmd(), result); + ::milvus::Status grpc_status; + RequestScheduler::ExecTask(task_ptr, &grpc_status); + response->set_info(result); + response->mutable_status()->set_reason(grpc_status.reason()); + response->mutable_status()->set_error_code(grpc_status.error_code()); + return ::grpc::Status::OK; +} + + +} +} +} \ No newline at end of file diff --git a/cpp/src/grpcserver/RequestHandler.h b/cpp/src/grpcserver/RequestHandler.h new file mode 100644 index 0000000000..abc8ad574b --- /dev/null +++ b/cpp/src/grpcserver/RequestHandler.h @@ -0,0 +1,175 @@ +/******************************************************************************* + * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited. + * Proprietary and confidential. + ******************************************************************************/ +#pragma once + +#include +#include + +#include "milvus.grpc.pb.h" +#include "status.pb.h" + +namespace zilliz { +namespace milvus { +namespace server { +class RequestHandler final : public ::milvus::grpc::MilvusService::Service { +public: + /** + * @brief Create table method + * + * This method is used to create table + * + * @param param, use to provide table information to be created. + * + * + * @param param + */ + ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response); + + /** + * @brief Test table existence method + * + * This method is used to test table existence. + * + * @param table_name, table name is going to be tested. + * + * + * @param table_name + */ + ::grpc::Status HasTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response); + + /** + * @brief Drop table method + * + * This method is used to drop table. + * + * @param table_name, table name is going to be deleted. + * + * + * @param table_name + */ + ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response); + + /** + * @brief build index by table method + * + * This method is used to build index by table in sync. + * + * @param table_name, table name is going to be built index. + * + * + * @param table_name + */ + ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response); + + + /** + * @brief Insert vector array to table + * + * This method is used to insert vector array to table. + * + * @param table_name, table_name is inserted. + * @param record_array, vector array is inserted. + * + * @return vector id array + * + * @param table_name + * @param record_array + */ + ::grpc::Status InsertVector(::grpc::ServerContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response); + + /** + * @brief Query vector + * + * This method is used to query vector in table. + * + * @param table_name, table_name is queried. + * @param query_record_array, all vector are going to be queried. + * @param query_range_array, optional ranges for conditional search. If not specified, search whole table + * @param topk, how many similarity vectors will be searched. + * + * @return query result array. + * + * @param table_name + * @param query_record_array + * @param query_range_array + * @param topk + */ + ::grpc::Status SearchVector(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInfos* request, ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult>* writer); + + /** + * @brief Internal use query interface + * + * This method is used to query vector in specified files. + * + * @param file_id_array, specified files id array, queried. + * @param query_record_array, all vector are going to be queried. + * @param query_range_array, optional ranges for conditional search. If not specified, search whole table + * @param topk, how many similarity vectors will be searched. + * + * @return query result array. + * + * @param file_id_array + * @param query_record_array + * @param query_range_array + * @param topk + */ + ::grpc::Status SearchVectorInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult>* writer); + + /** + * @brief Get table schema + * + * This method is used to get table schema. + * + * @param table_name, target table name. + * + * @return table schema + * + * @param table_name + */ + ::grpc::Status DescribeTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response); + + /** + * @brief Get table row count + * + * This method is used to get table row count. + * + * @param table_name, target table name. + * + * @return table row count + * + * @param table_name + */ + ::grpc::Status GetTableRowCount(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response); + + /** + * @brief List all tables in database + * + * This method is used to list all tables. + * + * + * @return table names. + */ + ::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::grpc::ServerWriter< ::milvus::grpc::TableName>* writer); + + /** + * @brief Give the server status + * + * + * This method is used to give the server status. + * + * @return Server status. + * + * @param cmd + */ + ::grpc::Status Ping(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response); + +}; +} +} +} + + + diff --git a/cpp/src/grpcserver/RequestScheduler.cpp b/cpp/src/grpcserver/RequestScheduler.cpp new file mode 100644 index 0000000000..c290d95b9f --- /dev/null +++ b/cpp/src/grpcserver/RequestScheduler.cpp @@ -0,0 +1,221 @@ +/******************************************************************************* + * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited. + * Proprietary and confidential. + ******************************************************************************/ +#include "RequestScheduler.h" +#include "utils/Log.h" + +#include "../grpc/gen-status/status.pb.h" + +namespace zilliz { +namespace milvus { +namespace server { + +using namespace ::milvus; + +namespace { + const std::map &ErrorMap() { + static const std::map code_map = { + {SERVER_UNEXPECTED_ERROR, ErrorCode::UNEXPECTED_ERROR}, + {SERVER_UNSUPPORTED_ERROR, ErrorCode::UNEXPECTED_ERROR}, + {SERVER_NULL_POINTER, ErrorCode::UNEXPECTED_ERROR}, + {SERVER_INVALID_ARGUMENT, ErrorCode::ILLEGAL_ARGUMENT}, + {SERVER_FILE_NOT_FOUND, ErrorCode::FILE_NOT_FOUND}, + {SERVER_NOT_IMPLEMENT, ErrorCode::UNEXPECTED_ERROR}, + {SERVER_BLOCKING_QUEUE_EMPTY, ErrorCode::UNEXPECTED_ERROR}, + {SERVER_CANNOT_CREATE_FOLDER, ErrorCode::CANNOT_CREATE_FOLDER}, + {SERVER_CANNOT_CREATE_FILE, ErrorCode::CANNOT_CREATE_FILE}, + {SERVER_CANNOT_DELETE_FOLDER, ErrorCode::CANNOT_DELETE_FOLDER}, + {SERVER_CANNOT_DELETE_FILE, ErrorCode::CANNOT_DELETE_FILE}, + {SERVER_TABLE_NOT_EXIST, ErrorCode::TABLE_NOT_EXISTS}, + {SERVER_INVALID_TABLE_NAME, ErrorCode::ILLEGAL_TABLE_NAME}, + {SERVER_INVALID_TABLE_DIMENSION, ErrorCode::ILLEGAL_DIMENSION}, + {SERVER_INVALID_TIME_RANGE, ErrorCode::ILLEGAL_RANGE}, + {SERVER_INVALID_VECTOR_DIMENSION, ErrorCode::ILLEGAL_DIMENSION}, + + {SERVER_INVALID_INDEX_TYPE, ErrorCode::ILLEGAL_INDEX_TYPE}, + {SERVER_INVALID_ROWRECORD, ErrorCode::ILLEGAL_ROWRECORD}, + {SERVER_INVALID_ROWRECORD_ARRAY, ErrorCode::ILLEGAL_ROWRECORD}, + {SERVER_INVALID_TOPK, ErrorCode::ILLEGAL_TOPK}, + {SERVER_ILLEGAL_VECTOR_ID, ErrorCode::ILLEGAL_VECTOR_ID}, + {SERVER_ILLEGAL_SEARCH_RESULT, ErrorCode::ILLEGAL_SEARCH_RESULT}, + {SERVER_CACHE_ERROR, ErrorCode::CACHE_FAILED}, + {DB_META_TRANSACTION_FAILED, ErrorCode::META_FAILED}, + {SERVER_BUILD_INDEX_ERROR, ErrorCode::BUILD_INDEX_ERROR}, + }; + + return code_map; + } +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +BaseTask::BaseTask(const std::string& task_group, bool async) + : task_group_(task_group), + async_(async), + done_(false), + error_code_(SERVER_SUCCESS) { + +} + +BaseTask::~BaseTask() { + WaitToFinish(); +} + +ServerError BaseTask::Execute() { + error_code_ = OnExecute(); + done_ = true; + finish_cond_.notify_all(); + return error_code_; +} + +ServerError BaseTask::SetError(ServerError error_code, const std::string& error_msg) { + error_code_ = error_code; + error_msg_ = error_msg; + + SERVER_LOG_ERROR << error_msg_; + return error_code_; +} + +ServerError BaseTask::WaitToFinish() { + std::unique_lock lock(finish_mtx_); + finish_cond_.wait(lock, [this] { return done_; }); + + return error_code_; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +RequestScheduler::RequestScheduler() + : stopped_(false) { + Start(); +} + +RequestScheduler::~RequestScheduler() { + Stop(); +} + +void RequestScheduler::ExecTask(BaseTaskPtr& task_ptr, ::milvus::Status *grpc_status) { + if(task_ptr == nullptr) { + return; + } + + RequestScheduler& scheduler = RequestScheduler::GetInstance(); + scheduler.ExecuteTask(task_ptr); + + if(!task_ptr->IsAsync()) { + task_ptr->WaitToFinish(); + ServerError err = task_ptr->ErrorCode(); + if (err != SERVER_SUCCESS) { + //TODO:Handle exception + grpc_status->set_reason(task_ptr->ErrorMsg()); + grpc_status->set_error_code(::milvus::ErrorCode((int) err)); +// grpc_status.set_error_code(err); +// Exception ex; +// ex.__set_code(ErrorMap().at(err)); +// std::string msg = task_ptr->ErrorMsg(); +// if(msg.empty()){ +// msg = "Error message not set"; +// } +// ex.__set_reason(msg); +// throw ex; + } + } +} + +void RequestScheduler::Start() { + if(!stopped_) { + return; + } + + stopped_ = false; +} + +void RequestScheduler::Stop() { + if(stopped_) { + return; + } + + SERVER_LOG_INFO << "Scheduler gonna stop..."; + { + std::lock_guard lock(queue_mtx_); + for(auto iter : task_groups_) { + if(iter.second != nullptr) { + iter.second->Put(nullptr); + } + } + } + + for(auto iter : execute_threads_) { + if(iter == nullptr) + continue; + + iter->join(); + } + stopped_ = true; + SERVER_LOG_INFO << "Scheduler stopped"; +} + +ServerError RequestScheduler::ExecuteTask(const BaseTaskPtr& task_ptr) { + if(task_ptr == nullptr) { + return SERVER_NULL_POINTER; + } + + ServerError err = PutTaskToQueue(task_ptr); + if(err != SERVER_SUCCESS) { + return err; + } + + if(task_ptr->IsAsync()) { + return SERVER_SUCCESS;//async execution, caller need to call WaitToFinish at somewhere + } + + return task_ptr->WaitToFinish();//sync execution +} + +namespace { + void TakeTaskToExecute(TaskQueuePtr task_queue) { + if(task_queue == nullptr) { + return; + } + + while(true) { + BaseTaskPtr task = task_queue->Take(); + if (task == nullptr) { + break;//stop the thread + } + + try { + ServerError err = task->Execute(); + if(err != SERVER_SUCCESS) { + SERVER_LOG_ERROR << "Task failed with code: " << err; + } + } catch (std::exception& ex) { + SERVER_LOG_ERROR << "Task failed to execute: " << ex.what(); + } + } + } +} + +ServerError RequestScheduler::PutTaskToQueue(const BaseTaskPtr& task_ptr) { + std::lock_guard lock(queue_mtx_); + + std::string group_name = task_ptr->TaskGroup(); + if(task_groups_.count(group_name) > 0) { + task_groups_[group_name]->Put(task_ptr); + } else { + TaskQueuePtr queue = std::make_shared(); + queue->Put(task_ptr); + task_groups_.insert(std::make_pair(group_name, queue)); + + //start a thread + ThreadPtr thread = std::make_shared(&TakeTaskToExecute, queue); + execute_threads_.push_back(thread); + SERVER_LOG_INFO << "Create new thread for task group: " << group_name; + } + + return SERVER_SUCCESS; +} + +} +} +} diff --git a/cpp/src/grpcserver/RequestScheduler.h b/cpp/src/grpcserver/RequestScheduler.h new file mode 100644 index 0000000000..c4440cdffe --- /dev/null +++ b/cpp/src/grpcserver/RequestScheduler.h @@ -0,0 +1,90 @@ +/******************************************************************************* + * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited. + * Proprietary and confidential. + ******************************************************************************/ +#pragma once + +#include "utils/BlockingQueue.h" +#include "status.grpc.pb.h" +#include "status.pb.h" + +#include +#include +#include + +namespace zilliz { +namespace milvus { +namespace server { + +class BaseTask { +protected: + BaseTask(const std::string& task_group, bool async = false); + virtual ~BaseTask(); + +public: + ServerError Execute(); + ServerError WaitToFinish(); + + std::string TaskGroup() const { return task_group_; } + + ServerError ErrorCode() const { return error_code_; } + std::string ErrorMsg() const { return error_msg_; } + + bool IsAsync() const { return async_; } + +protected: + virtual ServerError OnExecute() = 0; + + ServerError SetError(ServerError error_code, const std::string& msg); + +protected: + mutable std::mutex finish_mtx_; + std::condition_variable finish_cond_; + + std::string task_group_; + bool async_; + bool done_; + ServerError error_code_; + std::string error_msg_; +}; + +using BaseTaskPtr = std::shared_ptr; +using TaskQueue = BlockingQueue; +using TaskQueuePtr = std::shared_ptr; +using ThreadPtr = std::shared_ptr; + +class RequestScheduler { +public: + static RequestScheduler& GetInstance() { + static RequestScheduler scheduler; + return scheduler; + } + + void Start(); + void Stop(); + + ServerError ExecuteTask(const BaseTaskPtr& task_ptr); + + static void ExecTask(BaseTaskPtr& task_ptr, ::milvus::Status* grpc_status); + +protected: + RequestScheduler(); + virtual ~RequestScheduler(); + + ServerError PutTaskToQueue(const BaseTaskPtr& task_ptr); + +private: + mutable std::mutex queue_mtx_; + + std::map task_groups_; + + std::vector execute_threads_; + + bool stopped_; +}; + + +} +} +} diff --git a/cpp/src/grpcserver/RequestTask.cpp b/cpp/src/grpcserver/RequestTask.cpp new file mode 100644 index 0000000000..06b2218b4c --- /dev/null +++ b/cpp/src/grpcserver/RequestTask.cpp @@ -0,0 +1,649 @@ +/******************************************************************************* + * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited. + * Proprietary and confidential. + ******************************************************************************/ +#include "RequestTask.h" +#include "ServerConfig.h" +#include "utils/CommonUtil.h" +#include "utils/Log.h" +#include "utils/TimeRecorder.h" +#include "utils/ValidationUtil.h" +#include "DBWrapper.h" +#include "version.h" +#include "MilvusServer.h" + +#include "Server.h" + +namespace zilliz { +namespace milvus { +namespace server { +static const std::string DQL_TASK_GROUP = "dql"; +static const std::string DDL_DML_TASK_GROUP = "ddl_dml"; +static const std::string PING_TASK_GROUP = "ping"; + +using DB_META = zilliz::milvus::engine::meta::Meta; +using DB_DATE = zilliz::milvus::engine::meta::DateT; + +namespace { + engine::EngineType EngineType(int type) { + static std::map map_type = { + {0, engine::EngineType::INVALID}, + {1, engine::EngineType::FAISS_IDMAP}, + {2, engine::EngineType::FAISS_IVFFLAT}, + {3, engine::EngineType::FAISS_IVFSQ8}, + }; + + if(map_type.find(type) == map_type.end()) { + return engine::EngineType::INVALID; + } + + return map_type[type]; + } + + int IndexType(engine::EngineType type) { + static std::map map_type = { + {engine::EngineType::INVALID, 0}, + {engine::EngineType::FAISS_IDMAP, 1}, + {engine::EngineType::FAISS_IVFFLAT, 2}, + {engine::EngineType::FAISS_IVFSQ8, 3}, + }; + + if(map_type.find(type) == map_type.end()) { + return 0; + } + + return map_type[type]; + } + + void + ConvertRowRecordToFloatArray(const ::milvus::grpc::InsertInfos insert_infos, + uint64_t dimension, + std::vector& float_array) { + uint64_t vec_count = insert_infos.row_record_array_size(); + float_array.resize(vec_count * dimension);//allocate enough memory + for(uint64_t i = 0; i < vec_count; i++) { + for (uint64_t j = 0; j < dimension; j++) { + float_array[i * dimension + j] = insert_infos.row_record_array(i).vector_data(j); + } + } + } + + static constexpr long DAY_SECONDS = 86400; + + void + ConvertTimeRangeToDBDates(const std::vector<::milvus::grpc::Range> &range_array, + std::vector& dates, + ServerError& error_code, + std::string& error_msg) { + dates.clear(); + for(auto& range : range_array) { + time_t tt_start, tt_end; + tm tm_start, tm_end; + if(!CommonUtil::TimeStrToTime(range.start_value(), tt_start, tm_start)){ + error_code = SERVER_INVALID_TIME_RANGE; + error_msg = "Invalid time range: " + range.start_value(); + return; + } + + if(!CommonUtil::TimeStrToTime(range.end_value(), tt_end, tm_end)){ + error_code = SERVER_INVALID_TIME_RANGE; + error_msg = "Invalid time range: " + range.start_value(); + return; + } + + long days = (tt_end > tt_start) ? (tt_end - tt_start)/DAY_SECONDS : (tt_start - tt_end)/DAY_SECONDS; + if(days == 0) { + error_code = SERVER_INVALID_TIME_RANGE; + error_msg = "Invalid time range: " + range.start_value() + " to " + range.end_value(); + return ; + } + + for(long i = 0; i < days; i++) { + time_t tt_day = tt_start + DAY_SECONDS*i; + tm tm_day; + CommonUtil::ConvertTime(tt_day, tm_day); + + long date = tm_day.tm_year*10000 + tm_day.tm_mon*100 + tm_day.tm_mday;//according to db logic + dates.push_back(date); + } + } + } +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +CreateTableTask::CreateTableTask(const ::milvus::grpc::TableSchema schema) + : BaseTask(DDL_DML_TASK_GROUP), + schema_(schema) { + +} + +BaseTaskPtr CreateTableTask::Create(const ::milvus::grpc::TableSchema schema) { + return std::shared_ptr(new CreateTableTask(schema)); +} + +ServerError CreateTableTask::OnExecute() { + TimeRecorder rc("CreateTableTask"); + + try { + //step 1: check arguments + ServerError res = SERVER_SUCCESS; + res = ValidateTableName(schema_.table_name().table_name()); + if(res != SERVER_SUCCESS) { + return SetError(res, "Invalid table name: " + schema_.table_name().table_name()); + } + + res = ValidateTableDimension(schema_.dimension()); + if(res != SERVER_SUCCESS) { + return SetError(res, "Invalid table dimension: " + std::to_string(schema_.dimension())); + } + + res = ValidateTableIndexType(schema_.index_type()); + if(res != SERVER_SUCCESS) { + return SetError(res, "Invalid index type: " + std::to_string(schema_.index_type())); + } + + //step 2: construct table schema + engine::meta::TableSchema table_info; + table_info.dimension_ = (uint16_t)schema_.dimension(); + table_info.table_id_ = schema_.table_name().table_name(); + table_info.engine_type_ = (int)EngineType(schema_.index_type()); + table_info.store_raw_data_ = schema_.store_raw_vector(); + + //step 3: create table + engine::Status stat = DBWrapper::DB()->CreateTable(table_info); + if(!stat.ok()) {//table could exist + return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); + } + + } catch (std::exception& ex) { + return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); + } + + rc.Record("done"); + + return SERVER_SUCCESS; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +DescribeTableTask::DescribeTableTask(const std::string &table_name, ::milvus::grpc::TableSchema *schema) + : BaseTask(DDL_DML_TASK_GROUP), + table_name_(table_name), + schema_(schema) { +} + +BaseTaskPtr DescribeTableTask::Create(const std::string& table_name, ::milvus::grpc::TableSchema *schema) { + return std::shared_ptr(new DescribeTableTask(table_name, schema)); +} + +ServerError DescribeTableTask::OnExecute() { + TimeRecorder rc("DescribeTableTask"); + + try { + //step 1: check arguments + ServerError res = SERVER_SUCCESS; + res = ValidateTableName(table_name_); + if(res != SERVER_SUCCESS) { + return SetError(res, "Invalid table name: " + table_name_); + } + + //step 2: get table info + engine::meta::TableSchema table_info; + table_info.table_id_ = table_name_; + engine::Status stat = DBWrapper::DB()->DescribeTable(table_info); + if(!stat.ok()) { + return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); + } + + schema_->mutable_table_name()->set_table_name(table_info.table_id_); + + schema_->set_index_type(IndexType((engine::EngineType)table_info.engine_type_)); + schema_->set_dimension(table_info.dimension_); + schema_->set_store_raw_vector(table_info.store_raw_data_); + + } catch (std::exception& ex) { + return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); + } + + rc.Record("done"); + + return SERVER_SUCCESS; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +BuildIndexTask::BuildIndexTask(const std::string& table_name) + : BaseTask(DDL_DML_TASK_GROUP), + table_name_(table_name) { +} + +BaseTaskPtr BuildIndexTask::Create(const std::string& table_name) { + return std::shared_ptr(new BuildIndexTask(table_name)); +} + +ServerError BuildIndexTask::OnExecute() { + try { + TimeRecorder rc("BuildIndexTask"); + + //step 1: check arguments + ServerError res = SERVER_SUCCESS; + res = ValidateTableName(table_name_); + if(res != SERVER_SUCCESS) { + return SetError(res, "Invalid table name: " + table_name_); + } + + bool has_table = false; + engine::Status stat = DBWrapper::DB()->HasTable(table_name_, has_table); + if(!has_table) { + return SetError(SERVER_TABLE_NOT_EXIST, "Table " + table_name_ + " not exists"); + } + + //step 2: check table existence + stat = DBWrapper::DB()->BuildIndex(table_name_); + if(!stat.ok()) { + return SetError(SERVER_BUILD_INDEX_ERROR, "Engine failed: " + stat.ToString()); + } + + rc.Elapse("totally cost"); + } catch (std::exception& ex) { + return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); + } + + return SERVER_SUCCESS; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +HasTableTask::HasTableTask(const std::string table_name, bool& has_table) + : BaseTask(DDL_DML_TASK_GROUP), + table_name_(table_name), + has_table_(has_table) { + +} + +BaseTaskPtr HasTableTask::Create(const std::string table_name, bool& has_table) { + return std::shared_ptr(new HasTableTask(table_name, has_table)); +} + +ServerError HasTableTask::OnExecute() { + try { + TimeRecorder rc("HasTableTask"); + + //step 1: check arguments + ServerError res = SERVER_SUCCESS; + res = ValidateTableName(table_name_); + if(res != SERVER_SUCCESS) { + return SetError(res, "Invalid table name: " + table_name_); + } + + //step 2: check table existence + engine::Status stat = DBWrapper::DB()->HasTable(table_name_, has_table_); + if(!stat.ok()) { + return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); + } + + rc.Elapse("totally cost"); + } catch (std::exception& ex) { + return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); + } + + return SERVER_SUCCESS; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +DropTableTask::DropTableTask(const std::string& table_name) + : BaseTask(DDL_DML_TASK_GROUP), + table_name_(table_name) { + +} + +BaseTaskPtr DropTableTask::Create(const std::string& table_name) { + return std::shared_ptr(new DropTableTask(table_name)); +} + +ServerError DropTableTask::OnExecute() { + try { + TimeRecorder rc("DropTableTask"); + + //step 1: check arguments + ServerError res = SERVER_SUCCESS; + res = ValidateTableName(table_name_); + if(res != SERVER_SUCCESS) { + return SetError(res, "Invalid table name: " + table_name_); + } + + //step 2: check table existence + engine::meta::TableSchema table_info; + table_info.table_id_ = table_name_; + engine::Status stat = DBWrapper::DB()->DescribeTable(table_info); + if(!stat.ok()) { + if(stat.IsNotFound()) { + return SetError(SERVER_TABLE_NOT_EXIST, "Table " + table_name_ + " not exists"); + } else { + return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); + } + } + + rc.Record("check validation"); + + //step 3: Drop table + std::vector dates; + stat = DBWrapper::DB()->DeleteTable(table_name_, dates); + if(!stat.ok()) { + return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); + } + + rc.Record("drop table"); + rc.Elapse("total cost"); + } catch (std::exception& ex) { + return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); + } + + return SERVER_SUCCESS; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +ShowTablesTask::ShowTablesTask(::grpc::ServerWriter< ::milvus::grpc::TableName> writer) + : BaseTask(DDL_DML_TASK_GROUP), + writer_(writer) { + +} + +BaseTaskPtr ShowTablesTask::Create(::grpc::ServerWriter< ::milvus::grpc::TableName> writer) { + return std::shared_ptr(new ShowTablesTask(writer)); +} + +ServerError ShowTablesTask::OnExecute() { + std::vector schema_array; + engine::Status stat = DBWrapper::DB()->AllTables(schema_array); + if(!stat.ok()) { + return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); + } + + for(auto& schema : schema_array) { + ::milvus::grpc::TableName tableName; + tableName.set_table_name(schema.table_id_); + writer_.Write(tableName); + } + return SERVER_SUCCESS; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +InsertVectorTask::InsertVectorTask(const ::milvus::grpc::InsertInfos insert_infos, + ::milvus::grpc::VectorIds& record_ids) + : BaseTask(DDL_DML_TASK_GROUP), + insert_infos_(insert_infos), + record_ids_(record_ids) { + record_ids_.Clear(); +} + +BaseTaskPtr InsertVectorTask::Create(const ::milvus::grpc::InsertInfos insert_infos, + ::milvus::grpc::VectorIds& record_ids) { + return std::shared_ptr(new InsertVectorTask(insert_infos, record_ids)); +} + +ServerError InsertVectorTask::OnExecute() { + try { + TimeRecorder rc("InsertVectorTask"); + + //step 1: check arguments + ServerError res = SERVER_SUCCESS; + res = ValidateTableName(insert_infos_.table_name()); + if(res != SERVER_SUCCESS) { + return SetError(res, "Invalid table name: " + insert_infos_.table_name()); + } + if(insert_infos_.row_record_array().empty()) { + return SetError(SERVER_INVALID_ROWRECORD_ARRAY, "Row record array is empty"); + } + + //step 2: check table existence + engine::meta::TableSchema table_info; + table_info.table_id_ = insert_infos_.table_name(); + engine::Status stat = DBWrapper::DB()->DescribeTable(table_info); + if(!stat.ok()) { + if(stat.IsNotFound()) { + return SetError(SERVER_TABLE_NOT_EXIST, "Table " + insert_infos_.table_name() + " not exists"); + } else { + return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); + } + } + + rc.Record("check validation"); + + //step 3: prepare float data + std::vector vec_f; + + vec_f.resize(insert_infos_.row_record_array_size() * table_info.dimension_); + for (size_t i = 0; i < insert_infos_.row_record_array_size(); i++) { + for (size_t j = 0; j < table_info.dimension_; j++) { + vec_f[i * table_info.dimension_ + j] = insert_infos_.row_record_array(i).vector_data(j); + } + } + + rc.Record("prepare vectors data"); + + //step 4: insert vectors + uint64_t vec_count = (uint64_t)insert_infos_.row_record_array_size(); + std::vector vec_ids; + vec_ids.resize(record_ids_.vector_id_array_size()); + vec_ids.clear(); + + stat = DBWrapper::DB()->InsertVectors(insert_infos_.table_name(), vec_count, vec_f.data(), vec_ids); + rc.Record("add vectors to engine"); + if(!stat.ok()) { + return SetError(SERVER_CACHE_ERROR, "Cache error: " + stat.ToString()); + } + for (size_t i = 0; i < vec_ids.size(); i++) { + record_ids_.add_vector_id_array(vec_ids.at(i)); + } + + if(record_ids_.vector_id_array_size() != vec_count) { + std::string msg = "Add " + std::to_string(vec_count) + " vectors but only return " + + std::to_string(record_ids_.vector_id_array_size()) + " id"; + return SetError(SERVER_ILLEGAL_VECTOR_ID, msg); + } + + rc.Record("do insert"); + rc.Elapse("total cost"); + + } catch (std::exception& ex) { + return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); + } + + return SERVER_SUCCESS; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +SearchVectorTask::SearchVectorTask(const ::milvus::grpc::SearchVectorInfos searchVectorInfos, + const std::vector file_id_array, + ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult> writer) + : BaseTask(DQL_TASK_GROUP), + searchVector_infos_(searchVectorInfos), + file_id_array_(file_id_array), + writer_(writer) { + +} + +BaseTaskPtr SearchVectorTask::Create(const ::milvus::grpc::SearchVectorInfos searchVectorInfos, + const std::vector file_id_array, + ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult> writer) { + return std::shared_ptr(new SearchVectorTask(searchVectorInfos, file_id_array, + writer)); +} + +ServerError SearchVectorTask::OnExecute() { + try { + TimeRecorder rc("SearchVectorTask"); + + //step 1: check arguments + ServerError res = SERVER_SUCCESS; + std::string table_name_ = searchVector_infos_.table_name(); + res = ValidateTableName(table_name_); + if(res != SERVER_SUCCESS) { + return SetError(res, "Invalid table name: " + table_name_); + } + + int top_k_ = searchVector_infos_.topk(); + + if(top_k_ <= 0) { + return SetError(SERVER_INVALID_TOPK, "Invalid topk: " + std::to_string( + top_k_)); + } + if(searchVector_infos_.query_record_array().empty()) { + return SetError(SERVER_INVALID_ROWRECORD_ARRAY, "Row record array is empty"); + } + + //step 2: check table existence + engine::meta::TableSchema table_info; + table_info.table_id_ = table_name_; + engine::Status stat = DBWrapper::DB()->DescribeTable(table_info); + if(!stat.ok()) { + if(stat.IsNotFound()) { + return SetError(SERVER_TABLE_NOT_EXIST, "Table " + table_name_ + " not exists"); + } else { + return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); + } + } + + //step 3: check date range, and convert to db dates + std::vector dates; + ServerError error_code = SERVER_SUCCESS; + std::string error_msg; + + std::vector<::milvus::grpc::Range> range_array; + for (size_t i = 0; i < searchVector_infos_.query_range_array_size(); i++) { + range_array.emplace_back(searchVector_infos_.query_range_array(i)); + } + ConvertTimeRangeToDBDates(range_array, dates, error_code, error_msg); + if(error_code != SERVER_SUCCESS) { + return SetError(error_code, error_msg); + } + + rc.Record("check validation"); + + //step 3: prepare float data + std::vector vec_f; + vec_f.resize(searchVector_infos_.query_record_array_size() * table_info.dimension_); +// vec_f.resize(searchVector_infos_.query_range_array_size() * table_info.dimension_); + for (size_t i = 0; i < searchVector_infos_.query_record_array_size(); i++) { + for (size_t j = 0; j < table_info.dimension_; j++) { + vec_f[i * table_info.dimension_ + j] = searchVector_infos_.query_record_array(i).vector_data(j); + } + } + rc.Record("prepare vector data"); + + //step 4: search vectors + engine::QueryResults results; + uint64_t record_count = (uint64_t)searchVector_infos_.query_record_array().size(); + + if(file_id_array_.empty()) { + stat = DBWrapper::DB()->Query(table_name_, (size_t) top_k_, record_count, vec_f.data(), dates, results); + } else { + stat = DBWrapper::DB()->Query(table_name_, file_id_array_, + (size_t) top_k_, record_count, vec_f.data(), dates, results); + } + + rc.Record("search vectors from engine"); + if(!stat.ok()) { + return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); + } + + if(results.empty()) { + return SERVER_SUCCESS; //empty table + } + + if(results.size() != record_count) { + std::string msg = "Search " + std::to_string(record_count) + " vectors but only return " + + std::to_string(results.size()) + " results"; + return SetError(SERVER_ILLEGAL_SEARCH_RESULT, msg); + } + + rc.Record("do search"); + + //step 5: construct result array + for(uint64_t i = 0; i < record_count; i++) { + auto& result = results[i]; + const auto &record = searchVector_infos_.query_record_array(i); + ::milvus::grpc::TopKQueryResult grpc_topk_result; + for(auto& pair : result) { + ::milvus::grpc::QueryResult *grpc_result = grpc_topk_result.add_query_result_arrays(); + grpc_result->set_id(pair.first); + grpc_result->set_distance(pair.second); + } + writer_.Write(grpc_topk_result); + } + rc.Record("construct result"); + rc.Elapse("total cost"); + + } catch (std::exception& ex) { + return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); + } + + return SERVER_SUCCESS; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +GetTableRowCountTask::GetTableRowCountTask(const std::string table_name, int64_t& row_count) + : BaseTask(DDL_DML_TASK_GROUP), + table_name_(table_name), + row_count_(row_count) { + +} + +BaseTaskPtr GetTableRowCountTask::Create(const std::string table_name, int64_t& row_count) { + return std::shared_ptr(new GetTableRowCountTask(table_name, row_count)); +} + +ServerError GetTableRowCountTask::OnExecute() { + try { + TimeRecorder rc("GetTableRowCountTask"); + + //step 1: check arguments + ServerError res = SERVER_SUCCESS; + res = ValidateTableName(table_name_); + if(res != SERVER_SUCCESS) { + return SetError(res, "Invalid table name: " + table_name_); + } + + //step 2: get row count + uint64_t row_count = 0; + engine::Status stat = DBWrapper::DB()->GetTableRowCount(table_name_, row_count); + if (!stat.ok()) { + return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); + } + + row_count_ = (int64_t) row_count; + + rc.Elapse("total cost"); + + } catch (std::exception& ex) { + return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); + } + + return SERVER_SUCCESS; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +PingTask::PingTask(const std::string& cmd, std::string& result) + : BaseTask(PING_TASK_GROUP), + cmd_(cmd), + result_(result) { + +} + +BaseTaskPtr PingTask::Create(const std::string& cmd, std::string& result) { + return std::shared_ptr(new PingTask(cmd, result)); +} + +ServerError PingTask::OnExecute() { + if(cmd_ == "version") { + result_ = MILVUS_VERSION; + } else if (cmd_ == "disconnect") { + //TODO stopservice +// MilvusServer::StopService(); + } + + return SERVER_SUCCESS; +} + +} +} +} \ No newline at end of file diff --git a/cpp/src/grpcserver/RequestTask.h b/cpp/src/grpcserver/RequestTask.h new file mode 100644 index 0000000000..f7b45775d4 --- /dev/null +++ b/cpp/src/grpcserver/RequestTask.h @@ -0,0 +1,180 @@ +/******************************************************************************* + * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited. + * Proprietary and confidential. + ******************************************************************************/ +#pragma once +#include "RequestScheduler.h" +#include "utils/Error.h" +#include "db/Types.h" + +#include "milvus.grpc.pb.h" +#include "status.pb.h" + +#include +#include + +namespace zilliz { +namespace milvus { +namespace server { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +class CreateTableTask : public BaseTask { +public: + static BaseTaskPtr Create(const ::milvus::grpc::TableSchema schema); + +protected: + CreateTableTask(const ::milvus::grpc::TableSchema request); + + ServerError OnExecute() override; + +private: + const ::milvus::grpc::TableSchema schema_; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +class HasTableTask : public BaseTask { +public: + static BaseTaskPtr Create(const std::string table_name, bool& has_table); + +protected: + HasTableTask(const std::string request, bool& has_table); + + ServerError OnExecute() override; + + +private: + std::string table_name_; + bool has_table_; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +class DescribeTableTask : public BaseTask { +public: + static BaseTaskPtr Create(const std::string& table_name, ::milvus::grpc::TableSchema* schema); + +protected: + DescribeTableTask(const std::string& table_name, ::milvus::grpc::TableSchema* schema); + + ServerError OnExecute() override; + + +private: + std::string table_name_; + ::milvus::grpc::TableSchema* schema_; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +class DropTableTask : public BaseTask { +public: + static BaseTaskPtr Create(const std::string& table_name); + +protected: + DropTableTask(const std::string& table_name); + + ServerError OnExecute() override; + + +private: + std::string table_name_; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +class BuildIndexTask : public BaseTask { +public: + static BaseTaskPtr Create(const std::string& table_name); + +protected: + BuildIndexTask(const std::string& table_name); + + ServerError OnExecute() override; + + +private: + std::string table_name_; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +class ShowTablesTask : public BaseTask { +public: + static BaseTaskPtr Create(::grpc::ServerWriter< ::milvus::grpc::TableName> writer); + +protected: + ShowTablesTask(::grpc::ServerWriter< ::milvus::grpc::TableName> writer); + + ServerError OnExecute() override; + +private: + ::grpc::ServerWriter< ::milvus::grpc::TableName> writer_; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +class InsertVectorTask : public BaseTask { +public: + static BaseTaskPtr Create(const ::milvus::grpc::InsertInfos insert_infos, + ::milvus::grpc::VectorIds& record_ids_); + +protected: + InsertVectorTask(const ::milvus::grpc::InsertInfos insert_infos, + ::milvus::grpc::VectorIds& record_ids_); + + ServerError OnExecute() override; + +private: + const ::milvus::grpc::InsertInfos insert_infos_; + ::milvus::grpc::VectorIds& record_ids_; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +class SearchVectorTask : public BaseTask { +public: + static BaseTaskPtr Create(const ::milvus::grpc::SearchVectorInfos searchVectorInfos, + const std::vector file_id_array, + ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult> writer); + +protected: + SearchVectorTask(const ::milvus::grpc::SearchVectorInfos searchVectorInfos, + const std::vector file_id_array, + ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult> writer); + + ServerError OnExecute() override; + +private: + const ::milvus::grpc::SearchVectorInfos searchVector_infos_; + std::vector file_id_array_; + ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult> writer_; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +class GetTableRowCountTask : public BaseTask { +public: + static BaseTaskPtr Create(const std::string table_name, int64_t& row_count); + +protected: + GetTableRowCountTask(const std::string table_name, int64_t& row_count); + + ServerError OnExecute() override; + +private: + std::string table_name_; + int64_t row_count_; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +class PingTask : public BaseTask { +public: + static BaseTaskPtr Create(const std::string& cmd, std::string& result); + +protected: + PingTask(const std::string& cmd, std::string& result); + + ServerError OnExecute() override; + +private: + std::string cmd_; + std::string& result_; +}; + +} +} +} \ No newline at end of file diff --git a/cpp/src/grpcserver/Server.cpp b/cpp/src/grpcserver/Server.cpp new file mode 100644 index 0000000000..a79a8c7357 --- /dev/null +++ b/cpp/src/grpcserver/Server.cpp @@ -0,0 +1,245 @@ +//////////////////////////////////////////////////////////////////////////////// +// Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +// Unauthorized copying of this file, via any medium is strictly prohibited. +// Proprietary and confidential. +//////////////////////////////////////////////////////////////////////////////// +#include "Server.h" +#include "ServerConfig.h" +#include "MilvusServer.h" +#include "utils/Log.h" +#include "utils/SignalUtil.h" +#include "utils/TimeRecorder.h" +#include "license/LicenseCheck.h" +#include "metrics/Metrics.h" + +#include +#include +#include +#include +//#include +#include +#include + +#include "metrics/Metrics.h" + +namespace zilliz { +namespace milvus { +namespace server { + +Server* +Server::Instance() { + static Server server; + return &server; +} + +Server::Server() { + +} +Server::~Server() { + +} + +void +Server::Init(int64_t daemonized, const std::string& pid_filename, const std::string& config_filename) { + daemonized_ = daemonized; + pid_filename_ = pid_filename; + config_filename_ = config_filename; +} + +void +Server::Daemonize() { + if (daemonized_ == 0) { + return; + } + + SERVER_LOG_INFO << "Milvus server run in daemonize mode"; + +// std::string log_path(GetLogDirFullPath()); +// log_path += "zdb_server.(INFO/WARNNING/ERROR/CRITICAL)"; +// SERVER_LOG_INFO << "Log will be exported to: " + log_path); + + pid_t pid = 0; + + // Fork off the parent process + pid = fork(); + + // An error occurred + if (pid < 0) { + exit(EXIT_FAILURE); + } + + // Success: terminate parent + if (pid > 0) { + exit(EXIT_SUCCESS); + } + + // On success: The child process becomes session leader + if (setsid() < 0) { + exit(EXIT_FAILURE); + } + + // Ignore signal sent from child to parent process + signal(SIGCHLD, SIG_IGN); + + // Fork off for the second time + pid = fork(); + + // An error occurred + if (pid < 0) { + exit(EXIT_FAILURE); + } + + // Terminate the parent + if (pid > 0) { + exit(EXIT_SUCCESS); + } + + // Set new file permissions + umask(0); + + // Change the working directory to root + int ret = chdir("/"); + if(ret != 0){ + return; + } + + // Close all open fd + for (long fd = sysconf(_SC_OPEN_MAX); fd > 0; fd--) { + close(fd); + } + + SERVER_LOG_INFO << "Redirect stdin/stdout/stderr to /dev/null"; + + // Redirect stdin/stdout/stderr to /dev/null + stdin = fopen("/dev/null", "r"); + stdout = fopen("/dev/null", "w+"); + stderr = fopen("/dev/null", "w+"); + // Try to write PID of daemon to lockfile + if (!pid_filename_.empty()) { + pid_fd = open(pid_filename_.c_str(), O_RDWR | O_CREAT, 0640); + if (pid_fd < 0) { + SERVER_LOG_INFO << "Can't open filename: " + pid_filename_ + ", Error: " + strerror(errno); + exit(EXIT_FAILURE); + } + if (lockf(pid_fd, F_TLOCK, 0) < 0) { + SERVER_LOG_INFO << "Can't lock filename: " + pid_filename_ + ", Error: " + strerror(errno); + exit(EXIT_FAILURE); + } + + std::string pid_file_context = std::to_string(getpid()); + ssize_t res = write(pid_fd, pid_file_context.c_str(), pid_file_context.size()); + if(res != 0){ + return; + } + } +} + +int +Server::Start() { + + if (daemonized_) { + Daemonize(); + } + + do { + try { + // Read config file + if(LoadConfig() != SERVER_SUCCESS) { + return 1; + } + + //log path is defined by LoadConfig, so InitLog must be called after LoadConfig + ServerConfig &config = ServerConfig::GetInstance(); + ConfigNode server_config = config.GetConfig(CONFIG_SERVER); + +#ifdef ENABLE_LICENSE + ConfigNode license_config = config.GetConfig(CONFIG_LICENSE); + std::string license_file_path = license_config.GetValue(CONFIG_LICENSE_PATH); + SERVER_LOG_INFO << "License path: " << license_file_path; + + if(server::LicenseCheck::LegalityCheck(license_file_path) != SERVER_SUCCESS) { + SERVER_LOG_ERROR << "License check failed"; + exit(1); + } + + server::LicenseCheck::GetInstance().StartCountingDown(license_file_path); +#endif + + // Handle Signal + signal(SIGINT, SignalUtil::HandleSignal); + signal(SIGHUP, SignalUtil::HandleSignal); + signal(SIGTERM, SignalUtil::HandleSignal); + server::Metrics::GetInstance().Init(); + server::SystemInfo::GetInstance().Init(); + std::cout << "Milvus server start successfully." << std::endl; + StartService(); + + } catch(std::exception& ex){ + SERVER_LOG_ERROR << "Milvus server encounter exception: " << std::string(ex.what()) + << "Is another server instance running?"; + break; + } + } while(false); + + Stop(); + return 0; +} + +void +Server::Stop() { + std::cout << "Milvus server is going to shutdown ..." << std::endl; + + // Unlock and close lockfile + if (pid_fd != -1) { + int ret = lockf(pid_fd, F_ULOCK, 0); + if(ret != 0){ + std::cout << "Can't lock file: " << strerror(errno) << std::endl; + exit(0); + } + ret = close(pid_fd); + if(ret != 0){ + std::cout << "Can't close file: " << strerror(errno) << std::endl; + exit(0); + } + } + + // Try to delete lockfile + if (!pid_filename_.empty()) { + int ret = unlink(pid_filename_.c_str()); + if(ret != 0){ + std::cout << "Can't unlink file: " << strerror(errno) << std::endl; + exit(0); + } + } + + running_ = 0; + + StopService(); + +#ifdef ENABLE_LICENSE + server::LicenseCheck::GetInstance().StopCountingDown(); +#endif + std::cout << "Milvus server is closed!" << std::endl; +} + + +ServerError +Server::LoadConfig() { + ServerConfig::GetInstance().LoadConfigFile(config_filename_); + + return SERVER_SUCCESS; +} + +void +Server::StartService() { + MilvusServer::StartService(); +} + +void +Server::StopService() { + MilvusServer::StopService(); +} + +} +} +} diff --git a/cpp/src/grpcserver/Server.h b/cpp/src/grpcserver/Server.h new file mode 100644 index 0000000000..58e676f7ff --- /dev/null +++ b/cpp/src/grpcserver/Server.h @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited. + * Proprietary and confidential. + ******************************************************************************/ +#pragma once + +#include "utils/Error.h" + +#include +#include + +namespace zilliz { +namespace milvus { +namespace server { + +class Server { + public: + static Server* Instance(); + + void Init(int64_t daemonized, const std::string& pid_filename, const std::string& config_filename); + int Start(); + void Stop(); + + private: + Server(); + ~Server(); + + void Daemonize(); + + static void HandleSignal(int signal); + ServerError LoadConfig(); + + void StartService(); + void StopService(); + + private: + int64_t daemonized_ = 0; + int64_t running_ = 1; + int pid_fd = -1; + std::string pid_filename_; + std::string config_filename_; +}; // Server + +} // server +} // sql +} // zilliz diff --git a/cpp/src/grpcserver/ServerConfig.cpp b/cpp/src/grpcserver/ServerConfig.cpp new file mode 100644 index 0000000000..736a249e25 --- /dev/null +++ b/cpp/src/grpcserver/ServerConfig.cpp @@ -0,0 +1,82 @@ +//////////////////////////////////////////////////////////////////////////////// +// Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +// Unauthorized copying of this file, via any medium is strictly prohibited. +// Proprietary and confidential. +//////////////////////////////////////////////////////////////////////////////// +#include "ServerConfig.h" + +#include +#include +#include +#include +#include + +#include "config/IConfigMgr.h" + +namespace zilliz { +namespace milvus { +namespace server { + +ServerConfig& +ServerConfig::GetInstance() { + static ServerConfig config; + return config; +} + +ServerError +ServerConfig::LoadConfigFile(const std::string& config_filename) { + std::string filename = config_filename; + if(filename.empty()){ + std::cout << "ERROR: a config file is required" << std::endl; + exit(1);//directly exit program if config file not specified + } + struct stat directoryStat; + int statOK = stat(filename.c_str(), &directoryStat); + if (statOK != 0) { + std::cout << "ERROR: " << filename << " not found!" << std::endl; + exit(1);//directly exit program if config file not found + } + + try { + IConfigMgr* mgr = const_cast(IConfigMgr::GetInstance()); + ServerError err = mgr->LoadConfigFile(filename); + if(err != 0) { + std::cout << "Server failed to load config file" << std::endl; + exit(1);//directly exit program if the config file is illegal + } + } + catch (YAML::Exception& e) { + std::cout << "Server failed to load config file: " << std::endl; + return SERVER_UNEXPECTED_ERROR; + } + + return SERVER_SUCCESS; +} + +void +ServerConfig::PrintAll() const { + if(const IConfigMgr* mgr = IConfigMgr::GetInstance()) { + std::string str = mgr->DumpString(); +// SERVER_LOG_INFO << "\n" << str; + std::cout << "\n" << str << std::endl; + } +} + +ConfigNode +ServerConfig::GetConfig(const std::string& name) const { + const IConfigMgr* mgr = IConfigMgr::GetInstance(); + const ConfigNode& root_node = mgr->GetRootNode(); + return root_node.GetChild(name); +} + +ConfigNode& +ServerConfig::GetConfig(const std::string& name) { + IConfigMgr* mgr = IConfigMgr::GetInstance(); + ConfigNode& root_node = mgr->GetRootNode(); + return root_node.GetChild(name); +} + + +} +} +} diff --git a/cpp/src/grpcserver/ServerConfig.h b/cpp/src/grpcserver/ServerConfig.h new file mode 100644 index 0000000000..bc202adcf6 --- /dev/null +++ b/cpp/src/grpcserver/ServerConfig.h @@ -0,0 +1,67 @@ +/******************************************************************************* + * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited. + * Proprietary and confidential. + ******************************************************************************/ +#pragma once + +#include "utils/Error.h" +#include "config/ConfigNode.h" + +#include "yaml-cpp/yaml.h" + +namespace zilliz { +namespace milvus { +namespace server { + +static const std::string CONFIG_SERVER = "server_config"; +static const std::string CONFIG_SERVER_ADDRESS = "address"; +static const std::string CONFIG_SERVER_PORT = "port"; +static const std::string CONFIG_SERVER_PROTOCOL = "transfer_protocol"; +static const std::string CONFIG_CLUSTER_MODE = "mode"; + +static const std::string CONFIG_DB = "db_config"; +static const std::string CONFIG_DB_URL = "db_backend_url"; +static const std::string CONFIG_DB_PATH = "db_path"; +static const std::string CONFIG_DB_SLAVE_PATH = "db_slave_path"; +static const std::string CONFIG_DB_INDEX_TRIGGER_SIZE = "index_building_threshold"; +static const std::string CONFIG_DB_ARCHIVE_DISK = "archive_disk_threshold"; +static const std::string CONFIG_DB_ARCHIVE_DAYS = "archive_days_threshold"; +static const std::string CONFIG_DB_INSERT_BUFFER_SIZE = "insert_buffer_size"; + +static const std::string CONFIG_LOG = "log_config"; + +static const std::string CONFIG_CACHE = "cache_config"; +static const std::string CONFIG_CPU_CACHE_CAPACITY = "cpu_cache_capacity"; +static const std::string CONFIG_GPU_CACHE_CAPACITY = "gpu_cache_capacity"; + +static const std::string CONFIG_LICENSE = "license_config"; +static const std::string CONFIG_LICENSE_PATH = "license_path"; + +static const std::string CONFIG_METRIC = "metric_config"; +static const std::string CONFIG_METRIC_IS_STARTUP = "is_startup"; +static const std::string CONFIG_METRIC_COLLECTOR = "collector"; +static const std::string CONFIG_PROMETHEUS = "prometheus_config"; +static const std::string CONFIG_METRIC_PROMETHEUS_PORT = "port"; + +static const std::string CONFIG_ENGINE = "engine_config"; +static const std::string CONFIG_NPROBE = "nprobe"; +static const std::string CONFIG_NLIST = "nlist"; +static const std::string CONFIG_DCBT = "use_blas_threshold"; +static const std::string CONFIG_METRICTYPE = "metric_type"; + +class ServerConfig { + public: + static ServerConfig &GetInstance(); + + ServerError LoadConfigFile(const std::string& config_filename); + void PrintAll() const; + + ConfigNode GetConfig(const std::string& name) const; + ConfigNode& GetConfig(const std::string& name); +}; + +} +} +} + diff --git a/cpp/src/main.cpp b/cpp/src/main.cpp index ec536c2ee2..aaff603f09 100644 --- a/cpp/src/main.cpp +++ b/cpp/src/main.cpp @@ -3,7 +3,8 @@ // Unauthorized copying of this file, via any medium is strictly prohibited. // Proprietary and confidential. //////////////////////////////////////////////////////////////////////////////// -#include "server/Server.h" +//#include "server/Server.h" +#include "grpcserver/Server.h" #include "version.h" #include diff --git a/cpp/src/sdk/src/client/ClientProxy.cpp b/cpp/src/sdk/src/client/ClientProxy.cpp index 81dc8d28e4..b4524ba7dd 100644 --- a/cpp/src/sdk/src/client/ClientProxy.cpp +++ b/cpp/src/sdk/src/client/ClientProxy.cpp @@ -86,6 +86,7 @@ ClientProxy::CreateTable(const TableSchema ¶m) { } try { + thrift::TableSchema schema; schema.__set_table_name(param.table_name); schema.__set_index_type((int)param.index_type); diff --git a/cpp/src/sdk/src/interface/ConnectionImpl.h b/cpp/src/sdk/src/interface/ConnectionImpl.h index 60c6cd9b2d..a05e5acba5 100644 --- a/cpp/src/sdk/src/interface/ConnectionImpl.h +++ b/cpp/src/sdk/src/interface/ConnectionImpl.h @@ -56,5 +56,5 @@ public: private: std::shared_ptr client_proxy_; }; - + } From 128b3030da33dc02c1da5f7ea7309c416ccdf2d9 Mon Sep 17 00:00:00 2001 From: kun yu Date: Mon, 22 Jul 2019 11:30:56 +0800 Subject: [PATCH 2/5] fix some bug for new version Former-commit-id: 3fb8733f9932f09a986f7693f0f4935a849612c2 --- cpp/src/grpcsdk/src/client/ClientProxy.cpp | 4 -- cpp/src/grpcserver/RequestTask.cpp | 61 +++++++++++++++------- cpp/src/grpcserver/Server.cpp | 2 +- 3 files changed, 43 insertions(+), 24 deletions(-) diff --git a/cpp/src/grpcsdk/src/client/ClientProxy.cpp b/cpp/src/grpcsdk/src/client/ClientProxy.cpp index d3c9585fda..b564f50625 100644 --- a/cpp/src/grpcsdk/src/client/ClientProxy.cpp +++ b/cpp/src/grpcsdk/src/client/ClientProxy.cpp @@ -136,13 +136,9 @@ ClientProxy::InsertVector(const std::string &table_name, // // ::milvus::grpc::VectorIds vector_ids; // -// std::cout << "*****************************************************\n"; -// auto start = std::chrono::high_resolution_clock::now(); // //Single thread // client_ptr->InsertVector(vector_ids, insert_infos); // auto finish = std::chrono::high_resolution_clock::now(); -// std::cout << "InsertVector cost: " << std::chrono::duration_cast>(finish - start).count() << "s\n"; -// std::cout << "*****************************************************\n"; // // for (size_t i = 0; i < vector_ids.vector_id_array_size(); i++) { // id_array.push_back(vector_ids.vector_id_array(i)); diff --git a/cpp/src/grpcserver/RequestTask.cpp b/cpp/src/grpcserver/RequestTask.cpp index 06b2218b4c..7f0bf7d31d 100644 --- a/cpp/src/grpcserver/RequestTask.cpp +++ b/cpp/src/grpcserver/RequestTask.cpp @@ -160,7 +160,7 @@ ServerError CreateTableTask::OnExecute() { return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); } - rc.Record("done"); + rc.ElapseFromBegin("totally cost"); return SERVER_SUCCESS; } @@ -205,7 +205,7 @@ ServerError DescribeTableTask::OnExecute() { return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); } - rc.Record("done"); + rc.ElapseFromBegin("totally cost"); return SERVER_SUCCESS; } @@ -243,7 +243,7 @@ ServerError BuildIndexTask::OnExecute() { return SetError(SERVER_BUILD_INDEX_ERROR, "Engine failed: " + stat.ToString()); } - rc.Elapse("totally cost"); + rc.ElapseFromBegin("totally cost"); } catch (std::exception& ex) { return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); } @@ -280,7 +280,7 @@ ServerError HasTableTask::OnExecute() { return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); } - rc.Elapse("totally cost"); + rc.ElapseFromBegin("totally cost"); } catch (std::exception& ex) { return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); } @@ -322,7 +322,7 @@ ServerError DropTableTask::OnExecute() { } } - rc.Record("check validation"); + rc.ElapseFromBegin("check validation"); //step 3: Drop table std::vector dates; @@ -331,8 +331,7 @@ ServerError DropTableTask::OnExecute() { return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); } - rc.Record("drop table"); - rc.Elapse("total cost"); + rc.ElapseFromBegin("total cost"); } catch (std::exception& ex) { return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); } @@ -406,7 +405,13 @@ ServerError InsertVectorTask::OnExecute() { } } - rc.Record("check validation"); + rc.RecordSection("check validation"); + +#ifdef MILVUS_ENABLE_PROFILING + std::string fname = "/tmp/insert_" + std::to_string(this->record_array_.size()) + + "_" + GetCurrTimeStr() + ".profiling"; + ProfilerStart(fname.c_str()); +#endif //step 3: prepare float data std::vector vec_f; @@ -418,7 +423,7 @@ ServerError InsertVectorTask::OnExecute() { } } - rc.Record("prepare vectors data"); + rc.ElapseFromBegin("prepare vectors data"); //step 4: insert vectors uint64_t vec_count = (uint64_t)insert_infos_.row_record_array_size(); @@ -427,7 +432,7 @@ ServerError InsertVectorTask::OnExecute() { vec_ids.clear(); stat = DBWrapper::DB()->InsertVectors(insert_infos_.table_name(), vec_count, vec_f.data(), vec_ids); - rc.Record("add vectors to engine"); + rc.ElapseFromBegin("add vectors to engine"); if(!stat.ok()) { return SetError(SERVER_CACHE_ERROR, "Cache error: " + stat.ToString()); } @@ -441,8 +446,12 @@ ServerError InsertVectorTask::OnExecute() { return SetError(SERVER_ILLEGAL_VECTOR_ID, msg); } - rc.Record("do insert"); - rc.Elapse("total cost"); +#ifdef MILVUS_ENABLE_PROFILING + ProfilerStop(); +#endif + + rc.RecordSection("add vectors to engine"); + rc.ElapseFromBegin("total cost"); } catch (std::exception& ex) { return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); @@ -517,7 +526,14 @@ ServerError SearchVectorTask::OnExecute() { return SetError(error_code, error_msg); } - rc.Record("check validation"); + double span_check = rc.RecordSection("check validation"); + +#ifdef MILVUS_ENABLE_PROFILING + std::string fname = "/tmp/search_nq_" + std::to_string(this->record_array_.size()) + + "_top_" + std::to_string(this->top_k_) + "_" + + GetCurrTimeStr() + ".profiling"; + ProfilerStart(fname.c_str()); +#endif //step 3: prepare float data std::vector vec_f; @@ -528,7 +544,7 @@ ServerError SearchVectorTask::OnExecute() { vec_f[i * table_info.dimension_ + j] = searchVector_infos_.query_record_array(i).vector_data(j); } } - rc.Record("prepare vector data"); + rc.ElapseFromBegin("prepare vector data"); //step 4: search vectors engine::QueryResults results; @@ -541,7 +557,7 @@ ServerError SearchVectorTask::OnExecute() { (size_t) top_k_, record_count, vec_f.data(), dates, results); } - rc.Record("search vectors from engine"); + rc.ElapseFromBegin("search vectors from engine"); if(!stat.ok()) { return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); } @@ -556,7 +572,7 @@ ServerError SearchVectorTask::OnExecute() { return SetError(SERVER_ILLEGAL_SEARCH_RESULT, msg); } - rc.Record("do search"); + rc.ElapseFromBegin("do search"); //step 5: construct result array for(uint64_t i = 0; i < record_count; i++) { @@ -570,8 +586,15 @@ ServerError SearchVectorTask::OnExecute() { } writer_.Write(grpc_topk_result); } - rc.Record("construct result"); - rc.Elapse("total cost"); + +#ifdef MILVUS_ENABLE_PROFILING + ProfilerStop(); +#endif + + double span_result = rc.RecordSection("construct result"); + rc.ElapseFromBegin("totally cost"); + + //step 6: print time cost percent } catch (std::exception& ex) { return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); @@ -612,7 +635,7 @@ ServerError GetTableRowCountTask::OnExecute() { row_count_ = (int64_t) row_count; - rc.Elapse("total cost"); + rc.ElapseFromBegin("total cost"); } catch (std::exception& ex) { return SetError(SERVER_UNEXPECTED_ERROR, ex.what()); diff --git a/cpp/src/grpcserver/Server.cpp b/cpp/src/grpcserver/Server.cpp index a79a8c7357..0e02d555bd 100644 --- a/cpp/src/grpcserver/Server.cpp +++ b/cpp/src/grpcserver/Server.cpp @@ -4,7 +4,7 @@ // Proprietary and confidential. //////////////////////////////////////////////////////////////////////////////// #include "Server.h" -#include "ServerConfig.h" +//#include "ServerConfig.h" #include "MilvusServer.h" #include "utils/Log.h" #include "utils/SignalUtil.h" From db15ea57e9596d9fbf2be34ca3408f4251862d98 Mon Sep 17 00:00:00 2001 From: kun yu Date: Wed, 24 Jul 2019 19:29:18 +0800 Subject: [PATCH 3/5] fix structure Former-commit-id: 6b4afd3c15236340eb666f22a0150ce090202b04 --- cpp/CMakeLists.txt | 6 + cpp/build.sh | 1 + cpp/src/CMakeLists.txt | 56 ++- cpp/src/db/MySQLConnectionPool.cpp | 2 +- cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc | 54 +-- cpp/src/grpc/gen-milvus/milvus.grpc.pb.h | 186 ++++----- cpp/src/grpc/gen-milvus/milvus.pb.cc | 265 ++++++------ cpp/src/grpc/gen-milvus/milvus.pb.h | 224 +++++----- cpp/src/grpc/gen-status/status.grpc.pb.cc | 2 + cpp/src/grpc/gen-status/status.grpc.pb.h | 2 + cpp/src/grpc/gen-status/status.pb.cc | 114 +++--- cpp/src/grpc/gen-status/status.pb.h | 50 +-- cpp/src/grpc/milvus.proto | 20 +- cpp/src/grpc/status.proto | 2 +- cpp/src/grpcsdk/CMakeLists.txt | 38 -- cpp/src/grpcsdk/include/MilvusApi.h | 384 ------------------ cpp/src/grpcsdk/include/Status.h | 330 --------------- cpp/src/grpcsdk/src/client/ClientProxy.h | 66 --- cpp/src/grpcsdk/src/client/grpcClient.h | 62 --- cpp/src/grpcsdk/src/util/Exception.h | 34 -- cpp/src/grpcserver/DBWrapper.cpp | 102 ----- cpp/src/grpcserver/DBWrapper.h | 34 -- cpp/src/grpcserver/Server.cpp | 245 ----------- cpp/src/grpcserver/Server.h | 47 --- cpp/src/grpcserver/ServerConfig.cpp | 82 ---- cpp/src/grpcserver/ServerConfig.h | 67 --- cpp/src/main.cpp | 3 +- cpp/src/sdk/CMakeLists.txt | 77 +++- cpp/src/sdk/examples/CMakeLists.txt | 3 +- .../examples/grpcsimple}/CMakeLists.txt | 4 +- .../examples/grpcsimple}/main.cpp | 0 .../examples/grpcsimple}/src/ClientTest.cpp | 12 +- .../examples/grpcsimple}/src/ClientTest.h | 0 .../{simple => thriftsimple}/CMakeLists.txt | 8 +- .../{simple => thriftsimple}/main.cpp | 0 .../src/ClientTest.cpp | 0 .../{simple => thriftsimple}/src/ClientTest.h | 0 .../src/client => sdk/grpc}/ClientProxy.cpp | 125 +++--- cpp/src/sdk/grpc/ClientProxy.h | 87 ++++ .../grpc/GrpcClient.cpp} | 105 +++-- cpp/src/sdk/grpc/GrpcClient.h | 59 +++ cpp/src/sdk/include/MilvusApi.h | 10 +- cpp/src/sdk/include/Status.h | 317 +++++++-------- .../src => sdk}/interface/ConnectionImpl.cpp | 22 +- .../src => sdk}/interface/ConnectionImpl.h | 12 +- .../{grpcsdk/src => sdk}/interface/Status.cpp | 5 +- cpp/src/sdk/src/interface/ConnectionImpl.cpp | 116 ------ cpp/src/sdk/src/interface/ConnectionImpl.h | 60 --- cpp/src/sdk/src/interface/Status.cpp | 122 ------ .../{src/client => thrift}/ClientProxy.cpp | 18 +- .../sdk/{src/client => thrift}/ClientProxy.h | 6 + .../{src/client => thrift}/ThriftClient.cpp | 0 .../sdk/{src/client => thrift}/ThriftClient.h | 0 cpp/src/sdk/{src => }/util/Exception.h | 0 cpp/src/server/Server.cpp | 9 +- .../grpc_impl}/MilvusServer.cpp | 34 +- .../grpc_impl}/MilvusServer.h | 11 - .../grpc_impl}/RequestHandler.cpp | 18 +- .../grpc_impl}/RequestHandler.h | 44 +- .../grpc_impl}/RequestScheduler.cpp | 73 ++-- .../grpc_impl}/RequestScheduler.h | 2 +- .../grpc_impl}/RequestTask.cpp | 135 +++--- .../grpc_impl}/RequestTask.h | 40 +- .../server/{ => thrift_impl}/MilvusServer.cpp | 4 +- .../server/{ => thrift_impl}/MilvusServer.h | 0 .../{ => thrift_impl}/RequestHandler.cpp | 0 .../server/{ => thrift_impl}/RequestHandler.h | 0 .../{ => thrift_impl}/RequestScheduler.cpp | 0 .../{ => thrift_impl}/RequestScheduler.h | 0 .../server/{ => thrift_impl}/RequestTask.cpp | 4 +- .../server/{ => thrift_impl}/RequestTask.h | 0 .../{ => thrift_impl}/ThreadPoolServer.cpp | 0 .../{ => thrift_impl}/ThreadPoolServer.h | 0 cpp/src/utils/SignalUtil.cpp | 3 +- 74 files changed, 1264 insertions(+), 2759 deletions(-) delete mode 100644 cpp/src/grpcsdk/CMakeLists.txt delete mode 100644 cpp/src/grpcsdk/include/MilvusApi.h delete mode 100644 cpp/src/grpcsdk/include/Status.h delete mode 100644 cpp/src/grpcsdk/src/client/ClientProxy.h delete mode 100644 cpp/src/grpcsdk/src/client/grpcClient.h delete mode 100644 cpp/src/grpcsdk/src/util/Exception.h delete mode 100644 cpp/src/grpcserver/DBWrapper.cpp delete mode 100644 cpp/src/grpcserver/DBWrapper.h delete mode 100644 cpp/src/grpcserver/Server.cpp delete mode 100644 cpp/src/grpcserver/Server.h delete mode 100644 cpp/src/grpcserver/ServerConfig.cpp delete mode 100644 cpp/src/grpcserver/ServerConfig.h rename cpp/src/{grpcsdk/examples => sdk/examples/grpcsimple}/CMakeLists.txt (92%) rename cpp/src/{grpcsdk/examples => sdk/examples/grpcsimple}/main.cpp (100%) rename cpp/src/{grpcsdk/examples => sdk/examples/grpcsimple}/src/ClientTest.cpp (97%) rename cpp/src/{grpcsdk/examples => sdk/examples/grpcsimple}/src/ClientTest.h (100%) rename cpp/src/sdk/examples/{simple => thriftsimple}/CMakeLists.txt (79%) rename cpp/src/sdk/examples/{simple => thriftsimple}/main.cpp (100%) rename cpp/src/sdk/examples/{simple => thriftsimple}/src/ClientTest.cpp (100%) rename cpp/src/sdk/examples/{simple => thriftsimple}/src/ClientTest.h (100%) rename cpp/src/{grpcsdk/src/client => sdk/grpc}/ClientProxy.cpp (70%) create mode 100644 cpp/src/sdk/grpc/ClientProxy.h rename cpp/src/{grpcsdk/src/client/grpcClient.cpp => sdk/grpc/GrpcClient.cpp} (53%) create mode 100644 cpp/src/sdk/grpc/GrpcClient.h rename cpp/src/{grpcsdk/src => sdk}/interface/ConnectionImpl.cpp (84%) rename cpp/src/{grpcsdk/src => sdk}/interface/ConnectionImpl.h (85%) rename cpp/src/{grpcsdk/src => sdk}/interface/Status.cpp (98%) delete mode 100644 cpp/src/sdk/src/interface/ConnectionImpl.cpp delete mode 100644 cpp/src/sdk/src/interface/ConnectionImpl.h delete mode 100644 cpp/src/sdk/src/interface/Status.cpp rename cpp/src/sdk/{src/client => thrift}/ClientProxy.cpp (93%) rename cpp/src/sdk/{src/client => thrift}/ClientProxy.h (88%) rename cpp/src/sdk/{src/client => thrift}/ThriftClient.cpp (100%) rename cpp/src/sdk/{src/client => thrift}/ThriftClient.h (100%) rename cpp/src/sdk/{src => }/util/Exception.h (100%) rename cpp/src/{grpcserver => server/grpc_impl}/MilvusServer.cpp (72%) rename cpp/src/{grpcserver => server/grpc_impl}/MilvusServer.h (65%) rename cpp/src/{grpcserver => server/grpc_impl}/RequestHandler.cpp (92%) rename cpp/src/{grpcserver => server/grpc_impl}/RequestHandler.h (65%) rename cpp/src/{grpcserver => server/grpc_impl}/RequestScheduler.cpp (61%) rename cpp/src/{grpcserver => server/grpc_impl}/RequestScheduler.h (95%) rename cpp/src/{grpcserver => server/grpc_impl}/RequestTask.cpp (84%) rename cpp/src/{grpcserver => server/grpc_impl}/RequestTask.h (78%) rename cpp/src/server/{ => thrift_impl}/MilvusServer.cpp (98%) rename cpp/src/server/{ => thrift_impl}/MilvusServer.h (100%) rename cpp/src/server/{ => thrift_impl}/RequestHandler.cpp (100%) rename cpp/src/server/{ => thrift_impl}/RequestHandler.h (100%) rename cpp/src/server/{ => thrift_impl}/RequestScheduler.cpp (100%) rename cpp/src/server/{ => thrift_impl}/RequestScheduler.h (100%) rename cpp/src/server/{ => thrift_impl}/RequestTask.cpp (99%) rename cpp/src/server/{ => thrift_impl}/RequestTask.h (100%) rename cpp/src/server/{ => thrift_impl}/ThreadPoolServer.cpp (100%) rename cpp/src/server/{ => thrift_impl}/ThreadPoolServer.h (100%) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 07b4719790..39b7558fda 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -121,6 +121,12 @@ if (MILVUS_ENABLE_PROFILING STREQUAL "ON") ADD_DEFINITIONS(-DMILVUS_ENABLE_PROFILING) endif() +#set(MILVUS_ENABLE_THRIFT "ON") +message("MILVUS_ENABLE_THRIFT = ${MILVUS_ENABLE_THRIFT}") +if (MILVUS_ENABLE_THRIFT STREQUAL "ON") + ADD_DEFINITIONS(-DMILVUS_ENABLE_THRIFT) +endif() + include_directories(${MILVUS_ENGINE_INCLUDE}) include_directories(${MILVUS_ENGINE_SRC}) diff --git a/cpp/build.sh b/cpp/build.sh index edfe9305be..359f91358a 100755 --- a/cpp/build.sh +++ b/cpp/build.sh @@ -89,6 +89,7 @@ if [[ ${MAKE_CLEAN} == "ON" ]]; then -DMILVUS_DB_PATH=${DB_PATH} \ -DMILVUS_ENABLE_PROFILING=${PROFILING} \ -DBUILD_FAISS_WITH_MKL=${BUILD_FAISS_WITH_MKL} \ + -DMILVUS_ENABLE_THRIFT=${MILVUS_ENABLE_THRIFT} \ $@ ../" echo ${CMAKE_CMD} diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt index 5e4f940ff6..040c3ab4bf 100644 --- a/cpp/src/CMakeLists.txt +++ b/cpp/src/CMakeLists.txt @@ -8,7 +8,8 @@ aux_source_directory(cache cache_files) aux_source_directory(config config_files) aux_source_directory(server server_files) -aux_source_directory(grpcserver grpcserver_files) +aux_source_directory(server/grpc_impl grpcserver_files) +aux_source_directory(server/thrift_impl thriftserver_files) aux_source_directory(utils utils_files) aux_source_directory(db db_files) aux_source_directory(wrapper wrapper_files) @@ -39,8 +40,8 @@ set(service_files thrift/gen-cpp/milvus_types.cpp metrics/SystemInfo.cpp metrics/SystemInfo.h - server/ThreadPoolServer.cpp - server/ThreadPoolServer.h + server/thrift_impl/ThreadPoolServer.cpp + server/thrift_impl/ThreadPoolServer.h grpc/gen-milvus/milvus.grpc.pb.cc grpc/gen-milvus/milvus.pb.cc grpc/gen-status/status.grpc.pb.cc @@ -177,19 +178,39 @@ set(server_libs metrics ) -add_executable(milvus_server - ${config_files} -# ${server_files} - ${grpcserver_files} - ${utils_files} - ${service_files} - ${metrics_files} - ) +if (MILVUS_ENABLE_THRIFT STREQUAL "ON") + add_executable(milvus_thrift_server + ${config_files} + ${server_files} + ${thriftserver_files} + ${utils_files} + ${service_files} + ${metrics_files} + ) +else() + add_executable(milvus_grpc_server + ${config_files} + ${server_files} + ${grpcserver_files} + ${utils_files} + ${service_files} + ${metrics_files} + ) +endif() + if (ENABLE_LICENSE STREQUAL "ON") - target_link_libraries(milvus_server ${server_libs} license_check ${third_party_libs}) + if(MILVUS_ENABLE_THRIFT STREQUAL "ON") + target_link_libraries(milvus_thrift_server ${server_libs} license_check ${third_party_libs}) + else() + target_link_libraries(milvus_grpc_server ${server_libs} license_check ${third_party_libs}) + endif() else () - target_link_libraries(milvus_server ${server_libs} ${third_party_libs}) + if(MILVUS_ENABLE_THRIFT STREQUAL "ON") + target_link_libraries(milvus_thrift_server ${server_libs} ${third_party_libs}) + else() + target_link_libraries(milvus_grpc_server ${server_libs} ${third_party_libs}) + endif() endif() if (ENABLE_LICENSE STREQUAL "ON") @@ -203,7 +224,11 @@ if (ENABLE_LICENSE STREQUAL "ON") install(TARGETS license_generator DESTINATION bin) endif () -install(TARGETS milvus_server DESTINATION bin) +if (MILVUS_ENABLE_THRIFT STREQUAL "ON") + install(TARGETS milvus_thrift_server DESTINATION bin) +else() + install(TARGETS milvus_grpc_server DESTINATION bin) +endif() install(FILES ${CMAKE_BINARY_DIR}/mysqlpp_ep-prefix/src/mysqlpp_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}mysqlpp${CMAKE_SHARED_LIBRARY_SUFFIX} @@ -211,5 +236,4 @@ install(FILES ${CMAKE_BINARY_DIR}/mysqlpp_ep-prefix/src/mysqlpp_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}mysqlpp${CMAKE_SHARED_LIBRARY_SUFFIX}.3.2.4 DESTINATION lib) -#add_subdirectory(sdk) -add_subdirectory(grpcsdk) +add_subdirectory(sdk) diff --git a/cpp/src/db/MySQLConnectionPool.cpp b/cpp/src/db/MySQLConnectionPool.cpp index b43126920e..848287ebb3 100644 --- a/cpp/src/db/MySQLConnectionPool.cpp +++ b/cpp/src/db/MySQLConnectionPool.cpp @@ -5,7 +5,7 @@ namespace milvus { namespace engine { namespace meta { - // Do a simple form of in-use connection limiting: wait to return + // Do a thriftsimple form of in-use connection limiting: wait to return // a connection until there are a reasonably low number in use // already. Can't do this in create() because we're interested in // connections actually in use, not those created. Also note that diff --git a/cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc b/cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc index 41cc8c03f4..ef9fa3d46d 100644 --- a/cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc +++ b/cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc @@ -53,24 +53,24 @@ MilvusService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& chan , rpcmethod_Ping_(MilvusService_method_names[10], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) {} -::grpc::Status MilvusService::Stub::CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::milvus::Status* response) { +::grpc::Status MilvusService::Stub::CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::milvus::grpc::Status* response) { return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_CreateTable_, context, request, response); } -void MilvusService::Stub::experimental_async::CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response, std::function f) { +void MilvusService::Stub::experimental_async::CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response, std::function f) { return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_CreateTable_, context, request, response, std::move(f)); } -void MilvusService::Stub::experimental_async::CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function f) { +void MilvusService::Stub::experimental_async::CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function f) { return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_CreateTable_, context, request, response, std::move(f)); } -::grpc::ClientAsyncResponseReader< ::milvus::Status>* MilvusService::Stub::AsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::Status>::Create(channel_.get(), cq, rpcmethod_CreateTable_, context, request, true); +::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* MilvusService::Stub::AsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::Status>::Create(channel_.get(), cq, rpcmethod_CreateTable_, context, request, true); } -::grpc::ClientAsyncResponseReader< ::milvus::Status>* MilvusService::Stub::PrepareAsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::Status>::Create(channel_.get(), cq, rpcmethod_CreateTable_, context, request, false); +::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* MilvusService::Stub::PrepareAsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::Status>::Create(channel_.get(), cq, rpcmethod_CreateTable_, context, request, false); } ::grpc::Status MilvusService::Stub::HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::BoolReply* response) { @@ -93,44 +93,44 @@ void MilvusService::Stub::experimental_async::HasTable(::grpc::ClientContext* co return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::BoolReply>::Create(channel_.get(), cq, rpcmethod_HasTable_, context, request, false); } -::grpc::Status MilvusService::Stub::DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::Status* response) { +::grpc::Status MilvusService::Stub::DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::Status* response) { return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_DropTable_, context, request, response); } -void MilvusService::Stub::experimental_async::DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, std::function f) { +void MilvusService::Stub::experimental_async::DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, std::function f) { return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DropTable_, context, request, response, std::move(f)); } -void MilvusService::Stub::experimental_async::DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function f) { +void MilvusService::Stub::experimental_async::DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function f) { return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DropTable_, context, request, response, std::move(f)); } -::grpc::ClientAsyncResponseReader< ::milvus::Status>* MilvusService::Stub::AsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::Status>::Create(channel_.get(), cq, rpcmethod_DropTable_, context, request, true); +::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* MilvusService::Stub::AsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::Status>::Create(channel_.get(), cq, rpcmethod_DropTable_, context, request, true); } -::grpc::ClientAsyncResponseReader< ::milvus::Status>* MilvusService::Stub::PrepareAsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::Status>::Create(channel_.get(), cq, rpcmethod_DropTable_, context, request, false); +::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* MilvusService::Stub::PrepareAsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::Status>::Create(channel_.get(), cq, rpcmethod_DropTable_, context, request, false); } -::grpc::Status MilvusService::Stub::BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::Status* response) { +::grpc::Status MilvusService::Stub::BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::Status* response) { return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_BuildIndex_, context, request, response); } -void MilvusService::Stub::experimental_async::BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, std::function f) { +void MilvusService::Stub::experimental_async::BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, std::function f) { return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_BuildIndex_, context, request, response, std::move(f)); } -void MilvusService::Stub::experimental_async::BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function f) { +void MilvusService::Stub::experimental_async::BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function f) { return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_BuildIndex_, context, request, response, std::move(f)); } -::grpc::ClientAsyncResponseReader< ::milvus::Status>* MilvusService::Stub::AsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::Status>::Create(channel_.get(), cq, rpcmethod_BuildIndex_, context, request, true); +::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* MilvusService::Stub::AsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::Status>::Create(channel_.get(), cq, rpcmethod_BuildIndex_, context, request, true); } -::grpc::ClientAsyncResponseReader< ::milvus::Status>* MilvusService::Stub::PrepareAsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::Status>::Create(channel_.get(), cq, rpcmethod_BuildIndex_, context, request, false); +::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* MilvusService::Stub::PrepareAsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::Status>::Create(channel_.get(), cq, rpcmethod_BuildIndex_, context, request, false); } ::grpc::Status MilvusService::Stub::InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::milvus::grpc::VectorIds* response) { @@ -265,7 +265,7 @@ MilvusService::Service::Service() { AddMethod(new ::grpc::internal::RpcServiceMethod( MilvusService_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::TableSchema, ::milvus::Status>( + new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::TableSchema, ::milvus::grpc::Status>( std::mem_fn(&MilvusService::Service::CreateTable), this))); AddMethod(new ::grpc::internal::RpcServiceMethod( MilvusService_method_names[1], @@ -275,12 +275,12 @@ MilvusService::Service::Service() { AddMethod(new ::grpc::internal::RpcServiceMethod( MilvusService_method_names[2], ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::TableName, ::milvus::Status>( + new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::TableName, ::milvus::grpc::Status>( std::mem_fn(&MilvusService::Service::DropTable), this))); AddMethod(new ::grpc::internal::RpcServiceMethod( MilvusService_method_names[3], ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::TableName, ::milvus::Status>( + new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::TableName, ::milvus::grpc::Status>( std::mem_fn(&MilvusService::Service::BuildIndex), this))); AddMethod(new ::grpc::internal::RpcServiceMethod( MilvusService_method_names[4], @@ -322,7 +322,7 @@ MilvusService::Service::Service() { MilvusService::Service::~Service() { } -::grpc::Status MilvusService::Service::CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response) { +::grpc::Status MilvusService::Service::CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response) { (void) context; (void) request; (void) response; @@ -336,14 +336,14 @@ MilvusService::Service::~Service() { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } -::grpc::Status MilvusService::Service::DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) { +::grpc::Status MilvusService::Service::DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) { (void) context; (void) request; (void) response; return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } -::grpc::Status MilvusService::Service::BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) { +::grpc::Status MilvusService::Service::BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) { (void) context; (void) request; (void) response; diff --git a/cpp/src/grpc/gen-milvus/milvus.grpc.pb.h b/cpp/src/grpc/gen-milvus/milvus.grpc.pb.h index 464b9ad50f..24e79df382 100644 --- a/cpp/src/grpc/gen-milvus/milvus.grpc.pb.h +++ b/cpp/src/grpc/gen-milvus/milvus.grpc.pb.h @@ -45,12 +45,12 @@ class MilvusService final { // // @param param, use to provide table information to be created. // - virtual ::grpc::Status CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::milvus::Status* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>> AsyncCreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>>(AsyncCreateTableRaw(context, request, cq)); + virtual ::grpc::Status CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::milvus::grpc::Status* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>> AsyncCreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>>(AsyncCreateTableRaw(context, request, cq)); } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>> PrepareAsyncCreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>>(PrepareAsyncCreateTableRaw(context, request, cq)); + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>> PrepareAsyncCreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>>(PrepareAsyncCreateTableRaw(context, request, cq)); } // * // @brief Test table existence method @@ -73,12 +73,12 @@ class MilvusService final { // // @param table_name, table name is going to be deleted. // - virtual ::grpc::Status DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::Status* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>> AsyncDropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>>(AsyncDropTableRaw(context, request, cq)); + virtual ::grpc::Status DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::Status* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>> AsyncDropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>>(AsyncDropTableRaw(context, request, cq)); } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>> PrepareAsyncDropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>>(PrepareAsyncDropTableRaw(context, request, cq)); + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>> PrepareAsyncDropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>>(PrepareAsyncDropTableRaw(context, request, cq)); } // * // @brief Build index by table method @@ -87,12 +87,12 @@ class MilvusService final { // // @param table_name, table is going to be built index. // - virtual ::grpc::Status BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::Status* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>> AsyncBuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>>(AsyncBuildIndexRaw(context, request, cq)); + virtual ::grpc::Status BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::Status* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>> AsyncBuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>>(AsyncBuildIndexRaw(context, request, cq)); } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>> PrepareAsyncBuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>>(PrepareAsyncBuildIndexRaw(context, request, cq)); + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>> PrepareAsyncBuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>>(PrepareAsyncBuildIndexRaw(context, request, cq)); } // * // @brief Add vector array to table @@ -219,8 +219,8 @@ class MilvusService final { // // @param param, use to provide table information to be created. // - virtual void CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response, std::function) = 0; - virtual void CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function) = 0; + virtual void CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response, std::function) = 0; + virtual void CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function) = 0; // * // @brief Test table existence method // @@ -237,8 +237,8 @@ class MilvusService final { // // @param table_name, table name is going to be deleted. // - virtual void DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, std::function) = 0; - virtual void DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function) = 0; + virtual void DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, std::function) = 0; + virtual void DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function) = 0; // * // @brief Build index by table method // @@ -246,8 +246,8 @@ class MilvusService final { // // @param table_name, table is going to be built index. // - virtual void BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, std::function) = 0; - virtual void BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function) = 0; + virtual void BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, std::function) = 0; + virtual void BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function) = 0; // * // @brief Add vector array to table // @@ -322,14 +322,14 @@ class MilvusService final { }; virtual class experimental_async_interface* experimental_async() { return nullptr; } private: - virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>* AsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>* PrepareAsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* AsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* PrepareAsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::BoolReply>* AsyncHasTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::BoolReply>* PrepareAsyncHasTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>* AsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>* PrepareAsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>* AsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::Status>* PrepareAsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* AsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* PrepareAsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* AsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* PrepareAsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::VectorIds>* AsyncInsertVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::VectorIds>* PrepareAsyncInsertVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientReaderInterface< ::milvus::grpc::TopKQueryResult>* SearchVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request) = 0; @@ -351,12 +351,12 @@ class MilvusService final { class Stub final : public StubInterface { public: Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); - ::grpc::Status CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::milvus::Status* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>> AsyncCreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>>(AsyncCreateTableRaw(context, request, cq)); + ::grpc::Status CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::milvus::grpc::Status* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>> AsyncCreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>>(AsyncCreateTableRaw(context, request, cq)); } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>> PrepareAsyncCreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>>(PrepareAsyncCreateTableRaw(context, request, cq)); + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>> PrepareAsyncCreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>>(PrepareAsyncCreateTableRaw(context, request, cq)); } ::grpc::Status HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::BoolReply* response) override; std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::BoolReply>> AsyncHasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { @@ -365,19 +365,19 @@ class MilvusService final { std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::BoolReply>> PrepareAsyncHasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::BoolReply>>(PrepareAsyncHasTableRaw(context, request, cq)); } - ::grpc::Status DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::Status* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>> AsyncDropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>>(AsyncDropTableRaw(context, request, cq)); + ::grpc::Status DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::Status* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>> AsyncDropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>>(AsyncDropTableRaw(context, request, cq)); } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>> PrepareAsyncDropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>>(PrepareAsyncDropTableRaw(context, request, cq)); + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>> PrepareAsyncDropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>>(PrepareAsyncDropTableRaw(context, request, cq)); } - ::grpc::Status BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::Status* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>> AsyncBuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>>(AsyncBuildIndexRaw(context, request, cq)); + ::grpc::Status BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::milvus::grpc::Status* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>> AsyncBuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>>(AsyncBuildIndexRaw(context, request, cq)); } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>> PrepareAsyncBuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::Status>>(PrepareAsyncBuildIndexRaw(context, request, cq)); + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>> PrepareAsyncBuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>>(PrepareAsyncBuildIndexRaw(context, request, cq)); } ::grpc::Status InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::milvus::grpc::VectorIds* response) override; std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>> AsyncInsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) { @@ -437,14 +437,14 @@ class MilvusService final { class experimental_async final : public StubInterface::experimental_async_interface { public: - void CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response, std::function) override; - void CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function) override; + void CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response, std::function) override; + void CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function) override; void HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response, std::function) override; void HasTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::BoolReply* response, std::function) override; - void DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, std::function) override; - void DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function) override; - void BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, std::function) override; - void BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::Status* response, std::function) override; + void DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, std::function) override; + void DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function) override; + void BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, std::function) override; + void BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function) override; void InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response, std::function) override; void InsertVector(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::VectorIds* response, std::function) override; void SearchVector(::grpc::ClientContext* context, ::milvus::grpc::SearchVectorInfos* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TopKQueryResult>* reactor) override; @@ -467,14 +467,14 @@ class MilvusService final { private: std::shared_ptr< ::grpc::ChannelInterface> channel_; class experimental_async async_stub_{this}; - ::grpc::ClientAsyncResponseReader< ::milvus::Status>* AsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::milvus::Status>* PrepareAsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* AsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* PrepareAsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::milvus::grpc::BoolReply>* AsyncHasTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::milvus::grpc::BoolReply>* PrepareAsyncHasTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::milvus::Status>* AsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::milvus::Status>* PrepareAsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::milvus::Status>* AsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::milvus::Status>* PrepareAsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* AsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* PrepareAsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* AsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* PrepareAsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>* AsyncInsertVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>* PrepareAsyncInsertVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientReader< ::milvus::grpc::TopKQueryResult>* SearchVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchVectorInfos& request) override; @@ -517,7 +517,7 @@ class MilvusService final { // // @param param, use to provide table information to be created. // - virtual ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response); + virtual ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response); // * // @brief Test table existence method // @@ -533,7 +533,7 @@ class MilvusService final { // // @param table_name, table name is going to be deleted. // - virtual ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response); + virtual ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response); // * // @brief Build index by table method // @@ -541,7 +541,7 @@ class MilvusService final { // // @param table_name, table is going to be built index. // - virtual ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response); + virtual ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response); // * // @brief Add vector array to table // @@ -622,11 +622,11 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response) override { + ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestCreateTable(::grpc::ServerContext* context, ::milvus::grpc::TableSchema* request, ::grpc::ServerAsyncResponseWriter< ::milvus::Status>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + void RequestCreateTable(::grpc::ServerContext* context, ::milvus::grpc::TableSchema* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::Status>* 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); } }; @@ -662,11 +662,11 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestDropTable(::grpc::ServerContext* context, ::milvus::grpc::TableName* request, ::grpc::ServerAsyncResponseWriter< ::milvus::Status>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + void RequestDropTable(::grpc::ServerContext* context, ::milvus::grpc::TableName* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::Status>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); } }; @@ -682,11 +682,11 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestBuildIndex(::grpc::ServerContext* context, ::milvus::grpc::TableName* request, ::grpc::ServerAsyncResponseWriter< ::milvus::Status>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + void RequestBuildIndex(::grpc::ServerContext* context, ::milvus::grpc::TableName* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::Status>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); } }; @@ -838,10 +838,10 @@ class MilvusService final { public: ExperimentalWithCallbackMethod_CreateTable() { ::grpc::Service::experimental().MarkMethodCallback(0, - new ::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableSchema, ::milvus::Status>( + new ::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableSchema, ::milvus::grpc::Status>( [this](::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, - ::milvus::Status* response, + ::milvus::grpc::Status* response, ::grpc::experimental::ServerCallbackRpcController* controller) { return this->CreateTable(context, request, response, controller); })); @@ -850,11 +850,11 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response) override { + ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithCallbackMethod_HasTable : public BaseClass { @@ -888,10 +888,10 @@ class MilvusService final { public: ExperimentalWithCallbackMethod_DropTable() { ::grpc::Service::experimental().MarkMethodCallback(2, - new ::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableName, ::milvus::Status>( + new ::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::Status>( [this](::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, - ::milvus::Status* response, + ::milvus::grpc::Status* response, ::grpc::experimental::ServerCallbackRpcController* controller) { return this->DropTable(context, request, response, controller); })); @@ -900,11 +900,11 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithCallbackMethod_BuildIndex : public BaseClass { @@ -913,10 +913,10 @@ class MilvusService final { public: ExperimentalWithCallbackMethod_BuildIndex() { ::grpc::Service::experimental().MarkMethodCallback(3, - new ::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableName, ::milvus::Status>( + new ::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::Status>( [this](::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, - ::milvus::Status* response, + ::milvus::grpc::Status* response, ::grpc::experimental::ServerCallbackRpcController* controller) { return this->BuildIndex(context, request, response, controller); })); @@ -925,11 +925,11 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithCallbackMethod_InsertVector : public BaseClass { @@ -1110,7 +1110,7 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response) override { + ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -1144,7 +1144,7 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -1161,7 +1161,7 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -1297,7 +1297,7 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response) override { + ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -1337,7 +1337,7 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -1357,7 +1357,7 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -1524,7 +1524,7 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response) override { + ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -1574,7 +1574,7 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -1599,7 +1599,7 @@ class MilvusService final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -1778,18 +1778,18 @@ class MilvusService final { public: WithStreamedUnaryMethod_CreateTable() { ::grpc::Service::MarkMethodStreamed(0, - new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::TableSchema, ::milvus::Status>(std::bind(&WithStreamedUnaryMethod_CreateTable::StreamedCreateTable, this, std::placeholders::_1, std::placeholders::_2))); + new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::TableSchema, ::milvus::grpc::Status>(std::bind(&WithStreamedUnaryMethod_CreateTable::StreamedCreateTable, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_CreateTable() override { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method - ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response) override { + ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } // replace default version of method with streamed unary - virtual ::grpc::Status StreamedCreateTable(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::TableSchema,::milvus::Status>* server_unary_streamer) = 0; + virtual ::grpc::Status StreamedCreateTable(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::TableSchema,::milvus::grpc::Status>* server_unary_streamer) = 0; }; template class WithStreamedUnaryMethod_HasTable : public BaseClass { @@ -1818,18 +1818,18 @@ class MilvusService final { public: WithStreamedUnaryMethod_DropTable() { ::grpc::Service::MarkMethodStreamed(2, - new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::TableName, ::milvus::Status>(std::bind(&WithStreamedUnaryMethod_DropTable::StreamedDropTable, this, std::placeholders::_1, std::placeholders::_2))); + new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::Status>(std::bind(&WithStreamedUnaryMethod_DropTable::StreamedDropTable, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_DropTable() override { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method - ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } // replace default version of method with streamed unary - virtual ::grpc::Status StreamedDropTable(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::TableName,::milvus::Status>* server_unary_streamer) = 0; + virtual ::grpc::Status StreamedDropTable(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::TableName,::milvus::grpc::Status>* server_unary_streamer) = 0; }; template class WithStreamedUnaryMethod_BuildIndex : public BaseClass { @@ -1838,18 +1838,18 @@ class MilvusService final { public: WithStreamedUnaryMethod_BuildIndex() { ::grpc::Service::MarkMethodStreamed(3, - new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::TableName, ::milvus::Status>(std::bind(&WithStreamedUnaryMethod_BuildIndex::StreamedBuildIndex, this, std::placeholders::_1, std::placeholders::_2))); + new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::Status>(std::bind(&WithStreamedUnaryMethod_BuildIndex::StreamedBuildIndex, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_BuildIndex() override { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method - ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) override { + ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } // replace default version of method with streamed unary - virtual ::grpc::Status StreamedBuildIndex(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::TableName,::milvus::Status>* server_unary_streamer) = 0; + virtual ::grpc::Status StreamedBuildIndex(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::TableName,::milvus::grpc::Status>* server_unary_streamer) = 0; }; template class WithStreamedUnaryMethod_InsertVector : public BaseClass { diff --git a/cpp/src/grpc/gen-milvus/milvus.pb.cc b/cpp/src/grpc/gen-milvus/milvus.pb.cc index 925105ac60..a4b770e0e6 100644 --- a/cpp/src/grpc/gen-milvus/milvus.pb.cc +++ b/cpp/src/grpc/gen-milvus/milvus.pb.cc @@ -484,59 +484,60 @@ static ::google::protobuf::Message const * const file_default_instances[] = { const char descriptor_table_protodef_milvus_2eproto[] = "\n\014milvus.proto\022\013milvus.grpc\032\014status.prot" - "o\"\?\n\tTableName\022\036\n\006status\030\001 \001(\0132\016.milvus." - "Status\022\022\n\ntable_name\030\002 \001(\t\"z\n\013TableSchem" - "a\022*\n\ntable_name\030\001 \001(\0132\026.milvus.grpc.Tabl" - "eName\022\022\n\nindex_type\030\002 \001(\005\022\021\n\tdimension\030\003" - " \001(\003\022\030\n\020store_raw_vector\030\004 \001(\010\"/\n\005Range\022" - "\023\n\013start_value\030\001 \001(\t\022\021\n\tend_value\030\002 \001(\t\"" - " \n\tRowRecord\022\023\n\013vector_data\030\001 \003(\002\"S\n\013Ins" - "ertInfos\022\022\n\ntable_name\030\001 \001(\t\0220\n\020row_reco" - "rd_array\030\002 \003(\0132\026.milvus.grpc.RowRecord\"D" - "\n\tVectorIds\022\036\n\006status\030\001 \001(\0132\016.milvus.Sta" - "tus\022\027\n\017vector_id_array\030\002 \003(\003\"\230\001\n\021SearchV" - "ectorInfos\022\022\n\ntable_name\030\001 \001(\t\0222\n\022query_" - "record_array\030\002 \003(\0132\026.milvus.grpc.RowReco" - "rd\022-\n\021query_range_array\030\003 \003(\0132\022.milvus.g" - "rpc.Range\022\014\n\004topk\030\004 \001(\003\"n\n\030SearchVectorI" - "nFilesInfos\022\025\n\rfile_id_array\030\001 \003(\t\022;\n\023se" - "arch_vector_infos\030\002 \001(\0132\036.milvus.grpc.Se" - "archVectorInfos\"+\n\013QueryResult\022\n\n\002id\030\001 \001" - "(\003\022\020\n\010distance\030\002 \001(\001\"h\n\017TopKQueryResult\022" - "\036\n\006status\030\001 \001(\0132\016.milvus.Status\0225\n\023query" - "_result_arrays\030\002 \003(\0132\030.milvus.grpc.Query" - "Result\"C\n\013StringReply\022\036\n\006status\030\001 \001(\0132\016." - "milvus.Status\022\024\n\014string_reply\030\002 \001(\t\"\?\n\tB" - "oolReply\022\036\n\006status\030\001 \001(\0132\016.milvus.Status" - "\022\022\n\nbool_reply\030\002 \001(\010\"H\n\rTableRowCount\022\036\n" - "\006status\030\001 \001(\0132\016.milvus.Status\022\027\n\017table_r" - "ow_count\030\002 \001(\003\"\026\n\007Command\022\013\n\003cmd\030\001 \001(\t\"<" - "\n\014ServerStatus\022\036\n\006status\030\001 \001(\0132\016.milvus." - "Status\022\014\n\004info\030\002 \001(\t2\367\005\n\rMilvusService\0229" - "\n\013CreateTable\022\030.milvus.grpc.TableSchema\032" - "\016.milvus.Status\"\000\022<\n\010HasTable\022\026.milvus.g" + "o\"D\n\tTableName\022#\n\006status\030\001 \001(\0132\023.milvus." + "grpc.Status\022\022\n\ntable_name\030\002 \001(\t\"z\n\013Table" + "Schema\022*\n\ntable_name\030\001 \001(\0132\026.milvus.grpc" + ".TableName\022\022\n\nindex_type\030\002 \001(\005\022\021\n\tdimens" + "ion\030\003 \001(\003\022\030\n\020store_raw_vector\030\004 \001(\010\"/\n\005R" + "ange\022\023\n\013start_value\030\001 \001(\t\022\021\n\tend_value\030\002" + " \001(\t\" \n\tRowRecord\022\023\n\013vector_data\030\001 \003(\002\"S" + "\n\013InsertInfos\022\022\n\ntable_name\030\001 \001(\t\0220\n\020row" + "_record_array\030\002 \003(\0132\026.milvus.grpc.RowRec" + "ord\"I\n\tVectorIds\022#\n\006status\030\001 \001(\0132\023.milvu" + "s.grpc.Status\022\027\n\017vector_id_array\030\002 \003(\003\"\230" + "\001\n\021SearchVectorInfos\022\022\n\ntable_name\030\001 \001(\t" + "\0222\n\022query_record_array\030\002 \003(\0132\026.milvus.gr" + "pc.RowRecord\022-\n\021query_range_array\030\003 \003(\0132" + "\022.milvus.grpc.Range\022\014\n\004topk\030\004 \001(\003\"n\n\030Sea" + "rchVectorInFilesInfos\022\025\n\rfile_id_array\030\001" + " \003(\t\022;\n\023search_vector_infos\030\002 \001(\0132\036.milv" + "us.grpc.SearchVectorInfos\"+\n\013QueryResult" + "\022\n\n\002id\030\001 \001(\003\022\020\n\010distance\030\002 \001(\001\"m\n\017TopKQu" + "eryResult\022#\n\006status\030\001 \001(\0132\023.milvus.grpc." + "Status\0225\n\023query_result_arrays\030\002 \003(\0132\030.mi" + "lvus.grpc.QueryResult\"H\n\013StringReply\022#\n\006" + "status\030\001 \001(\0132\023.milvus.grpc.Status\022\024\n\014str" + "ing_reply\030\002 \001(\t\"D\n\tBoolReply\022#\n\006status\030\001" + " \001(\0132\023.milvus.grpc.Status\022\022\n\nbool_reply\030" + "\002 \001(\010\"M\n\rTableRowCount\022#\n\006status\030\001 \001(\0132\023" + ".milvus.grpc.Status\022\027\n\017table_row_count\030\002" + " \001(\003\"\026\n\007Command\022\013\n\003cmd\030\001 \001(\t\"A\n\014ServerSt" + "atus\022#\n\006status\030\001 \001(\0132\023.milvus.grpc.Statu" + "s\022\014\n\004info\030\002 \001(\t2\206\006\n\rMilvusService\022>\n\013Cre" + "ateTable\022\030.milvus.grpc.TableSchema\032\023.mil" + "vus.grpc.Status\"\000\022<\n\010HasTable\022\026.milvus.g" "rpc.TableName\032\026.milvus.grpc.BoolReply\"\000\022" - "5\n\tDropTable\022\026.milvus.grpc.TableName\032\016.m" - "ilvus.Status\"\000\0226\n\nBuildIndex\022\026.milvus.gr" - "pc.TableName\032\016.milvus.Status\"\000\022B\n\014Insert" - "Vector\022\030.milvus.grpc.InsertInfos\032\026.milvu" - "s.grpc.VectorIds\"\000\022P\n\014SearchVector\022\036.mil" - "vus.grpc.SearchVectorInfos\032\034.milvus.grpc" - ".TopKQueryResult\"\0000\001\022^\n\023SearchVectorInFi" - "les\022%.milvus.grpc.SearchVectorInFilesInf" - "os\032\034.milvus.grpc.TopKQueryResult\"\0000\001\022C\n\r" - "DescribeTable\022\026.milvus.grpc.TableName\032\030." - "milvus.grpc.TableSchema\"\000\022H\n\020GetTableRow" - "Count\022\026.milvus.grpc.TableName\032\032.milvus.g" - "rpc.TableRowCount\"\000\022>\n\nShowTables\022\024.milv" - "us.grpc.Command\032\026.milvus.grpc.TableName\"" - "\0000\001\0229\n\004Ping\022\024.milvus.grpc.Command\032\031.milv" - "us.grpc.ServerStatus\"\000b\006proto3" + ":\n\tDropTable\022\026.milvus.grpc.TableName\032\023.m" + "ilvus.grpc.Status\"\000\022;\n\nBuildIndex\022\026.milv" + "us.grpc.TableName\032\023.milvus.grpc.Status\"\000" + "\022B\n\014InsertVector\022\030.milvus.grpc.InsertInf" + "os\032\026.milvus.grpc.VectorIds\"\000\022P\n\014SearchVe" + "ctor\022\036.milvus.grpc.SearchVectorInfos\032\034.m" + "ilvus.grpc.TopKQueryResult\"\0000\001\022^\n\023Search" + "VectorInFiles\022%.milvus.grpc.SearchVector" + "InFilesInfos\032\034.milvus.grpc.TopKQueryResu" + "lt\"\0000\001\022C\n\rDescribeTable\022\026.milvus.grpc.Ta" + "bleName\032\030.milvus.grpc.TableSchema\"\000\022H\n\020G" + "etTableRowCount\022\026.milvus.grpc.TableName\032" + "\032.milvus.grpc.TableRowCount\"\000\022>\n\nShowTab" + "les\022\024.milvus.grpc.Command\032\026.milvus.grpc." + "TableName\"\0000\001\0229\n\004Ping\022\024.milvus.grpc.Comm" + "and\032\031.milvus.grpc.ServerStatus\"\000b\006proto3" ; ::google::protobuf::internal::DescriptorTable descriptor_table_milvus_2eproto = { false, InitDefaults_milvus_2eproto, descriptor_table_protodef_milvus_2eproto, - "milvus.proto", &assign_descriptors_table_milvus_2eproto, 1950, + "milvus.proto", &assign_descriptors_table_milvus_2eproto, 2000, }; void AddDescriptors_milvus_2eproto() { @@ -555,15 +556,15 @@ namespace grpc { // =================================================================== void TableName::InitAsDefaultInstance() { - ::milvus::grpc::_TableName_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::Status*>( - ::milvus::Status::internal_default_instance()); + ::milvus::grpc::_TableName_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::grpc::Status*>( + ::milvus::grpc::Status::internal_default_instance()); } class TableName::HasBitSetters { public: - static const ::milvus::Status& status(const TableName* msg); + static const ::milvus::grpc::Status& status(const TableName* msg); }; -const ::milvus::Status& +const ::milvus::grpc::Status& TableName::HasBitSetters::status(const TableName* msg) { return *msg->status_; } @@ -592,7 +593,7 @@ TableName::TableName(const TableName& from) table_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.table_name_); } if (from.has_status()) { - status_ = new ::milvus::Status(*from.status_); + status_ = new ::milvus::grpc::Status(*from.status_); } else { status_ = nullptr; } @@ -652,12 +653,12 @@ const char* TableName::_InternalParse(const char* begin, const char* end, void* ptr = ::google::protobuf::io::Parse32(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; case 1: { if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; ptr = ::google::protobuf::io::ReadSize(ptr, &size); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::Status::_InternalParse; + parser_till_end = ::milvus::grpc::Status::_InternalParse; object = msg->mutable_status(); if (size > end - ptr) goto len_delim_till_end; ptr += size; @@ -715,7 +716,7 @@ bool TableName::MergePartialFromCodedStream( tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( @@ -768,7 +769,7 @@ void TableName::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::status(this), output); @@ -797,7 +798,7 @@ void TableName::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -843,7 +844,7 @@ size_t TableName::ByteSizeLong() const { this->table_name()); } - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -882,7 +883,7 @@ void TableName::MergeFrom(const TableName& from) { table_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.table_name_); } if (from.has_status()) { - mutable_status()->::milvus::Status::MergeFrom(from.status()); + mutable_status()->::milvus::grpc::Status::MergeFrom(from.status()); } } @@ -2367,15 +2368,15 @@ void InsertInfos::InternalSwap(InsertInfos* other) { // =================================================================== void VectorIds::InitAsDefaultInstance() { - ::milvus::grpc::_VectorIds_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::Status*>( - ::milvus::Status::internal_default_instance()); + ::milvus::grpc::_VectorIds_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::grpc::Status*>( + ::milvus::grpc::Status::internal_default_instance()); } class VectorIds::HasBitSetters { public: - static const ::milvus::Status& status(const VectorIds* msg); + static const ::milvus::grpc::Status& status(const VectorIds* msg); }; -const ::milvus::Status& +const ::milvus::grpc::Status& VectorIds::HasBitSetters::status(const VectorIds* msg) { return *msg->status_; } @@ -2401,7 +2402,7 @@ VectorIds::VectorIds(const VectorIds& from) vector_id_array_(from.vector_id_array_) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_status()) { - status_ = new ::milvus::Status(*from.status_); + status_ = new ::milvus::grpc::Status(*from.status_); } else { status_ = nullptr; } @@ -2459,12 +2460,12 @@ const char* VectorIds::_InternalParse(const char* begin, const char* end, void* ptr = ::google::protobuf::io::Parse32(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; case 1: { if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; ptr = ::google::protobuf::io::ReadSize(ptr, &size); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::Status::_InternalParse; + parser_till_end = ::milvus::grpc::Status::_InternalParse; object = msg->mutable_status(); if (size > end - ptr) goto len_delim_till_end; ptr += size; @@ -2522,7 +2523,7 @@ bool VectorIds::MergePartialFromCodedStream( tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( @@ -2576,7 +2577,7 @@ void VectorIds::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::status(this), output); @@ -2606,7 +2607,7 @@ void VectorIds::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -2662,7 +2663,7 @@ size_t VectorIds::ByteSizeLong() const { total_size += data_size; } - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -2698,7 +2699,7 @@ void VectorIds::MergeFrom(const VectorIds& from) { vector_id_array_.MergeFrom(from.vector_id_array_); if (from.has_status()) { - mutable_status()->::milvus::Status::MergeFrom(from.status()); + mutable_status()->::milvus::grpc::Status::MergeFrom(from.status()); } } @@ -3867,15 +3868,15 @@ void QueryResult::InternalSwap(QueryResult* other) { // =================================================================== void TopKQueryResult::InitAsDefaultInstance() { - ::milvus::grpc::_TopKQueryResult_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::Status*>( - ::milvus::Status::internal_default_instance()); + ::milvus::grpc::_TopKQueryResult_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::grpc::Status*>( + ::milvus::grpc::Status::internal_default_instance()); } class TopKQueryResult::HasBitSetters { public: - static const ::milvus::Status& status(const TopKQueryResult* msg); + static const ::milvus::grpc::Status& status(const TopKQueryResult* msg); }; -const ::milvus::Status& +const ::milvus::grpc::Status& TopKQueryResult::HasBitSetters::status(const TopKQueryResult* msg) { return *msg->status_; } @@ -3901,7 +3902,7 @@ TopKQueryResult::TopKQueryResult(const TopKQueryResult& from) query_result_arrays_(from.query_result_arrays_) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_status()) { - status_ = new ::milvus::Status(*from.status_); + status_ = new ::milvus::grpc::Status(*from.status_); } else { status_ = nullptr; } @@ -3959,12 +3960,12 @@ const char* TopKQueryResult::_InternalParse(const char* begin, const char* end, ptr = ::google::protobuf::io::Parse32(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; case 1: { if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; ptr = ::google::protobuf::io::ReadSize(ptr, &size); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::Status::_InternalParse; + parser_till_end = ::milvus::grpc::Status::_InternalParse; object = msg->mutable_status(); if (size > end - ptr) goto len_delim_till_end; ptr += size; @@ -4018,7 +4019,7 @@ bool TopKQueryResult::MergePartialFromCodedStream( tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( @@ -4067,7 +4068,7 @@ void TopKQueryResult::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::status(this), output); @@ -4095,7 +4096,7 @@ void TopKQueryResult::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -4142,7 +4143,7 @@ size_t TopKQueryResult::ByteSizeLong() const { } } - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -4178,7 +4179,7 @@ void TopKQueryResult::MergeFrom(const TopKQueryResult& from) { query_result_arrays_.MergeFrom(from.query_result_arrays_); if (from.has_status()) { - mutable_status()->::milvus::Status::MergeFrom(from.status()); + mutable_status()->::milvus::grpc::Status::MergeFrom(from.status()); } } @@ -4220,15 +4221,15 @@ void TopKQueryResult::InternalSwap(TopKQueryResult* other) { // =================================================================== void StringReply::InitAsDefaultInstance() { - ::milvus::grpc::_StringReply_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::Status*>( - ::milvus::Status::internal_default_instance()); + ::milvus::grpc::_StringReply_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::grpc::Status*>( + ::milvus::grpc::Status::internal_default_instance()); } class StringReply::HasBitSetters { public: - static const ::milvus::Status& status(const StringReply* msg); + static const ::milvus::grpc::Status& status(const StringReply* msg); }; -const ::milvus::Status& +const ::milvus::grpc::Status& StringReply::HasBitSetters::status(const StringReply* msg) { return *msg->status_; } @@ -4257,7 +4258,7 @@ StringReply::StringReply(const StringReply& from) string_reply_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string_reply_); } if (from.has_status()) { - status_ = new ::milvus::Status(*from.status_); + status_ = new ::milvus::grpc::Status(*from.status_); } else { status_ = nullptr; } @@ -4317,12 +4318,12 @@ const char* StringReply::_InternalParse(const char* begin, const char* end, void ptr = ::google::protobuf::io::Parse32(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; case 1: { if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; ptr = ::google::protobuf::io::ReadSize(ptr, &size); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::Status::_InternalParse; + parser_till_end = ::milvus::grpc::Status::_InternalParse; object = msg->mutable_status(); if (size > end - ptr) goto len_delim_till_end; ptr += size; @@ -4380,7 +4381,7 @@ bool StringReply::MergePartialFromCodedStream( tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( @@ -4433,7 +4434,7 @@ void StringReply::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::status(this), output); @@ -4462,7 +4463,7 @@ void StringReply::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -4508,7 +4509,7 @@ size_t StringReply::ByteSizeLong() const { this->string_reply()); } - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -4547,7 +4548,7 @@ void StringReply::MergeFrom(const StringReply& from) { string_reply_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string_reply_); } if (from.has_status()) { - mutable_status()->::milvus::Status::MergeFrom(from.status()); + mutable_status()->::milvus::grpc::Status::MergeFrom(from.status()); } } @@ -4590,15 +4591,15 @@ void StringReply::InternalSwap(StringReply* other) { // =================================================================== void BoolReply::InitAsDefaultInstance() { - ::milvus::grpc::_BoolReply_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::Status*>( - ::milvus::Status::internal_default_instance()); + ::milvus::grpc::_BoolReply_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::grpc::Status*>( + ::milvus::grpc::Status::internal_default_instance()); } class BoolReply::HasBitSetters { public: - static const ::milvus::Status& status(const BoolReply* msg); + static const ::milvus::grpc::Status& status(const BoolReply* msg); }; -const ::milvus::Status& +const ::milvus::grpc::Status& BoolReply::HasBitSetters::status(const BoolReply* msg) { return *msg->status_; } @@ -4623,7 +4624,7 @@ BoolReply::BoolReply(const BoolReply& from) _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_status()) { - status_ = new ::milvus::Status(*from.status_); + status_ = new ::milvus::grpc::Status(*from.status_); } else { status_ = nullptr; } @@ -4684,12 +4685,12 @@ const char* BoolReply::_InternalParse(const char* begin, const char* end, void* ptr = ::google::protobuf::io::Parse32(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; case 1: { if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; ptr = ::google::protobuf::io::ReadSize(ptr, &size); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::Status::_InternalParse; + parser_till_end = ::milvus::grpc::Status::_InternalParse; object = msg->mutable_status(); if (size > end - ptr) goto len_delim_till_end; ptr += size; @@ -4734,7 +4735,7 @@ bool BoolReply::MergePartialFromCodedStream( tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( @@ -4785,7 +4786,7 @@ void BoolReply::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::status(this), output); @@ -4809,7 +4810,7 @@ void BoolReply::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -4842,7 +4843,7 @@ size_t BoolReply::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -4882,7 +4883,7 @@ void BoolReply::MergeFrom(const BoolReply& from) { (void) cached_has_bits; if (from.has_status()) { - mutable_status()->::milvus::Status::MergeFrom(from.status()); + mutable_status()->::milvus::grpc::Status::MergeFrom(from.status()); } if (from.bool_reply() != 0) { set_bool_reply(from.bool_reply()); @@ -4927,15 +4928,15 @@ void BoolReply::InternalSwap(BoolReply* other) { // =================================================================== void TableRowCount::InitAsDefaultInstance() { - ::milvus::grpc::_TableRowCount_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::Status*>( - ::milvus::Status::internal_default_instance()); + ::milvus::grpc::_TableRowCount_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::grpc::Status*>( + ::milvus::grpc::Status::internal_default_instance()); } class TableRowCount::HasBitSetters { public: - static const ::milvus::Status& status(const TableRowCount* msg); + static const ::milvus::grpc::Status& status(const TableRowCount* msg); }; -const ::milvus::Status& +const ::milvus::grpc::Status& TableRowCount::HasBitSetters::status(const TableRowCount* msg) { return *msg->status_; } @@ -4960,7 +4961,7 @@ TableRowCount::TableRowCount(const TableRowCount& from) _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_status()) { - status_ = new ::milvus::Status(*from.status_); + status_ = new ::milvus::grpc::Status(*from.status_); } else { status_ = nullptr; } @@ -5021,12 +5022,12 @@ const char* TableRowCount::_InternalParse(const char* begin, const char* end, vo ptr = ::google::protobuf::io::Parse32(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; case 1: { if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; ptr = ::google::protobuf::io::ReadSize(ptr, &size); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::Status::_InternalParse; + parser_till_end = ::milvus::grpc::Status::_InternalParse; object = msg->mutable_status(); if (size > end - ptr) goto len_delim_till_end; ptr += size; @@ -5071,7 +5072,7 @@ bool TableRowCount::MergePartialFromCodedStream( tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( @@ -5122,7 +5123,7 @@ void TableRowCount::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::status(this), output); @@ -5146,7 +5147,7 @@ void TableRowCount::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -5179,7 +5180,7 @@ size_t TableRowCount::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -5221,7 +5222,7 @@ void TableRowCount::MergeFrom(const TableRowCount& from) { (void) cached_has_bits; if (from.has_status()) { - mutable_status()->::milvus::Status::MergeFrom(from.status()); + mutable_status()->::milvus::grpc::Status::MergeFrom(from.status()); } if (from.table_row_count() != 0) { set_table_row_count(from.table_row_count()); @@ -5563,15 +5564,15 @@ void Command::InternalSwap(Command* other) { // =================================================================== void ServerStatus::InitAsDefaultInstance() { - ::milvus::grpc::_ServerStatus_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::Status*>( - ::milvus::Status::internal_default_instance()); + ::milvus::grpc::_ServerStatus_default_instance_._instance.get_mutable()->status_ = const_cast< ::milvus::grpc::Status*>( + ::milvus::grpc::Status::internal_default_instance()); } class ServerStatus::HasBitSetters { public: - static const ::milvus::Status& status(const ServerStatus* msg); + static const ::milvus::grpc::Status& status(const ServerStatus* msg); }; -const ::milvus::Status& +const ::milvus::grpc::Status& ServerStatus::HasBitSetters::status(const ServerStatus* msg) { return *msg->status_; } @@ -5600,7 +5601,7 @@ ServerStatus::ServerStatus(const ServerStatus& from) info_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.info_); } if (from.has_status()) { - status_ = new ::milvus::Status(*from.status_); + status_ = new ::milvus::grpc::Status(*from.status_); } else { status_ = nullptr; } @@ -5660,12 +5661,12 @@ const char* ServerStatus::_InternalParse(const char* begin, const char* end, voi ptr = ::google::protobuf::io::Parse32(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; case 1: { if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; ptr = ::google::protobuf::io::ReadSize(ptr, &size); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::Status::_InternalParse; + parser_till_end = ::milvus::grpc::Status::_InternalParse; object = msg->mutable_status(); if (size > end - ptr) goto len_delim_till_end; ptr += size; @@ -5723,7 +5724,7 @@ bool ServerStatus::MergePartialFromCodedStream( tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( @@ -5776,7 +5777,7 @@ void ServerStatus::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::status(this), output); @@ -5805,7 +5806,7 @@ void ServerStatus::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -5851,7 +5852,7 @@ size_t ServerStatus::ByteSizeLong() const { this->info()); } - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; if (this->has_status()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -5890,7 +5891,7 @@ void ServerStatus::MergeFrom(const ServerStatus& from) { info_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.info_); } if (from.has_status()) { - mutable_status()->::milvus::Status::MergeFrom(from.status()); + mutable_status()->::milvus::grpc::Status::MergeFrom(from.status()); } } diff --git a/cpp/src/grpc/gen-milvus/milvus.pb.h b/cpp/src/grpc/gen-milvus/milvus.pb.h index 7061eac44b..d391ed3344 100644 --- a/cpp/src/grpc/gen-milvus/milvus.pb.h +++ b/cpp/src/grpc/gen-milvus/milvus.pb.h @@ -231,14 +231,14 @@ class TableName final : ::std::string* release_table_name(); void set_allocated_table_name(::std::string* table_name); - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; bool has_status() const; void clear_status(); static const int kStatusFieldNumber = 1; - const ::milvus::Status& status() const; - ::milvus::Status* release_status(); - ::milvus::Status* mutable_status(); - void set_allocated_status(::milvus::Status* status); + const ::milvus::grpc::Status& status() const; + ::milvus::grpc::Status* release_status(); + ::milvus::grpc::Status* mutable_status(); + void set_allocated_status(::milvus::grpc::Status* status); // @@protoc_insertion_point(class_scope:milvus.grpc.TableName) private: @@ -246,7 +246,7 @@ class TableName final : ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr table_name_; - ::milvus::Status* status_; + ::milvus::grpc::Status* status_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; @@ -882,14 +882,14 @@ class VectorIds final : ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* mutable_vector_id_array(); - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; bool has_status() const; void clear_status(); static const int kStatusFieldNumber = 1; - const ::milvus::Status& status() const; - ::milvus::Status* release_status(); - ::milvus::Status* mutable_status(); - void set_allocated_status(::milvus::Status* status); + const ::milvus::grpc::Status& status() const; + ::milvus::grpc::Status* release_status(); + ::milvus::grpc::Status* mutable_status(); + void set_allocated_status(::milvus::grpc::Status* status); // @@protoc_insertion_point(class_scope:milvus.grpc.VectorIds) private: @@ -898,7 +898,7 @@ class VectorIds final : ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::RepeatedField< ::google::protobuf::int64 > vector_id_array_; mutable std::atomic _vector_id_array_cached_byte_size_; - ::milvus::Status* status_; + ::milvus::grpc::Status* status_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; @@ -1421,14 +1421,14 @@ class TopKQueryResult final : const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::QueryResult >& query_result_arrays() const; - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; bool has_status() const; void clear_status(); static const int kStatusFieldNumber = 1; - const ::milvus::Status& status() const; - ::milvus::Status* release_status(); - ::milvus::Status* mutable_status(); - void set_allocated_status(::milvus::Status* status); + const ::milvus::grpc::Status& status() const; + ::milvus::grpc::Status* release_status(); + ::milvus::grpc::Status* mutable_status(); + void set_allocated_status(::milvus::grpc::Status* status); // @@protoc_insertion_point(class_scope:milvus.grpc.TopKQueryResult) private: @@ -1436,7 +1436,7 @@ class TopKQueryResult final : ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::RepeatedPtrField< ::milvus::grpc::QueryResult > query_result_arrays_; - ::milvus::Status* status_; + ::milvus::grpc::Status* status_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; @@ -1551,14 +1551,14 @@ class StringReply final : ::std::string* release_string_reply(); void set_allocated_string_reply(::std::string* string_reply); - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; bool has_status() const; void clear_status(); static const int kStatusFieldNumber = 1; - const ::milvus::Status& status() const; - ::milvus::Status* release_status(); - ::milvus::Status* mutable_status(); - void set_allocated_status(::milvus::Status* status); + const ::milvus::grpc::Status& status() const; + ::milvus::grpc::Status* release_status(); + ::milvus::grpc::Status* mutable_status(); + void set_allocated_status(::milvus::grpc::Status* status); // @@protoc_insertion_point(class_scope:milvus.grpc.StringReply) private: @@ -1566,7 +1566,7 @@ class StringReply final : ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr string_reply_; - ::milvus::Status* status_; + ::milvus::grpc::Status* status_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; @@ -1667,14 +1667,14 @@ class BoolReply final : // accessors ------------------------------------------------------- - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; bool has_status() const; void clear_status(); static const int kStatusFieldNumber = 1; - const ::milvus::Status& status() const; - ::milvus::Status* release_status(); - ::milvus::Status* mutable_status(); - void set_allocated_status(::milvus::Status* status); + const ::milvus::grpc::Status& status() const; + ::milvus::grpc::Status* release_status(); + ::milvus::grpc::Status* mutable_status(); + void set_allocated_status(::milvus::grpc::Status* status); // bool bool_reply = 2; void clear_bool_reply(); @@ -1687,7 +1687,7 @@ class BoolReply final : class HasBitSetters; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::milvus::Status* status_; + ::milvus::grpc::Status* status_; bool bool_reply_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; @@ -1789,14 +1789,14 @@ class TableRowCount final : // accessors ------------------------------------------------------- - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; bool has_status() const; void clear_status(); static const int kStatusFieldNumber = 1; - const ::milvus::Status& status() const; - ::milvus::Status* release_status(); - ::milvus::Status* mutable_status(); - void set_allocated_status(::milvus::Status* status); + const ::milvus::grpc::Status& status() const; + ::milvus::grpc::Status* release_status(); + ::milvus::grpc::Status* mutable_status(); + void set_allocated_status(::milvus::grpc::Status* status); // int64 table_row_count = 2; void clear_table_row_count(); @@ -1809,7 +1809,7 @@ class TableRowCount final : class HasBitSetters; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::milvus::Status* status_; + ::milvus::grpc::Status* status_; ::google::protobuf::int64 table_row_count_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; @@ -2045,14 +2045,14 @@ class ServerStatus final : ::std::string* release_info(); void set_allocated_info(::std::string* info); - // .milvus.Status status = 1; + // .milvus.grpc.Status status = 1; bool has_status() const; void clear_status(); static const int kStatusFieldNumber = 1; - const ::milvus::Status& status() const; - ::milvus::Status* release_status(); - ::milvus::Status* mutable_status(); - void set_allocated_status(::milvus::Status* status); + const ::milvus::grpc::Status& status() const; + ::milvus::grpc::Status* release_status(); + ::milvus::grpc::Status* mutable_status(); + void set_allocated_status(::milvus::grpc::Status* status); // @@protoc_insertion_point(class_scope:milvus.grpc.ServerStatus) private: @@ -2060,7 +2060,7 @@ class ServerStatus final : ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr info_; - ::milvus::Status* status_; + ::milvus::grpc::Status* status_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; @@ -2075,33 +2075,33 @@ class ServerStatus final : #endif // __GNUC__ // TableName -// .milvus.Status status = 1; +// .milvus.grpc.Status status = 1; inline bool TableName::has_status() const { return this != internal_default_instance() && status_ != nullptr; } -inline const ::milvus::Status& TableName::status() const { - const ::milvus::Status* p = status_; +inline const ::milvus::grpc::Status& TableName::status() const { + const ::milvus::grpc::Status* p = status_; // @@protoc_insertion_point(field_get:milvus.grpc.TableName.status) - return p != nullptr ? *p : *reinterpret_cast( - &::milvus::_Status_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::grpc::_Status_default_instance_); } -inline ::milvus::Status* TableName::release_status() { +inline ::milvus::grpc::Status* TableName::release_status() { // @@protoc_insertion_point(field_release:milvus.grpc.TableName.status) - ::milvus::Status* temp = status_; + ::milvus::grpc::Status* temp = status_; status_ = nullptr; return temp; } -inline ::milvus::Status* TableName::mutable_status() { +inline ::milvus::grpc::Status* TableName::mutable_status() { if (status_ == nullptr) { - auto* p = CreateMaybeMessage<::milvus::Status>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage<::milvus::grpc::Status>(GetArenaNoVirtual()); status_ = p; } // @@protoc_insertion_point(field_mutable:milvus.grpc.TableName.status) return status_; } -inline void TableName::set_allocated_status(::milvus::Status* status) { +inline void TableName::set_allocated_status(::milvus::grpc::Status* status) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); @@ -2505,33 +2505,33 @@ InsertInfos::row_record_array() const { // VectorIds -// .milvus.Status status = 1; +// .milvus.grpc.Status status = 1; inline bool VectorIds::has_status() const { return this != internal_default_instance() && status_ != nullptr; } -inline const ::milvus::Status& VectorIds::status() const { - const ::milvus::Status* p = status_; +inline const ::milvus::grpc::Status& VectorIds::status() const { + const ::milvus::grpc::Status* p = status_; // @@protoc_insertion_point(field_get:milvus.grpc.VectorIds.status) - return p != nullptr ? *p : *reinterpret_cast( - &::milvus::_Status_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::grpc::_Status_default_instance_); } -inline ::milvus::Status* VectorIds::release_status() { +inline ::milvus::grpc::Status* VectorIds::release_status() { // @@protoc_insertion_point(field_release:milvus.grpc.VectorIds.status) - ::milvus::Status* temp = status_; + ::milvus::grpc::Status* temp = status_; status_ = nullptr; return temp; } -inline ::milvus::Status* VectorIds::mutable_status() { +inline ::milvus::grpc::Status* VectorIds::mutable_status() { if (status_ == nullptr) { - auto* p = CreateMaybeMessage<::milvus::Status>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage<::milvus::grpc::Status>(GetArenaNoVirtual()); status_ = p; } // @@protoc_insertion_point(field_mutable:milvus.grpc.VectorIds.status) return status_; } -inline void VectorIds::set_allocated_status(::milvus::Status* status) { +inline void VectorIds::set_allocated_status(::milvus::grpc::Status* status) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); @@ -2871,33 +2871,33 @@ inline void QueryResult::set_distance(double value) { // TopKQueryResult -// .milvus.Status status = 1; +// .milvus.grpc.Status status = 1; inline bool TopKQueryResult::has_status() const { return this != internal_default_instance() && status_ != nullptr; } -inline const ::milvus::Status& TopKQueryResult::status() const { - const ::milvus::Status* p = status_; +inline const ::milvus::grpc::Status& TopKQueryResult::status() const { + const ::milvus::grpc::Status* p = status_; // @@protoc_insertion_point(field_get:milvus.grpc.TopKQueryResult.status) - return p != nullptr ? *p : *reinterpret_cast( - &::milvus::_Status_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::grpc::_Status_default_instance_); } -inline ::milvus::Status* TopKQueryResult::release_status() { +inline ::milvus::grpc::Status* TopKQueryResult::release_status() { // @@protoc_insertion_point(field_release:milvus.grpc.TopKQueryResult.status) - ::milvus::Status* temp = status_; + ::milvus::grpc::Status* temp = status_; status_ = nullptr; return temp; } -inline ::milvus::Status* TopKQueryResult::mutable_status() { +inline ::milvus::grpc::Status* TopKQueryResult::mutable_status() { if (status_ == nullptr) { - auto* p = CreateMaybeMessage<::milvus::Status>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage<::milvus::grpc::Status>(GetArenaNoVirtual()); status_ = p; } // @@protoc_insertion_point(field_mutable:milvus.grpc.TopKQueryResult.status) return status_; } -inline void TopKQueryResult::set_allocated_status(::milvus::Status* status) { +inline void TopKQueryResult::set_allocated_status(::milvus::grpc::Status* status) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); @@ -2950,33 +2950,33 @@ TopKQueryResult::query_result_arrays() const { // StringReply -// .milvus.Status status = 1; +// .milvus.grpc.Status status = 1; inline bool StringReply::has_status() const { return this != internal_default_instance() && status_ != nullptr; } -inline const ::milvus::Status& StringReply::status() const { - const ::milvus::Status* p = status_; +inline const ::milvus::grpc::Status& StringReply::status() const { + const ::milvus::grpc::Status* p = status_; // @@protoc_insertion_point(field_get:milvus.grpc.StringReply.status) - return p != nullptr ? *p : *reinterpret_cast( - &::milvus::_Status_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::grpc::_Status_default_instance_); } -inline ::milvus::Status* StringReply::release_status() { +inline ::milvus::grpc::Status* StringReply::release_status() { // @@protoc_insertion_point(field_release:milvus.grpc.StringReply.status) - ::milvus::Status* temp = status_; + ::milvus::grpc::Status* temp = status_; status_ = nullptr; return temp; } -inline ::milvus::Status* StringReply::mutable_status() { +inline ::milvus::grpc::Status* StringReply::mutable_status() { if (status_ == nullptr) { - auto* p = CreateMaybeMessage<::milvus::Status>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage<::milvus::grpc::Status>(GetArenaNoVirtual()); status_ = p; } // @@protoc_insertion_point(field_mutable:milvus.grpc.StringReply.status) return status_; } -inline void StringReply::set_allocated_status(::milvus::Status* status) { +inline void StringReply::set_allocated_status(::milvus::grpc::Status* status) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); @@ -3052,33 +3052,33 @@ inline void StringReply::set_allocated_string_reply(::std::string* string_reply) // BoolReply -// .milvus.Status status = 1; +// .milvus.grpc.Status status = 1; inline bool BoolReply::has_status() const { return this != internal_default_instance() && status_ != nullptr; } -inline const ::milvus::Status& BoolReply::status() const { - const ::milvus::Status* p = status_; +inline const ::milvus::grpc::Status& BoolReply::status() const { + const ::milvus::grpc::Status* p = status_; // @@protoc_insertion_point(field_get:milvus.grpc.BoolReply.status) - return p != nullptr ? *p : *reinterpret_cast( - &::milvus::_Status_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::grpc::_Status_default_instance_); } -inline ::milvus::Status* BoolReply::release_status() { +inline ::milvus::grpc::Status* BoolReply::release_status() { // @@protoc_insertion_point(field_release:milvus.grpc.BoolReply.status) - ::milvus::Status* temp = status_; + ::milvus::grpc::Status* temp = status_; status_ = nullptr; return temp; } -inline ::milvus::Status* BoolReply::mutable_status() { +inline ::milvus::grpc::Status* BoolReply::mutable_status() { if (status_ == nullptr) { - auto* p = CreateMaybeMessage<::milvus::Status>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage<::milvus::grpc::Status>(GetArenaNoVirtual()); status_ = p; } // @@protoc_insertion_point(field_mutable:milvus.grpc.BoolReply.status) return status_; } -inline void BoolReply::set_allocated_status(::milvus::Status* status) { +inline void BoolReply::set_allocated_status(::milvus::grpc::Status* status) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); @@ -3115,33 +3115,33 @@ inline void BoolReply::set_bool_reply(bool value) { // TableRowCount -// .milvus.Status status = 1; +// .milvus.grpc.Status status = 1; inline bool TableRowCount::has_status() const { return this != internal_default_instance() && status_ != nullptr; } -inline const ::milvus::Status& TableRowCount::status() const { - const ::milvus::Status* p = status_; +inline const ::milvus::grpc::Status& TableRowCount::status() const { + const ::milvus::grpc::Status* p = status_; // @@protoc_insertion_point(field_get:milvus.grpc.TableRowCount.status) - return p != nullptr ? *p : *reinterpret_cast( - &::milvus::_Status_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::grpc::_Status_default_instance_); } -inline ::milvus::Status* TableRowCount::release_status() { +inline ::milvus::grpc::Status* TableRowCount::release_status() { // @@protoc_insertion_point(field_release:milvus.grpc.TableRowCount.status) - ::milvus::Status* temp = status_; + ::milvus::grpc::Status* temp = status_; status_ = nullptr; return temp; } -inline ::milvus::Status* TableRowCount::mutable_status() { +inline ::milvus::grpc::Status* TableRowCount::mutable_status() { if (status_ == nullptr) { - auto* p = CreateMaybeMessage<::milvus::Status>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage<::milvus::grpc::Status>(GetArenaNoVirtual()); status_ = p; } // @@protoc_insertion_point(field_mutable:milvus.grpc.TableRowCount.status) return status_; } -inline void TableRowCount::set_allocated_status(::milvus::Status* status) { +inline void TableRowCount::set_allocated_status(::milvus::grpc::Status* status) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); @@ -3235,33 +3235,33 @@ inline void Command::set_allocated_cmd(::std::string* cmd) { // ServerStatus -// .milvus.Status status = 1; +// .milvus.grpc.Status status = 1; inline bool ServerStatus::has_status() const { return this != internal_default_instance() && status_ != nullptr; } -inline const ::milvus::Status& ServerStatus::status() const { - const ::milvus::Status* p = status_; +inline const ::milvus::grpc::Status& ServerStatus::status() const { + const ::milvus::grpc::Status* p = status_; // @@protoc_insertion_point(field_get:milvus.grpc.ServerStatus.status) - return p != nullptr ? *p : *reinterpret_cast( - &::milvus::_Status_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::grpc::_Status_default_instance_); } -inline ::milvus::Status* ServerStatus::release_status() { +inline ::milvus::grpc::Status* ServerStatus::release_status() { // @@protoc_insertion_point(field_release:milvus.grpc.ServerStatus.status) - ::milvus::Status* temp = status_; + ::milvus::grpc::Status* temp = status_; status_ = nullptr; return temp; } -inline ::milvus::Status* ServerStatus::mutable_status() { +inline ::milvus::grpc::Status* ServerStatus::mutable_status() { if (status_ == nullptr) { - auto* p = CreateMaybeMessage<::milvus::Status>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage<::milvus::grpc::Status>(GetArenaNoVirtual()); status_ = p; } // @@protoc_insertion_point(field_mutable:milvus.grpc.ServerStatus.status) return status_; } -inline void ServerStatus::set_allocated_status(::milvus::Status* status) { +inline void ServerStatus::set_allocated_status(::milvus::grpc::Status* status) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); diff --git a/cpp/src/grpc/gen-status/status.grpc.pb.cc b/cpp/src/grpc/gen-status/status.grpc.pb.cc index 2e8c230b82..de871f5413 100644 --- a/cpp/src/grpc/gen-status/status.grpc.pb.cc +++ b/cpp/src/grpc/gen-status/status.grpc.pb.cc @@ -17,6 +17,8 @@ #include #include namespace milvus { +namespace grpc { } // namespace milvus +} // namespace grpc diff --git a/cpp/src/grpc/gen-status/status.grpc.pb.h b/cpp/src/grpc/gen-status/status.grpc.pb.h index 81831c6f2a..c645a1e473 100644 --- a/cpp/src/grpc/gen-status/status.grpc.pb.h +++ b/cpp/src/grpc/gen-status/status.grpc.pb.h @@ -28,7 +28,9 @@ class ServerContext; } // namespace grpc namespace milvus { +namespace grpc { +} // namespace grpc } // namespace milvus diff --git a/cpp/src/grpc/gen-status/status.pb.cc b/cpp/src/grpc/gen-status/status.pb.cc index b213dbb062..96d5345328 100644 --- a/cpp/src/grpc/gen-status/status.pb.cc +++ b/cpp/src/grpc/gen-status/status.pb.cc @@ -17,20 +17,22 @@ #include namespace milvus { +namespace grpc { class StatusDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _Status_default_instance_; +} // namespace grpc } // namespace milvus static void InitDefaultsStatus_status_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::milvus::_Status_default_instance_; - new (ptr) ::milvus::Status(); + void* ptr = &::milvus::grpc::_Status_default_instance_; + new (ptr) ::milvus::grpc::Status(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::milvus::Status::InitAsDefaultInstance(); + ::milvus::grpc::Status::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_Status_status_2eproto = @@ -46,19 +48,19 @@ constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descr const ::google::protobuf::uint32 TableStruct_status_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::milvus::Status, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::Status, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::milvus::Status, error_code_), - PROTOBUF_FIELD_OFFSET(::milvus::Status, reason_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::Status, error_code_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::Status, reason_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::milvus::Status)}, + { 0, -1, sizeof(::milvus::grpc::Status)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::milvus::_Status_default_instance_), + reinterpret_cast(&::milvus::grpc::_Status_default_instance_), }; ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_status_2eproto = { @@ -68,26 +70,26 @@ static ::google::protobuf::Message const * const file_default_instances[] = { }; const char descriptor_table_protodef_status_2eproto[] = - "\n\014status.proto\022\006milvus\"\?\n\006Status\022%\n\nerro" - "r_code\030\001 \001(\0162\021.milvus.ErrorCode\022\016\n\006reaso" - "n\030\002 \001(\t*\354\003\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\024\n\020TABLE_NOT_EXISTS\020" - "\004\022\024\n\020ILLEGAL_ARGUMENT\020\005\022\021\n\rILLEGAL_RANGE" - "\020\006\022\025\n\021ILLEGAL_DIMENSION\020\007\022\026\n\022ILLEGAL_IND" - "EX_TYPE\020\010\022\026\n\022ILLEGAL_TABLE_NAME\020\t\022\020\n\014ILL" - "EGAL_TOPK\020\n\022\025\n\021ILLEGAL_ROWRECORD\020\013\022\025\n\021IL" - "LEGAL_VECTOR_ID\020\014\022\031\n\025ILLEGAL_SEARCH_RESU" - "LT\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_FOL" - "DER\020\021\022\026\n\022CANNOT_CREATE_FILE\020\022\022\030\n\024CANNOT_" - "DELETE_FOLDER\020\023\022\026\n\022CANNOT_DELETE_FILE\020\024\022" - "\025\n\021BUILD_INDEX_ERROR\020\025b\006proto3" + "\n\014status.proto\022\013milvus.grpc\"D\n\006Status\022*\n" + "\nerror_code\030\001 \001(\0162\026.milvus.grpc.ErrorCod" + "e\022\016\n\006reason\030\002 \001(\t*\354\003\n\tErrorCode\022\013\n\007SUCCE" + "SS\020\000\022\024\n\020UNEXPECTED_ERROR\020\001\022\022\n\016CONNECT_FA" + "ILED\020\002\022\025\n\021PERMISSION_DENIED\020\003\022\024\n\020TABLE_N" + "OT_EXISTS\020\004\022\024\n\020ILLEGAL_ARGUMENT\020\005\022\021\n\rILL" + "EGAL_RANGE\020\006\022\025\n\021ILLEGAL_DIMENSION\020\007\022\026\n\022I" + "LLEGAL_INDEX_TYPE\020\010\022\026\n\022ILLEGAL_TABLE_NAM" + "E\020\t\022\020\n\014ILLEGAL_TOPK\020\n\022\025\n\021ILLEGAL_ROWRECO" + "RD\020\013\022\025\n\021ILLEGAL_VECTOR_ID\020\014\022\031\n\025ILLEGAL_S" + "EARCH_RESULT\020\r\022\022\n\016FILE_NOT_FOUND\020\016\022\017\n\013ME" + "TA_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_DELETE_FOLDER\020\023\022\026\n\022CANNOT_DELE" + "TE_FILE\020\024\022\025\n\021BUILD_INDEX_ERROR\020\025b\006proto3" ; ::google::protobuf::internal::DescriptorTable descriptor_table_status_2eproto = { false, InitDefaults_status_2eproto, descriptor_table_protodef_status_2eproto, - "status.proto", &assign_descriptors_table_status_2eproto, 590, + "status.proto", &assign_descriptors_table_status_2eproto, 600, }; void AddDescriptors_status_2eproto() { @@ -100,6 +102,7 @@ void AddDescriptors_status_2eproto() { // Force running AddDescriptors() at dynamic initialization time. static bool dynamic_init_dummy_status_2eproto = []() { AddDescriptors_status_2eproto(); return true; }(); namespace milvus { +namespace grpc { const ::google::protobuf::EnumDescriptor* ErrorCode_descriptor() { ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_status_2eproto); return file_level_enum_descriptors_status_2eproto[0]; @@ -151,7 +154,7 @@ const int Status::kReasonFieldNumber; Status::Status() : ::google::protobuf::Message(), _internal_metadata_(nullptr) { SharedCtor(); - // @@protoc_insertion_point(constructor:milvus.Status) + // @@protoc_insertion_point(constructor:milvus.grpc.Status) } Status::Status(const Status& from) : ::google::protobuf::Message(), @@ -162,7 +165,7 @@ Status::Status(const Status& from) reason_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reason_); } error_code_ = from.error_code_; - // @@protoc_insertion_point(copy_constructor:milvus.Status) + // @@protoc_insertion_point(copy_constructor:milvus.grpc.Status) } void Status::SharedCtor() { @@ -173,7 +176,7 @@ void Status::SharedCtor() { } Status::~Status() { - // @@protoc_insertion_point(destructor:milvus.Status) + // @@protoc_insertion_point(destructor:milvus.grpc.Status) SharedDtor(); } @@ -191,7 +194,7 @@ const Status& Status::default_instance() { void Status::Clear() { -// @@protoc_insertion_point(message_clear_start:milvus.Status) +// @@protoc_insertion_point(message_clear_start:milvus.grpc.Status) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -214,11 +217,11 @@ const char* Status::_InternalParse(const char* begin, const char* end, void* obj ptr = ::google::protobuf::io::Parse32(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { - // .milvus.ErrorCode error_code = 1; + // .milvus.grpc.ErrorCode error_code = 1; case 1: { if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); - msg->set_error_code(static_cast<::milvus::ErrorCode>(val)); + msg->set_error_code(static_cast<::milvus::grpc::ErrorCode>(val)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -227,7 +230,7 @@ const char* Status::_InternalParse(const char* begin, const char* end, void* obj if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; ptr = ::google::protobuf::io::ReadSize(ptr, &size); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("milvus.Status.reason"); + ctx->extra_parse_data().SetFieldName("milvus.grpc.Status.reason"); object = msg->mutable_reason(); if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; @@ -266,20 +269,20 @@ bool Status::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:milvus.Status) + // @@protoc_insertion_point(parse_start:milvus.grpc.Status) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .milvus.ErrorCode error_code = 1; + // .milvus.grpc.ErrorCode error_code = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { int value = 0; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - set_error_code(static_cast< ::milvus::ErrorCode >(value)); + set_error_code(static_cast< ::milvus::grpc::ErrorCode >(value)); } else { goto handle_unusual; } @@ -294,7 +297,7 @@ bool Status::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->reason().data(), static_cast(this->reason().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "milvus.Status.reason")); + "milvus.grpc.Status.reason")); } else { goto handle_unusual; } @@ -313,10 +316,10 @@ bool Status::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:milvus.Status) + // @@protoc_insertion_point(parse_success:milvus.grpc.Status) return true; failure: - // @@protoc_insertion_point(parse_failure:milvus.Status) + // @@protoc_insertion_point(parse_failure:milvus.grpc.Status) return false; #undef DO_ } @@ -324,11 +327,11 @@ failure: void Status::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:milvus.Status) + // @@protoc_insertion_point(serialize_start:milvus.grpc.Status) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.ErrorCode error_code = 1; + // .milvus.grpc.ErrorCode error_code = 1; if (this->error_code() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 1, this->error_code(), output); @@ -339,7 +342,7 @@ void Status::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->reason().data(), static_cast(this->reason().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "milvus.Status.reason"); + "milvus.grpc.Status.reason"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->reason(), output); } @@ -348,16 +351,16 @@ void Status::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } - // @@protoc_insertion_point(serialize_end:milvus.Status) + // @@protoc_insertion_point(serialize_end:milvus.grpc.Status) } ::google::protobuf::uint8* Status::InternalSerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:milvus.Status) + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.Status) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .milvus.ErrorCode error_code = 1; + // .milvus.grpc.ErrorCode error_code = 1; if (this->error_code() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 1, this->error_code(), target); @@ -368,7 +371,7 @@ void Status::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->reason().data(), static_cast(this->reason().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "milvus.Status.reason"); + "milvus.grpc.Status.reason"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->reason(), target); @@ -378,12 +381,12 @@ void Status::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } - // @@protoc_insertion_point(serialize_to_array_end:milvus.Status) + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.Status) return target; } size_t Status::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:milvus.Status) +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.Status) size_t total_size = 0; if (_internal_metadata_.have_unknown_fields()) { @@ -402,7 +405,7 @@ size_t Status::ByteSizeLong() const { this->reason()); } - // .milvus.ErrorCode error_code = 1; + // .milvus.grpc.ErrorCode error_code = 1; if (this->error_code() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->error_code()); @@ -414,22 +417,22 @@ size_t Status::ByteSizeLong() const { } void Status::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:milvus.Status) +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.Status) GOOGLE_DCHECK_NE(&from, this); const Status* source = ::google::protobuf::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.Status) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.Status) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.Status) + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.Status) MergeFrom(*source); } } void Status::MergeFrom(const Status& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:milvus.Status) +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.Status) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -445,14 +448,14 @@ void Status::MergeFrom(const Status& from) { } void Status::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:milvus.Status) +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.Status) if (&from == this) return; Clear(); MergeFrom(from); } void Status::CopyFrom(const Status& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:milvus.Status) +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.Status) if (&from == this) return; Clear(); MergeFrom(from); @@ -481,11 +484,12 @@ void Status::InternalSwap(Status* other) { // @@protoc_insertion_point(namespace_scope) +} // namespace grpc } // namespace milvus namespace google { namespace protobuf { -template<> PROTOBUF_NOINLINE ::milvus::Status* Arena::CreateMaybeMessage< ::milvus::Status >(Arena* arena) { - return Arena::CreateInternal< ::milvus::Status >(arena); +template<> PROTOBUF_NOINLINE ::milvus::grpc::Status* Arena::CreateMaybeMessage< ::milvus::grpc::Status >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::Status >(arena); } } // namespace protobuf } // namespace google diff --git a/cpp/src/grpc/gen-status/status.pb.h b/cpp/src/grpc/gen-status/status.pb.h index 5ff3d740c4..ce6ddcd87c 100644 --- a/cpp/src/grpc/gen-status/status.pb.h +++ b/cpp/src/grpc/gen-status/status.pb.h @@ -50,16 +50,19 @@ struct TableStruct_status_2eproto { }; void AddDescriptors_status_2eproto(); namespace milvus { +namespace grpc { class Status; class StatusDefaultTypeInternal; extern StatusDefaultTypeInternal _Status_default_instance_; +} // namespace grpc } // namespace milvus namespace google { namespace protobuf { -template<> ::milvus::Status* Arena::CreateMaybeMessage<::milvus::Status>(Arena*); +template<> ::milvus::grpc::Status* Arena::CreateMaybeMessage<::milvus::grpc::Status>(Arena*); } // namespace protobuf } // namespace google namespace milvus { +namespace grpc { enum ErrorCode { SUCCESS = 0, @@ -105,7 +108,7 @@ inline bool ErrorCode_Parse( // =================================================================== class Status final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.Status) */ { + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.Status) */ { public: Status(); virtual ~Status(); @@ -213,13 +216,13 @@ class Status final : ::std::string* release_reason(); void set_allocated_reason(::std::string* reason); - // .milvus.ErrorCode error_code = 1; + // .milvus.grpc.ErrorCode error_code = 1; void clear_error_code(); static const int kErrorCodeFieldNumber = 1; - ::milvus::ErrorCode error_code() const; - void set_error_code(::milvus::ErrorCode value); + ::milvus::grpc::ErrorCode error_code() const; + void set_error_code(::milvus::grpc::ErrorCode value); - // @@protoc_insertion_point(class_scope:milvus.Status) + // @@protoc_insertion_point(class_scope:milvus.grpc.Status) private: class HasBitSetters; @@ -240,18 +243,18 @@ class Status final : #endif // __GNUC__ // Status -// .milvus.ErrorCode error_code = 1; +// .milvus.grpc.ErrorCode error_code = 1; inline void Status::clear_error_code() { error_code_ = 0; } -inline ::milvus::ErrorCode Status::error_code() const { - // @@protoc_insertion_point(field_get:milvus.Status.error_code) - return static_cast< ::milvus::ErrorCode >(error_code_); +inline ::milvus::grpc::ErrorCode Status::error_code() const { + // @@protoc_insertion_point(field_get:milvus.grpc.Status.error_code) + return static_cast< ::milvus::grpc::ErrorCode >(error_code_); } -inline void Status::set_error_code(::milvus::ErrorCode value) { +inline void Status::set_error_code(::milvus::grpc::ErrorCode value) { error_code_ = value; - // @@protoc_insertion_point(field_set:milvus.Status.error_code) + // @@protoc_insertion_point(field_set:milvus.grpc.Status.error_code) } // string reason = 2; @@ -259,41 +262,41 @@ inline void Status::clear_reason() { reason_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& Status::reason() const { - // @@protoc_insertion_point(field_get:milvus.Status.reason) + // @@protoc_insertion_point(field_get:milvus.grpc.Status.reason) return reason_.GetNoArena(); } inline void Status::set_reason(const ::std::string& value) { reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:milvus.Status.reason) + // @@protoc_insertion_point(field_set:milvus.grpc.Status.reason) } #if LANG_CXX11 inline void Status::set_reason(::std::string&& value) { reason_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:milvus.Status.reason) + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.Status.reason) } #endif inline void Status::set_reason(const char* value) { GOOGLE_DCHECK(value != nullptr); reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:milvus.Status.reason) + // @@protoc_insertion_point(field_set_char:milvus.grpc.Status.reason) } inline void Status::set_reason(const char* value, size_t size) { reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:milvus.Status.reason) + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.Status.reason) } inline ::std::string* Status::mutable_reason() { - // @@protoc_insertion_point(field_mutable:milvus.Status.reason) + // @@protoc_insertion_point(field_mutable:milvus.grpc.Status.reason) return reason_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* Status::release_reason() { - // @@protoc_insertion_point(field_release:milvus.Status.reason) + // @@protoc_insertion_point(field_release:milvus.grpc.Status.reason) return reason_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -304,7 +307,7 @@ inline void Status::set_allocated_reason(::std::string* reason) { } reason_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), reason); - // @@protoc_insertion_point(field_set_allocated:milvus.Status.reason) + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.Status.reason) } #ifdef __GNUC__ @@ -313,15 +316,16 @@ inline void Status::set_allocated_reason(::std::string* reason) { // @@protoc_insertion_point(namespace_scope) +} // namespace grpc } // namespace milvus namespace google { namespace protobuf { -template <> struct is_proto_enum< ::milvus::ErrorCode> : ::std::true_type {}; +template <> struct is_proto_enum< ::milvus::grpc::ErrorCode> : ::std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::milvus::ErrorCode>() { - return ::milvus::ErrorCode_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< ::milvus::grpc::ErrorCode>() { + return ::milvus::grpc::ErrorCode_descriptor(); } } // namespace protobuf diff --git a/cpp/src/grpc/milvus.proto b/cpp/src/grpc/milvus.proto index d81a286789..683b231d1d 100644 --- a/cpp/src/grpc/milvus.proto +++ b/cpp/src/grpc/milvus.proto @@ -8,7 +8,7 @@ package milvus.grpc; * @brief Table Name */ message TableName { - milvus.Status status = 1; + Status status = 1; string table_name = 2; } @@ -49,7 +49,7 @@ message InsertInfos { * @brief Vector ids */ message VectorIds { - milvus.Status status = 1; + Status status = 1; repeated int64 vector_id_array = 2; } @@ -83,7 +83,7 @@ message QueryResult { * @brief TopK query result */ message TopKQueryResult { - milvus.Status status = 1; + Status status = 1; repeated QueryResult query_result_arrays = 2; } @@ -91,7 +91,7 @@ message TopKQueryResult { * @brief Server String Reply */ message StringReply { - milvus.Status status = 1; + Status status = 1; string string_reply = 2; } @@ -99,7 +99,7 @@ message StringReply { * @brief Server bool Reply */ message BoolReply { - milvus.Status status = 1; + Status status = 1; bool bool_reply = 2; } @@ -107,7 +107,7 @@ message BoolReply { * @brief Return table row count */ message TableRowCount { - milvus.Status status = 1; + Status status = 1; int64 table_row_count = 2; } @@ -122,7 +122,7 @@ message Command { * @brief Give Server Command */ message ServerStatus{ - milvus.Status status = 1; + Status status = 1; string info = 2; } @@ -135,7 +135,7 @@ service MilvusService { * @param param, use to provide table information to be created. * */ - rpc CreateTable(TableSchema) returns (milvus.Status){} + rpc CreateTable(TableSchema) returns (Status){} /** * @brief Test table existence method @@ -155,7 +155,7 @@ service MilvusService { * @param table_name, table name is going to be deleted. * */ - rpc DropTable(TableName) returns (milvus.Status) {} + rpc DropTable(TableName) returns (Status) {} /** * @brief Build index by table method @@ -165,7 +165,7 @@ service MilvusService { * @param table_name, table is going to be built index. * */ - rpc BuildIndex(TableName) returns (milvus.Status) {} + rpc BuildIndex(TableName) returns (Status) {} /** * @brief Add vector array to table diff --git a/cpp/src/grpc/status.proto b/cpp/src/grpc/status.proto index 6502f841b9..4e8dc15b74 100644 --- a/cpp/src/grpc/status.proto +++ b/cpp/src/grpc/status.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package milvus; +package milvus.grpc; enum ErrorCode { SUCCESS = 0; diff --git a/cpp/src/grpcsdk/CMakeLists.txt b/cpp/src/grpcsdk/CMakeLists.txt deleted file mode 100644 index 2facdf28fa..0000000000 --- a/cpp/src/grpcsdk/CMakeLists.txt +++ /dev/null @@ -1,38 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved -# Unauthorized copying of this file, via any medium is strictly prohibited. -# Proprietary and confidential. -#------------------------------------------------------------------------------- - -aux_source_directory(src/interface interface_files) -aux_source_directory(src/client client_files) -aux_source_directory(src/util util_files) - -include_directories(src) -include_directories(include) -include_directories(/usr/include) -include_directories(${CMAKE_SOURCE_DIR}/src/grpc/gen-milvus) -include_directories(${CMAKE_SOURCE_DIR}/src/grpc/gen-status) -include_directories(/usr/local/include) - -set(service_files - ${CMAKE_SOURCE_DIR}/src/grpc/gen-milvus/milvus.grpc.pb.cc - ${CMAKE_SOURCE_DIR}/src/grpc/gen-milvus/milvus.pb.cc - ${CMAKE_SOURCE_DIR}/src/grpc/gen-status/status.grpc.pb.cc - ${CMAKE_SOURCE_DIR}/src/grpc/gen-status/status.pb.cc - ) - -add_library(milvus_grpc_sdk STATIC - ${interface_files} - ${client_files} - ${util_files} - ${service_files} - ) - -target_link_libraries(milvus_grpc_sdk - ${third_party_libs} - ) - -add_subdirectory(examples) - -install(TARGETS milvus_grpc_sdk DESTINATION lib) diff --git a/cpp/src/grpcsdk/include/MilvusApi.h b/cpp/src/grpcsdk/include/MilvusApi.h deleted file mode 100644 index 69db9b79b5..0000000000 --- a/cpp/src/grpcsdk/include/MilvusApi.h +++ /dev/null @@ -1,384 +0,0 @@ -#pragma onceinclude_directories(/usr/include) - - -#include "Status.h" - -#include -#include -#include -#include - -/** \brief Milvus SDK namespace -*/ -namespace zilliz { -namespace milvus { - -//enum Error_Code { -// SUCCESS = 0, -// UNEXPECTED_ERROR = 1, -// CONNECT_FAILED = 2, -// PERMISSION_DENIED = 3, -// TABLE_NOT_EXISTS = 4, -// ILLEGAL_ARGUMENT = 5, -// ILLEGAL_RANGE = 6, -// ILLEGAL_DIMENSION = 7, -// ILLEGAL_INDEX_TYPE = 8, -// ILLEGAL_TABLE_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, -//}; - -/** -* @brief Index Type -*/ - enum class IndexType { - invalid = 0, - cpu_idmap, - gpu_ivfflat, - gpu_ivfsq8, - }; - -/** -* @brief Connect API parameter -*/ - struct ConnectParam { - std::string ip_address; ///< Server IP address - std::string port; ///< Server PORT - }; - -/** -* @brief Status for return -*/ - struct StatusMsg { -// Error_Code errorCode; - std::string reason; - }; - -/** -* @brief Table Name -*/ - struct TableName { - StatusMsg status; - std::string table_name; - }; - -/** -* @brief Table Schema -*/ - struct TableSchema { - TableName table_name; ///< Table name - IndexType index_type = IndexType::invalid; ///< Index type - int64_t dimension = 0; ///< Vector dimension, must be a positive value - bool store_raw_vector = false; ///< Is vector raw data stored in the table - }; - -/** -* @brief Range information -* for DATE partition, the format is like: 'year-month-day' -*/ - struct Range { - std::string start_value; ///< Range start - std::string end_value; ///< Range stop - }; - -/** -* @brief Record inserted -*/ - struct RowRecord { - std::vector data; ///< Vector raw data - }; - - -//struct InsertInfos { -// std::string table_name; -// std::vector row_record_array; -//}; - -/** -* @brief Vector ids for return -*/ - struct VectorIds { - StatusMsg status; - std::vector vector_id_array; - }; - -/** -* @brief Infos for searching vector -*/ - struct SearchVectorInfos { - std::string table_name; - std::vector query_record_array; - std::vector query_range_array; - int64_t topk; - }; - -/** -* @brief Infos for searching vector in files -*/ - struct SearchVectorInFilesInfos { - std::vector file_id_array; - SearchVectorInfos search_vector_infos; - }; - -/** -* @brief Query result -*/ - struct QueryResult { - int64_t id; ///< Output result - double distance; ///< Vector similarity distance - }; - -/** -* @brief TopK query result -*/ - struct TopKQueryResult { - StatusMsg status; - std::vector query_result_arrays; ///< TopK query result - }; - -/** -* @brief Server bool Reply -*/ - struct BoolReply { - StatusMsg status; - bool bool_reply; - }; - -/** -* @brief Return table row count -*/ - struct TableRowCount { - StatusMsg status; - int64_t table_row_count; - }; - -/** -* @brief SDK main class -*/ - class Connection { - public: - - /** - * @brief CreateConnection - * - * Create a connection instance and return it's shared pointer - * - * @return Connection instance pointer - */ - - static std::shared_ptr - Create(); - - /** - * @brief DestroyConnection - * - * Destroy the connection instance - * - * @param connection, the shared pointer to the instance to be destroyed - * - * @return if destroy is successful - */ - - static Status - Destroy(std::shared_ptr connection_ptr); - - /** - * @brief Connect - * - * Connect function should be called before any operations - * Server will be connected after Connect return OK - * - * @param param, use to provide server information - * - * @return Indicate if connect is successful - */ - - virtual Status Connect(const ConnectParam ¶m) = 0; - - /** - * @brief Connect - * - * Connect function should be called before any operations - * Server will be connected after Connect return OK - * - * @param uri, use to provide server information, example: milvus://ipaddress:port - * - * @return Indicate if connect is successful - */ - virtual Status Connect(const std::string &uri) = 0; - - /** - * @brief connected - * - * Connection status. - * - * @return Indicate if connection status - */ - virtual Status Connected() const = 0; - - /** - * @brief Disconnect - * - * Server will be disconnected after Disconnect return OK - * - * @return Indicate if disconnect is successful - */ - virtual Status Disconnect() = 0; - - - /** - * @brief Create table method - * - * This method is used to create table - * - * @param param, use to provide table information to be created. - * - * @return Indicate if table is created successfully - */ - virtual Status CreateTable(const TableSchema ¶m) = 0; - - - /** - * @brief Test table existence method - * - * This method is used to create table - * - * @param table_name, table name is going to be tested. - * - * @return Indicate if table is cexist - */ - virtual bool HasTable(const std::string &table_name) = 0; - - - /** - * @brief Drop table method - * - * This method is used to drop table. - * - * @param table_name, table name is going to be dropped. - * - * @return Indicate if table is drop successfully. - */ - virtual Status DropTable(const std::string &table_name) = 0; - - - /** - * @brief Build index method - * - * This method is used to build index for whole table - * - * @param table_name, table name is going to be build index. - * - * @return Indicate if build index successfully. - */ - virtual Status BuildIndex(const std::string &table_name) = 0; - - /** - * @brief Add vector to table - * - * This method is used to add vector array to table. - * - * @param table_name, table_name is inserted. - * @param record_array, vector array is inserted. - * @param id_array, after inserted every vector is given a id. - * - * @return Indicate if vector array are inserted successfully - */ - virtual Status InsertVector(const std::string &table_name, - const std::vector &record_array, - std::vector &id_array) = 0; - - - /** - * @brief Search vector - * - * This method is used to query vector in table. - * - * @param table_name, table_name is queried. - * @param query_record_array, all vector are going to be queried. - * @param query_range_array, time ranges, if not specified, will search in whole table - * @param topk, how many similarity vectors will be searched. - * @param topk_query_result_array, result array. - * - * @return Indicate if query is successful. - */ - virtual Status SearchVector(const std::string &table_name, - const std::vector &query_record_array, - const std::vector &query_range_array, - int64_t topk, - std::vector &topk_query_result_array) = 0; - - /** - * @brief Show table description - * - * This method is used to show table information. - * - * @param table_name, which table is show. - * @param table_schema, table_schema is given when operation is successful. - * - * @return Indicate if this operation is successful. - */ - virtual Status DescribeTable(const std::string &table_name, TableSchema &table_schema) = 0; - - /** - * @brief Get table row count - * - * This method is used to get table row count. - * - * @param table_name, table's name. - * @param row_count, table total row count. - * - * @return Indicate if this operation is successful. - */ - virtual Status GetTableRowCount(const std::string &table_name, int64_t &row_count) = 0; - - /** - * @brief Show all tables in database - * - * This method is used to list all tables. - * - * @param table_array, all tables are push into the array. - * - * @return Indicate if this operation is successful. - */ - virtual Status ShowTables(std::vector &table_array) = 0; - - /** - * @brief Give the client version - * - * This method is used to give the client version. - * - * @return Client version. - */ - virtual std::string ClientVersion() const = 0; - - /** - * @brief Give the server version - * - * This method is used to give the server version. - * - * @return Server version. - */ - virtual std::string ServerVersion() const = 0; - - /** - * @brief Give the server status - * - * This method is used to give the server status. - * - * @return Server status. - */ - virtual std::string ServerStatus() const = 0; - }; - -} -} \ No newline at end of file diff --git a/cpp/src/grpcsdk/include/Status.h b/cpp/src/grpcsdk/include/Status.h deleted file mode 100644 index df94373491..0000000000 --- a/cpp/src/grpcsdk/include/Status.h +++ /dev/null @@ -1,330 +0,0 @@ -#pragma once - -#include -#include - -/** \brief Milvus SDK namespace -*/ -namespace zilliz { -namespace milvus { - -/** -* @brief Status Code for SDK interface return -*/ -enum class StatusCode { -OK = 0, -// system error section - UnknownError = 1, -NotSupported, -NotConnected, - -// function error section - InvalidAgument = 1000, -}; - -/** -* @brief Status for SDK interface return -*/ -class Status { -public: -/** - * @brief Status - * - * Default constructor. - * - */ -Status() = default; - -/** - * @brief Status - * - * Destructor. - * - */ -~Status() noexcept; - -/** - * @brief Status - * - * Constructor - * - * @param code, status code. - * @param message, status message. - * - */ -Status(StatusCode code, const std::string &message); - -/** - * @brief Status - * - * Copy constructor - * - * @param status, status to be copied. - * - */ -inline Status(const Status &status); - -/** - * @brief Status - * - * Assignment operator - * - * @param status, status to be copied. - * @return, the status is assigned. - * - */ -Status &operator=(const Status &s); - -/** - * @brief Status - * - * Move constructor - * - * @param status, status to be moved. - * - */ -inline Status(Status &&s) noexcept : state_(s.state_) {}; - -/** - * @brief Status - * - * Move assignment operator - * - * @param status, status to be moved. - * @return, the status is moved. - * - */ -Status &operator=(Status &&s) noexcept; - -/** - * @brief Status - * - * AND operator - * - * @param status, status to be AND. - * @return, the status after AND operation. - * - */ -inline Status operator&(const Status &s) const noexcept; - -/** - * @brief Status - * - * AND operator - * - * @param status, status to be AND. - * @return, the status after AND operation. - * - */ -inline Status operator&(Status &&s) const noexcept; - -/** - * @brief Status - * - * AND operator - * - * @param status, status to be AND. - * @return, the status after AND operation. - * - */ -inline Status &operator&=(const Status &s) noexcept; - -/** - * @brief Status - * - * AND operator - * - * @param status, status to be AND. - * @return, the status after AND operation. - * - */ -inline Status &operator&=(Status &&s) noexcept; - -/** - * @brief OK - * - * static OK status constructor - * - * @return, the status with OK. - * - */ -static Status OK() { return Status(); } - -/** - * @brief OK - * - * static OK status constructor with a specific message - * - * @param, serveral specific messages - * @return, the status with OK. - * - */ -template -static Status OK(Args &&... args) { - return Status(StatusCode::OK, MessageBuilder(std::forward(args)...)); -} - -/** - * @brief Invalid - * - * static Invalid status constructor with a specific message - * - * @param, serveral specific messages - * @return, the status with Invalid. - * - */ -template -static Status Invalid(Args &&... args) { - return Status(StatusCode::InvalidAgument, - MessageBuilder(std::forward(args)...)); -} - -/** - * @brief Unknown Error - * - * static unknown error status constructor with a specific message - * - * @param, serveral specific messages - * @return, the status with unknown error. - * - */ -template -static Status UnknownError(Args &&... args) { - return Status(StatusCode::UnknownError, MessageBuilder(std::forward(args)...)); -} - -/** - * @brief not supported Error - * - * static not supported status constructor with a specific message - * - * @param, serveral specific messages - * @return, the status with not supported error. - * - */ -template -static Status NotSupported(Args &&... args) { - return Status(StatusCode::NotSupported, MessageBuilder(std::forward(args)...)); -} - -/** - * @brief ok - * - * Return true iff the status indicates success. - * - * @return, if the status indicates success. - * - */ -bool ok() const { return (state_ == nullptr); } - -/** - * @brief IsInvalid - * - * Return true iff the status indicates invalid. - * - * @return, if the status indicates invalid. - * - */ -bool IsInvalid() const { return code() == StatusCode::InvalidAgument; } - -/** - * @brief IsUnknownError - * - * Return true iff the status indicates unknown error. - * - * @return, if the status indicates unknown error. - * - */ -bool IsUnknownError() const { return code() == StatusCode::UnknownError; } - -/** - * @brief IsNotSupported - * - * Return true iff the status indicates not supported. - * - * @return, if the status indicates not supported. - * - */ -bool IsNotSupported() const { return code() == StatusCode::NotSupported; } - -/** - * @brief ToString - * - * Return error message string. - * - * @return, error message string. - * - */ -std::string ToString() const; - -/** - * @brief CodeAsString - * - * Return a string representation of the status code. - * - * @return, a string representation of the status code. - * - */ -std::string CodeAsString() const; - -/** - * @brief code - * - * Return the StatusCode value attached to this status. - * - * @return, the status code value attached to this status. - * - */ -StatusCode code() const { return ok() ? StatusCode::OK : state_->code; } - -/** - * @brief message - * - * Return the specific error message attached to this status. - * - * @return, the specific error message attached to this status. - * - */ -std::string message() const { return ok() ? "" : state_->message; } - -private: -struct State { - StatusCode code; - std::string message; -}; - -// OK status has a `nullptr` state_. Otherwise, `state_` points to -// a `State` structure containing the error code and message. -State *state_ = nullptr; - -void DeleteState() { - delete state_; - state_ = nullptr; -} - -void CopyFrom(const Status &s); - -inline void MoveFrom(Status &s); - -template -static void MessageBuilderRecursive(std::stringstream &stream, Head &&head) { - stream << head; -} - -template -static void MessageBuilderRecursive(std::stringstream &stream, Head &&head, Tail &&... tail) { - MessageBuilderRecursive(stream, std::forward(head)); - MessageBuilderRecursive(stream, std::forward(tail)...); -} - -template -static std::string MessageBuilder(Args &&... args) { - std::stringstream stream; - - MessageBuilderRecursive(stream, std::forward(args)...); - - return stream.str(); -} -}; -} -} \ No newline at end of file diff --git a/cpp/src/grpcsdk/src/client/ClientProxy.h b/cpp/src/grpcsdk/src/client/ClientProxy.h deleted file mode 100644 index 7b1d24248b..0000000000 --- a/cpp/src/grpcsdk/src/client/ClientProxy.h +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* -* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved -* Unauthorized copying of this file, via any medium is strictly prohibited. -* Proprietary and confidential. -******************************************************************************/ -#pragma once - -#include "MilvusApi.h" -#include "grpcClient.h" - -namespace zilliz { -namespace milvus { - -class ClientProxy : public Connection { -public: - // Implementations of the Connection interface - virtual Status Connect(const ConnectParam ¶m) override; - - virtual Status Connect(const std::string &uri) override; - - virtual Status Connected() const override; - - virtual Status Disconnect() override; - - virtual Status CreateTable(const TableSchema ¶m) override; - - virtual bool HasTable(const std::string &table_name) override; - - virtual Status DropTable(const std::string &table_name) override; - - virtual Status BuildIndex(const std::string &table_name) override; - - virtual Status InsertVector(const std::string &table_name, - const std::vector &record_array, - std::vector &id_array) override; - - virtual Status SearchVector(const std::string &table_name, - const std::vector &query_record_array, - const std::vector &query_range_array, - int64_t topk, - std::vector &topk_query_result_array) override; - - virtual Status DescribeTable(const std::string &table_name, TableSchema &table_schema) override; - - virtual Status GetTableRowCount(const std::string &table_name, int64_t &row_count) override; - - virtual Status ShowTables(std::vector &table_array) override; - - virtual std::string ClientVersion() const override; - - virtual std::string ServerVersion() const override; - - virtual std::string ServerStatus() const override; - -private: - - std::shared_ptr<::grpc::Channel> channel_; - -private: - grpcClient *client_ptr; -// std::shared_ptr client_ptr; - bool connected_ = false; -}; - -} -} diff --git a/cpp/src/grpcsdk/src/client/grpcClient.h b/cpp/src/grpcsdk/src/client/grpcClient.h deleted file mode 100644 index 738c6d0a02..0000000000 --- a/cpp/src/grpcsdk/src/client/grpcClient.h +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* -* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved -* Unauthorized copying of this file, via any medium is strictly prohibited. -* Proprietary and confidential. -******************************************************************************/ -#pragma once -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "Status.h" -#include "milvus.grpc.pb.h" -#include "status.grpc.pb.h" - -#include - -namespace zilliz { -namespace milvus { -class grpcClient { -public: - grpcClient(std::shared_ptr<::grpc::Channel> channel); - - virtual ~grpcClient(); - - void CreateTable(const ::milvus::grpc::TableSchema table_schema); - - bool HasTable(const ::milvus::grpc::TableName table_name); - - void DropTable(const ::milvus::grpc::TableName table_name); - - void BuildIndex(const ::milvus::grpc::TableName table_name); - - void InsertVector(::milvus::grpc::VectorIds& vector_ids, const ::milvus::grpc::InsertInfos insert_infos); - - void SearchVector(std::vector<::milvus::grpc::TopKQueryResult>& result_array, - const ::milvus::grpc::SearchVectorInfos search_vector_infos); - - void DescribeTable(::milvus::grpc::TableSchema& grpc_schema, const std::string table_name); - - int64_t GetTableRowCount(const std::string table_name); - - void ShowTables(std::vector &table_array); - - void Ping(std::string &result, const std::string cmd); - - void Disconnect(); - -private: - std::unique_ptr<::milvus::grpc::MilvusService::Stub> stub_; -}; - -} -} \ No newline at end of file diff --git a/cpp/src/grpcsdk/src/util/Exception.h b/cpp/src/grpcsdk/src/util/Exception.h deleted file mode 100644 index bb7fc09241..0000000000 --- a/cpp/src/grpcsdk/src/util/Exception.h +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* -* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved -* Unauthorized copying of this file, via any medium is strictly prohibited. -* Proprietary and confidential. -******************************************************************************/ -#pragma once - -#include "Status.h" - -#include - -namespace zilliz { -namespace milvus { -class Exception : public std::exception { -public: - Exception(StatusCode error_code, - const std::string &message = std::string()) - : error_code_(error_code), message_(message) {} - -public: - StatusCode error_code() const { - return error_code_; - } - - virtual const char *what() const noexcept { - return message_.c_str(); - } - -private: - StatusCode error_code_; - std::string message_; -}; -} -} \ No newline at end of file diff --git a/cpp/src/grpcserver/DBWrapper.cpp b/cpp/src/grpcserver/DBWrapper.cpp deleted file mode 100644 index 6c67176571..0000000000 --- a/cpp/src/grpcserver/DBWrapper.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved - * Unauthorized copying of this file, via any medium is strictly prohibited. - * Proprietary and confidential. - ******************************************************************************/ - -#include "DBWrapper.h" -#include "ServerConfig.h" -#include "utils/CommonUtil.h" -#include "utils/Log.h" -#include "utils/StringHelpFunctions.h" - -namespace zilliz { -namespace milvus { -namespace server { - -DBWrapper::DBWrapper() { - zilliz::milvus::engine::Options opt; - ConfigNode& config = ServerConfig::GetInstance().GetConfig(CONFIG_DB); - opt.meta.backend_uri = config.GetValue(CONFIG_DB_URL); - std::string db_path = config.GetValue(CONFIG_DB_PATH); - opt.meta.path = db_path + "/db"; - - std::string db_slave_path = config.GetValue(CONFIG_DB_SLAVE_PATH); - StringHelpFunctions::SplitStringByDelimeter(db_slave_path, ";", opt.meta.slave_paths); - - int64_t index_size = config.GetInt64Value(CONFIG_DB_INDEX_TRIGGER_SIZE); - if(index_size > 0) {//ensure larger than zero, unit is MB - opt.index_trigger_size = (size_t)index_size * engine::ONE_MB; - } - int64_t insert_buffer_size = config.GetInt64Value(CONFIG_DB_INSERT_BUFFER_SIZE, 4); - if (insert_buffer_size >= 1) { - opt.insert_buffer_size = insert_buffer_size * engine::ONE_GB; - } - else { - std::cout << "ERROR: insert_buffer_size should be at least 1 GB" << std::endl; - kill(0, SIGUSR1); - } - - ConfigNode& serverConfig = ServerConfig::GetInstance().GetConfig(CONFIG_SERVER); - std::string mode = serverConfig.GetValue(CONFIG_CLUSTER_MODE, "single"); - if (mode == "single") { - opt.mode = zilliz::milvus::engine::Options::MODE::SINGLE; - } - else if (mode == "cluster") { - opt.mode = zilliz::milvus::engine::Options::MODE::CLUSTER; - } - else if (mode == "read_only") { - opt.mode = zilliz::milvus::engine::Options::MODE::READ_ONLY; - } - else { - std::cout << "ERROR: mode specified in server_config is not one of ['single', 'cluster', 'read_only']" << std::endl; - kill(0, SIGUSR1); - } - - //set archive config - engine::ArchiveConf::CriteriaT criterial; - int64_t disk = config.GetInt64Value(CONFIG_DB_ARCHIVE_DISK, 0); - int64_t days = config.GetInt64Value(CONFIG_DB_ARCHIVE_DAYS, 0); - if(disk > 0) { - criterial[engine::ARCHIVE_CONF_DISK] = disk; - } - if(days > 0) { - criterial[engine::ARCHIVE_CONF_DAYS] = days; - } - opt.meta.archive_conf.SetCriterias(criterial); - - //create db root folder - ServerError err = CommonUtil::CreateDirectory(opt.meta.path); - if(err != SERVER_SUCCESS) { - std::cout << "ERROR! Failed to create database root path: " << opt.meta.path << std::endl; - kill(0, SIGUSR1); - } - - for(auto& path : opt.meta.slave_paths) { - err = CommonUtil::CreateDirectory(path); - if(err != SERVER_SUCCESS) { - std::cout << "ERROR! Failed to create database slave path: " << path << std::endl; - kill(0, SIGUSR1); - } - } - - std::string msg = opt.meta.path; - try { - zilliz::milvus::engine::DB::Open(opt, &db_); - } catch(std::exception& ex) { - msg = ex.what(); - } - - if(db_ == nullptr) { - std::cout << "ERROR! Failed to open database: " << msg << std::endl; - kill(0, SIGUSR1); - } -} - -DBWrapper::~DBWrapper() { - delete db_; -} - -} -} -} \ No newline at end of file diff --git a/cpp/src/grpcserver/DBWrapper.h b/cpp/src/grpcserver/DBWrapper.h deleted file mode 100644 index 5bd09bd0f4..0000000000 --- a/cpp/src/grpcserver/DBWrapper.h +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved - * Unauthorized copying of this file, via any medium is strictly prohibited. - * Proprietary and confidential. - ******************************************************************************/ -#pragma once - -#include "db/DB.h" -#include "db/Meta.h" - -namespace zilliz { -namespace milvus { -namespace server { - -class DBWrapper { -private: - DBWrapper(); - ~DBWrapper(); - -public: - static zilliz::milvus::engine::DB* DB() { - static DBWrapper db_wrapper; - return db_wrapper.db(); - } - - zilliz::milvus::engine::DB* db() { return db_; } - -private: - zilliz::milvus::engine::DB* db_ = nullptr; -}; - -} -} -} diff --git a/cpp/src/grpcserver/Server.cpp b/cpp/src/grpcserver/Server.cpp deleted file mode 100644 index 0e02d555bd..0000000000 --- a/cpp/src/grpcserver/Server.cpp +++ /dev/null @@ -1,245 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved -// Unauthorized copying of this file, via any medium is strictly prohibited. -// Proprietary and confidential. -//////////////////////////////////////////////////////////////////////////////// -#include "Server.h" -//#include "ServerConfig.h" -#include "MilvusServer.h" -#include "utils/Log.h" -#include "utils/SignalUtil.h" -#include "utils/TimeRecorder.h" -#include "license/LicenseCheck.h" -#include "metrics/Metrics.h" - -#include -#include -#include -#include -//#include -#include -#include - -#include "metrics/Metrics.h" - -namespace zilliz { -namespace milvus { -namespace server { - -Server* -Server::Instance() { - static Server server; - return &server; -} - -Server::Server() { - -} -Server::~Server() { - -} - -void -Server::Init(int64_t daemonized, const std::string& pid_filename, const std::string& config_filename) { - daemonized_ = daemonized; - pid_filename_ = pid_filename; - config_filename_ = config_filename; -} - -void -Server::Daemonize() { - if (daemonized_ == 0) { - return; - } - - SERVER_LOG_INFO << "Milvus server run in daemonize mode"; - -// std::string log_path(GetLogDirFullPath()); -// log_path += "zdb_server.(INFO/WARNNING/ERROR/CRITICAL)"; -// SERVER_LOG_INFO << "Log will be exported to: " + log_path); - - pid_t pid = 0; - - // Fork off the parent process - pid = fork(); - - // An error occurred - if (pid < 0) { - exit(EXIT_FAILURE); - } - - // Success: terminate parent - if (pid > 0) { - exit(EXIT_SUCCESS); - } - - // On success: The child process becomes session leader - if (setsid() < 0) { - exit(EXIT_FAILURE); - } - - // Ignore signal sent from child to parent process - signal(SIGCHLD, SIG_IGN); - - // Fork off for the second time - pid = fork(); - - // An error occurred - if (pid < 0) { - exit(EXIT_FAILURE); - } - - // Terminate the parent - if (pid > 0) { - exit(EXIT_SUCCESS); - } - - // Set new file permissions - umask(0); - - // Change the working directory to root - int ret = chdir("/"); - if(ret != 0){ - return; - } - - // Close all open fd - for (long fd = sysconf(_SC_OPEN_MAX); fd > 0; fd--) { - close(fd); - } - - SERVER_LOG_INFO << "Redirect stdin/stdout/stderr to /dev/null"; - - // Redirect stdin/stdout/stderr to /dev/null - stdin = fopen("/dev/null", "r"); - stdout = fopen("/dev/null", "w+"); - stderr = fopen("/dev/null", "w+"); - // Try to write PID of daemon to lockfile - if (!pid_filename_.empty()) { - pid_fd = open(pid_filename_.c_str(), O_RDWR | O_CREAT, 0640); - if (pid_fd < 0) { - SERVER_LOG_INFO << "Can't open filename: " + pid_filename_ + ", Error: " + strerror(errno); - exit(EXIT_FAILURE); - } - if (lockf(pid_fd, F_TLOCK, 0) < 0) { - SERVER_LOG_INFO << "Can't lock filename: " + pid_filename_ + ", Error: " + strerror(errno); - exit(EXIT_FAILURE); - } - - std::string pid_file_context = std::to_string(getpid()); - ssize_t res = write(pid_fd, pid_file_context.c_str(), pid_file_context.size()); - if(res != 0){ - return; - } - } -} - -int -Server::Start() { - - if (daemonized_) { - Daemonize(); - } - - do { - try { - // Read config file - if(LoadConfig() != SERVER_SUCCESS) { - return 1; - } - - //log path is defined by LoadConfig, so InitLog must be called after LoadConfig - ServerConfig &config = ServerConfig::GetInstance(); - ConfigNode server_config = config.GetConfig(CONFIG_SERVER); - -#ifdef ENABLE_LICENSE - ConfigNode license_config = config.GetConfig(CONFIG_LICENSE); - std::string license_file_path = license_config.GetValue(CONFIG_LICENSE_PATH); - SERVER_LOG_INFO << "License path: " << license_file_path; - - if(server::LicenseCheck::LegalityCheck(license_file_path) != SERVER_SUCCESS) { - SERVER_LOG_ERROR << "License check failed"; - exit(1); - } - - server::LicenseCheck::GetInstance().StartCountingDown(license_file_path); -#endif - - // Handle Signal - signal(SIGINT, SignalUtil::HandleSignal); - signal(SIGHUP, SignalUtil::HandleSignal); - signal(SIGTERM, SignalUtil::HandleSignal); - server::Metrics::GetInstance().Init(); - server::SystemInfo::GetInstance().Init(); - std::cout << "Milvus server start successfully." << std::endl; - StartService(); - - } catch(std::exception& ex){ - SERVER_LOG_ERROR << "Milvus server encounter exception: " << std::string(ex.what()) - << "Is another server instance running?"; - break; - } - } while(false); - - Stop(); - return 0; -} - -void -Server::Stop() { - std::cout << "Milvus server is going to shutdown ..." << std::endl; - - // Unlock and close lockfile - if (pid_fd != -1) { - int ret = lockf(pid_fd, F_ULOCK, 0); - if(ret != 0){ - std::cout << "Can't lock file: " << strerror(errno) << std::endl; - exit(0); - } - ret = close(pid_fd); - if(ret != 0){ - std::cout << "Can't close file: " << strerror(errno) << std::endl; - exit(0); - } - } - - // Try to delete lockfile - if (!pid_filename_.empty()) { - int ret = unlink(pid_filename_.c_str()); - if(ret != 0){ - std::cout << "Can't unlink file: " << strerror(errno) << std::endl; - exit(0); - } - } - - running_ = 0; - - StopService(); - -#ifdef ENABLE_LICENSE - server::LicenseCheck::GetInstance().StopCountingDown(); -#endif - std::cout << "Milvus server is closed!" << std::endl; -} - - -ServerError -Server::LoadConfig() { - ServerConfig::GetInstance().LoadConfigFile(config_filename_); - - return SERVER_SUCCESS; -} - -void -Server::StartService() { - MilvusServer::StartService(); -} - -void -Server::StopService() { - MilvusServer::StopService(); -} - -} -} -} diff --git a/cpp/src/grpcserver/Server.h b/cpp/src/grpcserver/Server.h deleted file mode 100644 index 58e676f7ff..0000000000 --- a/cpp/src/grpcserver/Server.h +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved - * Unauthorized copying of this file, via any medium is strictly prohibited. - * Proprietary and confidential. - ******************************************************************************/ -#pragma once - -#include "utils/Error.h" - -#include -#include - -namespace zilliz { -namespace milvus { -namespace server { - -class Server { - public: - static Server* Instance(); - - void Init(int64_t daemonized, const std::string& pid_filename, const std::string& config_filename); - int Start(); - void Stop(); - - private: - Server(); - ~Server(); - - void Daemonize(); - - static void HandleSignal(int signal); - ServerError LoadConfig(); - - void StartService(); - void StopService(); - - private: - int64_t daemonized_ = 0; - int64_t running_ = 1; - int pid_fd = -1; - std::string pid_filename_; - std::string config_filename_; -}; // Server - -} // server -} // sql -} // zilliz diff --git a/cpp/src/grpcserver/ServerConfig.cpp b/cpp/src/grpcserver/ServerConfig.cpp deleted file mode 100644 index 736a249e25..0000000000 --- a/cpp/src/grpcserver/ServerConfig.cpp +++ /dev/null @@ -1,82 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved -// Unauthorized copying of this file, via any medium is strictly prohibited. -// Proprietary and confidential. -//////////////////////////////////////////////////////////////////////////////// -#include "ServerConfig.h" - -#include -#include -#include -#include -#include - -#include "config/IConfigMgr.h" - -namespace zilliz { -namespace milvus { -namespace server { - -ServerConfig& -ServerConfig::GetInstance() { - static ServerConfig config; - return config; -} - -ServerError -ServerConfig::LoadConfigFile(const std::string& config_filename) { - std::string filename = config_filename; - if(filename.empty()){ - std::cout << "ERROR: a config file is required" << std::endl; - exit(1);//directly exit program if config file not specified - } - struct stat directoryStat; - int statOK = stat(filename.c_str(), &directoryStat); - if (statOK != 0) { - std::cout << "ERROR: " << filename << " not found!" << std::endl; - exit(1);//directly exit program if config file not found - } - - try { - IConfigMgr* mgr = const_cast(IConfigMgr::GetInstance()); - ServerError err = mgr->LoadConfigFile(filename); - if(err != 0) { - std::cout << "Server failed to load config file" << std::endl; - exit(1);//directly exit program if the config file is illegal - } - } - catch (YAML::Exception& e) { - std::cout << "Server failed to load config file: " << std::endl; - return SERVER_UNEXPECTED_ERROR; - } - - return SERVER_SUCCESS; -} - -void -ServerConfig::PrintAll() const { - if(const IConfigMgr* mgr = IConfigMgr::GetInstance()) { - std::string str = mgr->DumpString(); -// SERVER_LOG_INFO << "\n" << str; - std::cout << "\n" << str << std::endl; - } -} - -ConfigNode -ServerConfig::GetConfig(const std::string& name) const { - const IConfigMgr* mgr = IConfigMgr::GetInstance(); - const ConfigNode& root_node = mgr->GetRootNode(); - return root_node.GetChild(name); -} - -ConfigNode& -ServerConfig::GetConfig(const std::string& name) { - IConfigMgr* mgr = IConfigMgr::GetInstance(); - ConfigNode& root_node = mgr->GetRootNode(); - return root_node.GetChild(name); -} - - -} -} -} diff --git a/cpp/src/grpcserver/ServerConfig.h b/cpp/src/grpcserver/ServerConfig.h deleted file mode 100644 index bc202adcf6..0000000000 --- a/cpp/src/grpcserver/ServerConfig.h +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved - * Unauthorized copying of this file, via any medium is strictly prohibited. - * Proprietary and confidential. - ******************************************************************************/ -#pragma once - -#include "utils/Error.h" -#include "config/ConfigNode.h" - -#include "yaml-cpp/yaml.h" - -namespace zilliz { -namespace milvus { -namespace server { - -static const std::string CONFIG_SERVER = "server_config"; -static const std::string CONFIG_SERVER_ADDRESS = "address"; -static const std::string CONFIG_SERVER_PORT = "port"; -static const std::string CONFIG_SERVER_PROTOCOL = "transfer_protocol"; -static const std::string CONFIG_CLUSTER_MODE = "mode"; - -static const std::string CONFIG_DB = "db_config"; -static const std::string CONFIG_DB_URL = "db_backend_url"; -static const std::string CONFIG_DB_PATH = "db_path"; -static const std::string CONFIG_DB_SLAVE_PATH = "db_slave_path"; -static const std::string CONFIG_DB_INDEX_TRIGGER_SIZE = "index_building_threshold"; -static const std::string CONFIG_DB_ARCHIVE_DISK = "archive_disk_threshold"; -static const std::string CONFIG_DB_ARCHIVE_DAYS = "archive_days_threshold"; -static const std::string CONFIG_DB_INSERT_BUFFER_SIZE = "insert_buffer_size"; - -static const std::string CONFIG_LOG = "log_config"; - -static const std::string CONFIG_CACHE = "cache_config"; -static const std::string CONFIG_CPU_CACHE_CAPACITY = "cpu_cache_capacity"; -static const std::string CONFIG_GPU_CACHE_CAPACITY = "gpu_cache_capacity"; - -static const std::string CONFIG_LICENSE = "license_config"; -static const std::string CONFIG_LICENSE_PATH = "license_path"; - -static const std::string CONFIG_METRIC = "metric_config"; -static const std::string CONFIG_METRIC_IS_STARTUP = "is_startup"; -static const std::string CONFIG_METRIC_COLLECTOR = "collector"; -static const std::string CONFIG_PROMETHEUS = "prometheus_config"; -static const std::string CONFIG_METRIC_PROMETHEUS_PORT = "port"; - -static const std::string CONFIG_ENGINE = "engine_config"; -static const std::string CONFIG_NPROBE = "nprobe"; -static const std::string CONFIG_NLIST = "nlist"; -static const std::string CONFIG_DCBT = "use_blas_threshold"; -static const std::string CONFIG_METRICTYPE = "metric_type"; - -class ServerConfig { - public: - static ServerConfig &GetInstance(); - - ServerError LoadConfigFile(const std::string& config_filename); - void PrintAll() const; - - ConfigNode GetConfig(const std::string& name) const; - ConfigNode& GetConfig(const std::string& name); -}; - -} -} -} - diff --git a/cpp/src/main.cpp b/cpp/src/main.cpp index aaff603f09..ec536c2ee2 100644 --- a/cpp/src/main.cpp +++ b/cpp/src/main.cpp @@ -3,8 +3,7 @@ // Unauthorized copying of this file, via any medium is strictly prohibited. // Proprietary and confidential. //////////////////////////////////////////////////////////////////////////////// -//#include "server/Server.h" -#include "grpcserver/Server.h" +#include "server/Server.h" #include "version.h" #include diff --git a/cpp/src/sdk/CMakeLists.txt b/cpp/src/sdk/CMakeLists.txt index b51c2d5e09..09930934a1 100644 --- a/cpp/src/sdk/CMakeLists.txt +++ b/cpp/src/sdk/CMakeLists.txt @@ -4,32 +4,65 @@ # Proprietary and confidential. #------------------------------------------------------------------------------- -aux_source_directory(src/interface interface_files) -aux_source_directory(src/client client_files) -aux_source_directory(src/util util_files) +aux_source_directory(interface interface_files) + +aux_source_directory(util util_files) -include_directories(src) -include_directories(include) include_directories(/usr/include) -include_directories(${CMAKE_SOURCE_DIR}/src/thrift/gen-cpp) +include_directories(include) +include_directories(/usr/local/include) -set(service_files - ${CMAKE_SOURCE_DIR}/src/thrift/gen-cpp/MilvusService.cpp - ${CMAKE_SOURCE_DIR}/src/thrift/gen-cpp/milvus_constants.cpp - ${CMAKE_SOURCE_DIR}/src/thrift/gen-cpp/milvus_types.cpp - ) +if (MILVUS_ENABLE_THRIFT STREQUAL "ON") + aux_source_directory(thrift thrift_client_files) + include_directories(thrift) + include_directories(${CMAKE_SOURCE_DIR}/src/thrift/gen-cpp) -add_library(milvus_sdk STATIC - ${interface_files} - ${client_files} - ${util_files} - ${service_files} - ) + set(thrift_service_files + ${CMAKE_SOURCE_DIR}/src/thrift/gen-cpp/MilvusService.cpp + ${CMAKE_SOURCE_DIR}/src/thrift/gen-cpp/milvus_constants.cpp + ${CMAKE_SOURCE_DIR}/src/thrift/gen-cpp/milvus_types.cpp + ) -target_link_libraries(milvus_sdk - ${third_party_libs} - ) + add_library(milvus_thrift_sdk STATIC + ${interface_files} + ${thrift_client_files} + ${util_files} + ${thrift_service_files} + ) + + target_link_libraries(milvus_thrift_sdk + ${third_party_libs} + ) +else() + aux_source_directory(grpc grpc_client_files) + + include_directories(${CMAKE_SOURCE_DIR}/src/grpc/gen-milvus) + include_directories(${CMAKE_SOURCE_DIR}/src/grpc/gen-status) + + set(grpc_service_files + ${CMAKE_SOURCE_DIR}/src/grpc/gen-milvus/milvus.grpc.pb.cc + ${CMAKE_SOURCE_DIR}/src/grpc/gen-milvus/milvus.pb.cc + ${CMAKE_SOURCE_DIR}/src/grpc/gen-status/status.grpc.pb.cc + ${CMAKE_SOURCE_DIR}/src/grpc/gen-status/status.pb.cc + ) + + add_library(milvus_grpc_sdk STATIC + ${interface_files} + ${grpc_client_files} + ${util_files} + ${grpc_service_files} + ) + + target_link_libraries(milvus_grpc_sdk + ${third_party_libs} + ) + +endif() + +if (MILVUS_ENABLE_THRIFT STREQUAL "ON") + install(TARGETS milvus_thrift_sdk DESTINATION lib) +else() + install(TARGETS milvus_grpc_sdk DESTINATION lib) +endif() add_subdirectory(examples) - -install(TARGETS milvus_sdk DESTINATION lib) diff --git a/cpp/src/sdk/examples/CMakeLists.txt b/cpp/src/sdk/examples/CMakeLists.txt index 5a0435f47f..2205a77869 100644 --- a/cpp/src/sdk/examples/CMakeLists.txt +++ b/cpp/src/sdk/examples/CMakeLists.txt @@ -4,4 +4,5 @@ # Proprietary and confidential. #------------------------------------------------------------------------------- -add_subdirectory(simple) +add_subdirectory(thriftsimple) +add_subdirectory(grpcsimple) \ No newline at end of file diff --git a/cpp/src/grpcsdk/examples/CMakeLists.txt b/cpp/src/sdk/examples/grpcsimple/CMakeLists.txt similarity index 92% rename from cpp/src/grpcsdk/examples/CMakeLists.txt rename to cpp/src/sdk/examples/grpcsimple/CMakeLists.txt index 6c4b9f0912..e0dd829ca8 100644 --- a/cpp/src/grpcsdk/examples/CMakeLists.txt +++ b/cpp/src/sdk/examples/grpcsimple/CMakeLists.txt @@ -7,12 +7,12 @@ aux_source_directory(src src_files) include_directories(src) -include_directories(../include) +include_directories(../../include) link_directories(${CMAKE_BINARY_DIR}) add_executable(grpc_sdk_simple - ./main.cpp + main.cpp ${src_files} ) diff --git a/cpp/src/grpcsdk/examples/main.cpp b/cpp/src/sdk/examples/grpcsimple/main.cpp similarity index 100% rename from cpp/src/grpcsdk/examples/main.cpp rename to cpp/src/sdk/examples/grpcsimple/main.cpp diff --git a/cpp/src/grpcsdk/examples/src/ClientTest.cpp b/cpp/src/sdk/examples/grpcsimple/src/ClientTest.cpp similarity index 97% rename from cpp/src/grpcsdk/examples/src/ClientTest.cpp rename to cpp/src/sdk/examples/grpcsimple/src/ClientTest.cpp index 0038894ecf..d75b21a06f 100644 --- a/cpp/src/grpcsdk/examples/src/ClientTest.cpp +++ b/cpp/src/sdk/examples/grpcsimple/src/ClientTest.cpp @@ -12,7 +12,7 @@ #include #include -using namespace ::zilliz::milvus; +using namespace milvus; namespace { std::string GetTableName(); @@ -30,7 +30,7 @@ namespace { void PrintTableSchema(const TableSchema& tb_schema) { BLOCK_SPLITER - std::cout << "Table name: " << tb_schema.table_name.table_name << std::endl; + std::cout << "Table name: " << tb_schema.table_name << std::endl; std::cout << "Table index type: " << (int)tb_schema.index_type << std::endl; std::cout << "Table dimension: " << tb_schema.dimension << std::endl; std::cout << "Table store raw data: " << (tb_schema.store_raw_vector ? "true" : "false") << std::endl; @@ -91,7 +91,7 @@ namespace { TableSchema BuildTableSchema() { TableSchema tb_schema; - tb_schema.table_name.table_name = TABLE_NAME; + tb_schema.table_name = TABLE_NAME; tb_schema.index_type = IndexType::gpu_ivfflat; tb_schema.dimension = TABLE_DIMENSION; tb_schema.store_raw_vector = true; @@ -221,7 +221,7 @@ ClientTest::Test(const std::string& address, const std::string& port) { std::cout << "CreateTable function call status: " << stat.ToString() << std::endl; PrintTableSchema(tb_schema); - bool has_table = conn->HasTable(tb_schema.table_name.table_name); + bool has_table = conn->HasTable(tb_schema.table_name); if(has_table) { std::cout << "Table is created" << std::endl; } @@ -282,8 +282,8 @@ ClientTest::Test(const std::string& address, const std::string& port) { std::string status = conn->ServerStatus(); std::cout << "Server status before disconnect: " << status << std::endl; } -// Connection::Destroy(conn); - conn->Disconnect(); + Connection::Destroy(conn); +// conn->Disconnect(); {//server status std::string status = conn->ServerStatus(); std::cout << "Server status after disconnect: " << status << std::endl; diff --git a/cpp/src/grpcsdk/examples/src/ClientTest.h b/cpp/src/sdk/examples/grpcsimple/src/ClientTest.h similarity index 100% rename from cpp/src/grpcsdk/examples/src/ClientTest.h rename to cpp/src/sdk/examples/grpcsimple/src/ClientTest.h diff --git a/cpp/src/sdk/examples/simple/CMakeLists.txt b/cpp/src/sdk/examples/thriftsimple/CMakeLists.txt similarity index 79% rename from cpp/src/sdk/examples/simple/CMakeLists.txt rename to cpp/src/sdk/examples/thriftsimple/CMakeLists.txt index a288965aa3..5c4b4183ce 100644 --- a/cpp/src/sdk/examples/simple/CMakeLists.txt +++ b/cpp/src/sdk/examples/thriftsimple/CMakeLists.txt @@ -11,14 +11,14 @@ include_directories(../../include) link_directories(${CMAKE_BINARY_DIR}) -add_executable(sdk_simple +add_executable(thrift_sdk_simple ./main.cpp ${src_files} ) -target_link_libraries(sdk_simple - milvus_sdk +target_link_libraries(thrift_sdk_simple + milvus_thrift_sdk pthread ) -install(TARGETS sdk_simple DESTINATION bin) +install(TARGETS thrift_sdk_simple DESTINATION bin) diff --git a/cpp/src/sdk/examples/simple/main.cpp b/cpp/src/sdk/examples/thriftsimple/main.cpp similarity index 100% rename from cpp/src/sdk/examples/simple/main.cpp rename to cpp/src/sdk/examples/thriftsimple/main.cpp diff --git a/cpp/src/sdk/examples/simple/src/ClientTest.cpp b/cpp/src/sdk/examples/thriftsimple/src/ClientTest.cpp similarity index 100% rename from cpp/src/sdk/examples/simple/src/ClientTest.cpp rename to cpp/src/sdk/examples/thriftsimple/src/ClientTest.cpp diff --git a/cpp/src/sdk/examples/simple/src/ClientTest.h b/cpp/src/sdk/examples/thriftsimple/src/ClientTest.h similarity index 100% rename from cpp/src/sdk/examples/simple/src/ClientTest.h rename to cpp/src/sdk/examples/thriftsimple/src/ClientTest.h diff --git a/cpp/src/grpcsdk/src/client/ClientProxy.cpp b/cpp/src/sdk/grpc/ClientProxy.cpp similarity index 70% rename from cpp/src/grpcsdk/src/client/ClientProxy.cpp rename to cpp/src/sdk/grpc/ClientProxy.cpp index b564f50625..266e8ba5a3 100644 --- a/cpp/src/grpcsdk/src/client/ClientProxy.cpp +++ b/cpp/src/sdk/grpc/ClientProxy.cpp @@ -5,18 +5,16 @@ ******************************************************************************/ #include "ClientProxy.h" #include "milvus.grpc.pb.h" +#define GRPC_MULTIPLE_THREAD; -namespace zilliz { namespace milvus { Status ClientProxy::Connect(const ConnectParam ¶m) { -// Disconnect(); - std::string uri = param.ip_address + ":" + param.port; channel_ = ::grpc::CreateChannel(uri, ::grpc::InsecureChannelCredentials()); - client_ptr = new grpcClient(channel_); + client_ptr = new GrpcClient(channel_); if (channel_ != nullptr) { connected_ = true; @@ -26,10 +24,8 @@ ClientProxy::Connect(const ConnectParam ¶m) { Status ClientProxy::Connect(const std::string &uri) { -// Disconnect(); - - size_t index = uri.find_first_of(":", 0); - if ((index == std::string::npos)) { + size_t index = uri.find_first_of(':', 0); + if (index == std::string::npos) { return Status::Invalid("Invalid uri"); } @@ -54,8 +50,13 @@ ClientProxy::Connected() const { Status ClientProxy::Disconnect() { - connected_ = false; -// delete client_ptr; + try { + client_ptr->Disconnect(); + connected_ = false; + channel_.reset(); + }catch (std::exception &ex) { + return Status(StatusCode::UnknownError, "failed to disconnect: " + std::string(ex.what())); + } return Status::OK(); } @@ -68,16 +69,12 @@ Status ClientProxy::CreateTable(const TableSchema ¶m) { try { ::milvus::grpc::TableSchema schema; -// ::milvus::grpc::TableName *grpc_tablename = new ::milvus::grpc::TableName; -// grpc_tablename->set_table_name(param.table_name.table_name); -// schema.set_allocated_table_name(grpc_tablename); - - schema.mutable_table_name()->set_table_name(param.table_name.table_name); + schema.mutable_table_name()->set_table_name(param.table_name); schema.set_index_type((int) param.index_type); schema.set_dimension(param.dimension); schema.set_store_raw_vector(param.store_raw_vector); - client_ptr->CreateTable(schema);//stub call + client_ptr->CreateTable(schema); } catch (std::exception &ex) { return Status(StatusCode::UnknownError, "failed to create table: " + std::string(ex.what())); } @@ -91,6 +88,11 @@ ClientProxy::HasTable(const std::string &table_name) { return client_ptr->HasTable(grpc_table_name); } +Status +ClientProxy::DeleteTable(const std::string &table_name) { + return this->DropTable(table_name); +} + Status ClientProxy::DropTable(const std::string &table_name) { try { @@ -119,45 +121,42 @@ ClientProxy::BuildIndex(const std::string &table_name) { return Status::OK(); } +Status +ClientProxy::AddVector(const std::string &table_name, + const std::vector &record_array, + std::vector &id_array) { + return InsertVector(table_name, record_array, id_array); +} + Status ClientProxy::InsertVector(const std::string &table_name, const std::vector &record_array, std::vector &id_array) { try { -// ::milvus::grpc::InsertInfos insert_infos; -// insert_infos.set_table_name(table_name); -// -// for (auto &record : record_array) { -// ::milvus::grpc::RowRecord *grpc_record = insert_infos.add_row_record_array(); -// for (size_t i = 0; i < record.data.size(); i++) { -// grpc_record->add_vector_data(record.data[i]); -// } -// } -// -// ::milvus::grpc::VectorIds vector_ids; -// -// //Single thread -// client_ptr->InsertVector(vector_ids, insert_infos); -// auto finish = std::chrono::high_resolution_clock::now(); -// -// for (size_t i = 0; i < vector_ids.vector_id_array_size(); i++) { -// id_array.push_back(vector_ids.vector_id_array(i)); -// } //////////////////////////////////////////////////////////////////////////// +#ifdef GRPC_MULTIPLE_THREAD //multithread std::vector threads; // int thread_count = std::thread::hardware_concurrency(); int thread_count = 10; - ::milvus::grpc::InsertInfos *insert_info_array = new ::milvus::grpc::InsertInfos[thread_count]; - ::milvus::grpc::VectorIds *vector_ids_array = new ::milvus::grpc::VectorIds[thread_count]; + // TODO: Where delete following pointer? Can change it to shared_ptr? + std::shared_ptr<::milvus::grpc::InsertInfos> insert_info_array( + new ::milvus::grpc::InsertInfos[thread_count], + std::default_delete<::milvus::grpc::InsertInfos[]>() ); + + std::shared_ptr<::milvus::grpc::VectorIds> vector_ids_array( + new ::milvus::grpc::VectorIds[thread_count], + std::default_delete<::milvus::grpc::VectorIds[]>() ); + int64_t record_count = record_array.size() / thread_count; for (size_t i = 0; i < thread_count; i++) { - insert_info_array[i].set_table_name(table_name); + insert_info_array.get()[i].set_table_name(table_name); for (size_t j = i * record_count; j < record_count * (i + 1); j++) { - ::milvus::grpc::RowRecord *grpc_record = insert_info_array[i].add_row_record_array(); + ::milvus::grpc::RowRecord *grpc_record = + insert_info_array.get()[i].add_row_record_array(); for (size_t k = 0; k < record_array[j].data.size(); k++) { grpc_record->add_vector_data(record_array[j].data[k]); } @@ -168,7 +167,8 @@ ClientProxy::InsertVector(const std::string &table_name, auto start = std::chrono::high_resolution_clock::now(); for (size_t j = 0; j < thread_count; j++) { threads.push_back( - std::thread(&grpcClient::InsertVector, client_ptr, std::ref(vector_ids_array[j]), insert_info_array[j])); + std::thread(&GrpcClient::InsertVector, client_ptr, + std::ref(vector_ids_array.get()[j]), std::ref(insert_info_array.get()[j]))); } std::for_each(threads.begin(), threads.end(), std::mem_fn(&std::thread::join)); auto finish = std::chrono::high_resolution_clock::now(); @@ -176,13 +176,35 @@ ClientProxy::InsertVector(const std::string &table_name, std::cout << "*****************************************************\n"; for (size_t i = 0; i < thread_count; i++) { - for (size_t j = 0; j < vector_ids_array[i].vector_id_array_size(); j++) { - id_array.push_back(vector_ids_array[i].vector_id_array(j)); + for (size_t j = 0; j < vector_ids_array.get()[i].vector_id_array_size(); j++) { + id_array.push_back(vector_ids_array.get()[i].vector_id_array(j)); + } + } +#else + ::milvus::grpc::InsertInfos insert_infos; + insert_infos.set_table_name(table_name); + + for (auto &record : record_array) { + ::milvus::grpc::RowRecord *grpc_record = insert_infos.add_row_record_array(); + for (size_t i = 0; i < record.data.size(); i++) { + grpc_record->add_vector_data(record.data[i]); } } + ::milvus::grpc::VectorIds vector_ids; + + //Single thread + client_ptr->InsertVector(vector_ids, insert_infos); + auto finish = std::chrono::high_resolution_clock::now(); + + for (size_t i = 0; i < vector_ids.vector_id_array_size(); i++) { + id_array.push_back(vector_ids.vector_id_array(i)); + } +#endif + + } catch (std::exception &ex) { - return Status(StatusCode::UnknownError, "failed to add vector: " + std::string(ex.what())); + return Status(StatusCode::UnknownError, "fail to add vector: " + std::string(ex.what())); } return Status::OK(); @@ -201,8 +223,8 @@ ClientProxy::SearchVector(const std::string &table_name, search_vector_infos.set_topk(topk); for (auto &record : query_record_array) { ::milvus::grpc::RowRecord *row_record = search_vector_infos.add_query_record_array(); - for (size_t i = 0; i < record.data.size(); i++) { - row_record->add_vector_data(record.data[i]); + for (auto &rec : record.data) { + row_record->add_vector_data(rec); } } @@ -231,7 +253,7 @@ ClientProxy::SearchVector(const std::string &table_name, } } catch (std::exception &ex) { - return Status(StatusCode::UnknownError, "failed to search vectors: " + std::string(ex.what())); + return Status(StatusCode::UnknownError, "fail to search vectors: " + std::string(ex.what())); } return Status::OK(); @@ -244,12 +266,12 @@ ClientProxy::DescribeTable(const std::string &table_name, TableSchema &table_sch client_ptr->DescribeTable(grpc_schema, table_name); - table_schema.table_name.table_name = grpc_schema.table_name().table_name(); + table_schema.table_name = grpc_schema.table_name().table_name(); table_schema.index_type = (IndexType) grpc_schema.index_type(); table_schema.dimension = grpc_schema.dimension(); table_schema.store_raw_vector = grpc_schema.store_raw_vector(); } catch (std::exception &ex) { - return Status(StatusCode::UnknownError, "failed to describe table: " + std::string(ex.what())); + return Status(StatusCode::UnknownError, "fail to describe table: " + std::string(ex.what())); } return Status::OK(); @@ -261,7 +283,7 @@ ClientProxy::GetTableRowCount(const std::string &table_name, int64_t &row_count) row_count = client_ptr->GetTableRowCount(table_name); } catch (std::exception &ex) { - return Status(StatusCode::UnknownError, "failed to show tables: " + std::string(ex.what())); + return Status(StatusCode::UnknownError, "fail to show tables: " + std::string(ex.what())); } return Status::OK(); @@ -273,7 +295,7 @@ ClientProxy::ShowTables(std::vector &table_array) { client_ptr->ShowTables(table_array); } catch (std::exception &ex) { - return Status(StatusCode::UnknownError, "failed to show tables: " + std::string(ex.what())); + return Status(StatusCode::UnknownError, "fail to show tables: " + std::string(ex.what())); } return Status::OK(); @@ -292,7 +314,7 @@ ClientProxy::ServerVersion() const { std::string ClientProxy::ServerStatus() const { - if (connected_ == false) { + if (channel_ == nullptr) { return "not connected to server"; } @@ -306,4 +328,3 @@ ClientProxy::ServerStatus() const { } } -} diff --git a/cpp/src/sdk/grpc/ClientProxy.h b/cpp/src/sdk/grpc/ClientProxy.h new file mode 100644 index 0000000000..cbc9686d77 --- /dev/null +++ b/cpp/src/sdk/grpc/ClientProxy.h @@ -0,0 +1,87 @@ +/******************************************************************************* +* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +* Unauthorized copying of this file, via any medium is strictly prohibited. +* Proprietary and confidential. +******************************************************************************/ +#pragma once + +#include "src/sdk/include/MilvusApi.h" +#include "GrpcClient.h" + +namespace milvus { + +class ClientProxy : public Connection { +public: + // Implementations of the Connection interface + virtual Status + Connect(const ConnectParam ¶m) override; + + virtual Status + Connect(const std::string &uri) override; + + virtual Status + Connected() const override; + + virtual Status + Disconnect() override; + + virtual Status + CreateTable(const TableSchema ¶m) override; + + virtual bool + HasTable(const std::string &table_name) override; + + virtual Status + DeleteTable(const std::string &table_name) override; + + virtual Status + DropTable(const std::string &table_name) override; + + virtual Status + BuildIndex(const std::string &table_name) override; + + virtual Status + AddVector(const std::string &table_name, + const std::vector &record_array, + std::vector &id_array) override; + + virtual Status + InsertVector(const std::string &table_name, + const std::vector &record_array, + std::vector &id_array) override; + + virtual Status + SearchVector(const std::string &table_name, + const std::vector &query_record_array, + const std::vector &query_range_array, + int64_t topk, + std::vector &topk_query_result_array) override; + + virtual Status + DescribeTable(const std::string &table_name, TableSchema &table_schema) override; + + virtual Status + GetTableRowCount(const std::string &table_name, int64_t &row_count) override; + + virtual Status + ShowTables(std::vector &table_array) override; + + virtual std::string + ClientVersion() const override; + + virtual std::string + ServerVersion() const override; + + virtual std::string + ServerStatus() const override; + +private: + std::shared_ptr<::grpc::Channel> channel_; + +private: + GrpcClient *client_ptr; +// std::shared_ptr client_ptr; + bool connected_ = false; +}; + +} diff --git a/cpp/src/grpcsdk/src/client/grpcClient.cpp b/cpp/src/sdk/grpc/GrpcClient.cpp similarity index 53% rename from cpp/src/grpcsdk/src/client/grpcClient.cpp rename to cpp/src/sdk/grpc/GrpcClient.cpp index 8014e1410f..92790dc05b 100644 --- a/cpp/src/grpcsdk/src/client/grpcClient.cpp +++ b/cpp/src/sdk/grpc/GrpcClient.cpp @@ -9,7 +9,7 @@ #include #include -#include "grpcClient.h" +#include "GrpcClient.h" using grpc::Channel; using grpc::ClientContext; @@ -18,75 +18,91 @@ using grpc::ClientReaderWriter; using grpc::ClientWriter; using grpc::Status; -namespace zilliz { namespace milvus { -grpcClient::grpcClient(std::shared_ptr<::grpc::Channel> channel) +GrpcClient::GrpcClient(std::shared_ptr<::grpc::Channel>& channel) : stub_(::milvus::grpc::MilvusService::NewStub(channel)) { } -grpcClient::~grpcClient() { - -} +GrpcClient::~GrpcClient() = default; void -grpcClient::CreateTable(const ::milvus::grpc::TableSchema table_schema) { +GrpcClient::CreateTable(const ::milvus::grpc::TableSchema& table_schema) { ClientContext context; - ::milvus::Status response; + grpc::Status response; ::grpc::Status status = stub_->CreateTable(&context, table_schema, &response); if (!status.ok()) { - std::cout << "CreateTable rpc failed!\n"; + std::cerr << "CreateTable gRPC failed!" << std::endl; + } + + if (response.error_code() != grpc::SUCCESS) { + std::cerr << response.reason() << std::endl; } } bool -grpcClient::HasTable(const ::milvus::grpc::TableName table_name) { +GrpcClient::HasTable(const ::milvus::grpc::TableName& table_name) { ClientContext context; ::milvus::grpc::BoolReply response; ::grpc::Status status = stub_->HasTable(&context, table_name, &response); if (!status.ok()) { - std::cout << "HasTable rpc failed!\n"; + std::cerr << "HasTable gRPC failed!" << std::endl; + } + if (response.status().error_code() != grpc::SUCCESS) { + std::cerr << response.status().reason() << std::endl; } return response.bool_reply(); } void -grpcClient::DropTable(const ::milvus::grpc::TableName table_name) { +GrpcClient::DropTable(const ::milvus::grpc::TableName& table_name) { ClientContext context; - ::milvus::Status response; + grpc::Status response; ::grpc::Status status = stub_->DropTable(&context, table_name, &response); if (!status.ok()) { - std::cout << "DropTable rpc failed!\n"; + std::cerr << "DropTable gRPC failed!\n"; + } + + if (response.error_code() != grpc::SUCCESS) { + std::cerr << response.reason() << std::endl; } } void -grpcClient::BuildIndex(const ::milvus::grpc::TableName table_name) { +GrpcClient::BuildIndex(const ::milvus::grpc::TableName& table_name) { ClientContext context; - ::milvus::Status response; + grpc::Status response; ::grpc::Status status = stub_->BuildIndex(&context, table_name, &response); if (!status.ok()) { - std::cout << "BuildIndex rpc failed!\n"; + std::cerr << "BuildIndex rpc failed!\n"; + } + + if (response.error_code() != grpc::SUCCESS) { + std::cerr << response.reason() << std::endl; } } void -grpcClient::InsertVector(::milvus::grpc::VectorIds& vector_ids, const ::milvus::grpc::InsertInfos insert_infos) { +GrpcClient::InsertVector(::milvus::grpc::VectorIds& vector_ids, const ::milvus::grpc::InsertInfos& insert_infos) { ClientContext context; ::grpc::Status status = stub_->InsertVector(&context, insert_infos, &vector_ids); -// std::cout << vector_ids.vector_id_array_size(); + if (!status.ok()) { - std::cout << "InsertVector rpc failed!\n"; + std::cerr << "InsertVector rpc failed!\n"; + } + + if (vector_ids.status().error_code() != grpc::SUCCESS) { + std::cerr << vector_ids.status().reason() << std::endl; } } void -grpcClient::SearchVector(std::vector<::milvus::grpc::TopKQueryResult>& result_array, - const ::milvus::grpc::SearchVectorInfos search_vector_infos) { +GrpcClient::SearchVector(std::vector<::milvus::grpc::TopKQueryResult>& result_array, + const ::milvus::grpc::SearchVectorInfos& search_vector_infos) { ::milvus::grpc::TopKQueryResult query_result; ClientContext context; std::unique_ptr > reader( @@ -99,37 +115,52 @@ grpcClient::SearchVector(std::vector<::milvus::grpc::TopKQueryResult>& result_ar ::grpc::Status status = reader->Finish(); if (!status.ok()) { - std::cout << "SearchVector rpc failed!\n"; + std::cerr << "SearchVector rpc failed!\n"; + } + + if (query_result.status().error_code() != grpc::SUCCESS) { + std::cerr << query_result.status().reason() << std::endl; } } void -grpcClient::DescribeTable(::milvus::grpc::TableSchema &grpc_schema, const std::string table_name) { +GrpcClient::DescribeTable(::milvus::grpc::TableSchema& grpc_schema, const std::string& table_name) { ClientContext context; ::milvus::grpc::TableName grpc_tablename; grpc_tablename.set_table_name(table_name); ::grpc::Status status = stub_->DescribeTable(&context, grpc_tablename, &grpc_schema); if (!status.ok()) { - std::cout << "DescribeTable rpc failed!\n"; + std::cerr << "DescribeTable rpc failed!\n"; + } + + if (grpc_schema.table_name().status().error_code() != grpc::SUCCESS) { + std::cerr << grpc_schema.table_name().status().reason() << std::endl; } } int64_t -grpcClient::GetTableRowCount(const std::string table_name) { +GrpcClient::GetTableRowCount(const std::string& table_name) { ClientContext context; ::milvus::grpc::TableRowCount response; ::milvus::grpc::TableName grpc_tablename; + grpc_tablename.set_table_name(table_name); ::grpc::Status status = stub_->GetTableRowCount(&context, grpc_tablename, &response); if (!status.ok()) { - std::cout << "DescribeTable rpc failed!\n"; + std::cerr << "DescribeTable rpc failed!\n"; + return -1; + } + + if (response.status().error_code() != grpc::SUCCESS) { + std::cerr << response.status().reason() << std::endl; + return -1; } return response.table_row_count(); } void -grpcClient::ShowTables(std::vector &table_array) { +GrpcClient::ShowTables(std::vector &table_array) { ClientContext context; ::milvus::grpc::Command command; std::unique_ptr > reader( @@ -142,12 +173,16 @@ grpcClient::ShowTables(std::vector &table_array) { ::grpc::Status status = reader->Finish(); if (!status.ok()) { - std::cout << "ShowTables rpc failed!\n"; + std::cerr << "ShowTables gRPC failed!" << std::endl; + } + + if (table_name.status().error_code() != grpc::SUCCESS) { + std::cerr << table_name.status().reason() << std::endl; } } void -grpcClient::Ping(std::string &result, const std::string cmd) { +GrpcClient::Ping(std::string &result, const std::string& cmd) { ClientContext context; ::milvus::grpc::ServerStatus response; ::milvus::grpc::Command command; @@ -156,13 +191,17 @@ grpcClient::Ping(std::string &result, const std::string cmd) { result = response.info(); if (!status.ok()) { - std::cout << "Ping rpc failed!\n"; + std::cerr << "Ping gRPC failed!" << std::endl; + } + + if (response.status().error_code() != grpc::SUCCESS) { + std::cerr << response.status().reason() << std::endl; } } void -grpcClient::Disconnect() { +GrpcClient::Disconnect() { + stub_.release(); } -} } \ No newline at end of file diff --git a/cpp/src/sdk/grpc/GrpcClient.h b/cpp/src/sdk/grpc/GrpcClient.h new file mode 100644 index 0000000000..1911e33bbf --- /dev/null +++ b/cpp/src/sdk/grpc/GrpcClient.h @@ -0,0 +1,59 @@ +/******************************************************************************* +* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +* Unauthorized copying of this file, via any medium is strictly prohibited. +* Proprietary and confidential. +******************************************************************************/ +#pragma once +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "milvus.grpc.pb.h" +//#include "status.grpc.pb.h" + +#include + +namespace milvus { +class GrpcClient { +public: + explicit GrpcClient(std::shared_ptr<::grpc::Channel>& channel); + + virtual ~GrpcClient(); + + void CreateTable(const grpc::TableSchema& table_schema); + + bool HasTable(const grpc::TableName& table_name); + + void DropTable(const grpc::TableName& table_name); + + void BuildIndex(const grpc::TableName& table_name); + + void InsertVector(grpc::VectorIds& vector_ids, const grpc::InsertInfos& insert_infos); + + void SearchVector(std::vector& result_array, + const grpc::SearchVectorInfos& search_vector_infos); + + void DescribeTable(grpc::TableSchema& grpc_schema, const std::string& table_name); + + int64_t GetTableRowCount(const std::string& table_name); + + void ShowTables(std::vector &table_array); + + void Ping(std::string &result, const std::string& cmd); + + void Disconnect(); + +private: + std::unique_ptr stub_; +}; + +} diff --git a/cpp/src/sdk/include/MilvusApi.h b/cpp/src/sdk/include/MilvusApi.h index a7529d3e00..75c8440657 100644 --- a/cpp/src/sdk/include/MilvusApi.h +++ b/cpp/src/sdk/include/MilvusApi.h @@ -75,7 +75,7 @@ struct TopKQueryResult { * @brief SDK main class */ class Connection { -public: + public: /** * @brief CreateConnection @@ -99,7 +99,7 @@ public: */ static Status - Destroy(std::shared_ptr connection_ptr); + Destroy(std::shared_ptr& connection_ptr); /** * @brief Connect @@ -178,6 +178,8 @@ public: * * @return Indicate if table is delete successfully. */ + virtual Status DropTable(const std::string &table_name) = 0; + virtual Status DeleteTable(const std::string &table_name) = 0; @@ -203,6 +205,10 @@ public: * * @return Indicate if vector array are inserted successfully */ + virtual Status InsertVector(const std::string &table_name, + const std::vector &record_array, + std::vector &id_array) = 0; + virtual Status AddVector(const std::string &table_name, const std::vector &record_array, std::vector &id_array) = 0; diff --git a/cpp/src/sdk/include/Status.h b/cpp/src/sdk/include/Status.h index 3e0d07302e..68318bd7e8 100644 --- a/cpp/src/sdk/include/Status.h +++ b/cpp/src/sdk/include/Status.h @@ -4,28 +4,28 @@ #include /** \brief Milvus SDK namespace - */ +*/ namespace milvus { /** - * @brief Status Code for SDK interface return - */ +* @brief Status Code for SDK interface return +*/ enum class StatusCode { OK = 0, - // system error section +// system error section UnknownError = 1, NotSupported, NotConnected, - // function error section +// function error section InvalidAgument = 1000, }; /** - * @brief Status for SDK interface return - */ +* @brief Status for SDK interface return +*/ class Status { - public: +public: /** * @brief Status * @@ -161,169 +161,168 @@ class Status { template static Status OK(Args &&... args) { return Status(StatusCode::OK, MessageBuilder(std::forward(args)...)); - } +} - /** - * @brief Invalid - * - * static Invalid status constructor with a specific message - * - * @param, serveral specific messages - * @return, the status with Invalid. - * - */ - template - static Status Invalid(Args &&... args) { - return Status(StatusCode::InvalidAgument, - MessageBuilder(std::forward(args)...)); - } +/** + * @brief Invalid + * + * static Invalid status constructor with a specific message + * + * @param, serveral specific messages + * @return, the status with Invalid. + * + */ +template +static Status Invalid(Args &&... args) { + return Status(StatusCode::InvalidAgument, + MessageBuilder(std::forward(args)...)); +} - /** - * @brief Unknown Error - * - * static unknown error status constructor with a specific message - * - * @param, serveral specific messages - * @return, the status with unknown error. - * - */ - template - static Status UnknownError(Args &&... args) { - return Status(StatusCode::UnknownError, MessageBuilder(std::forward(args)...)); - } +/** + * @brief Unknown Error + * + * static unknown error status constructor with a specific message + * + * @param, serveral specific messages + * @return, the status with unknown error. + * + */ +template +static Status UnknownError(Args &&... args) { + return Status(StatusCode::UnknownError, MessageBuilder(std::forward(args)...)); +} - /** - * @brief not supported Error - * - * static not supported status constructor with a specific message - * - * @param, serveral specific messages - * @return, the status with not supported error. - * - */ - template - static Status NotSupported(Args &&... args) { - return Status(StatusCode::NotSupported, MessageBuilder(std::forward(args)...)); - } +/** + * @brief not supported Error + * + * static not supported status constructor with a specific message + * + * @param, serveral specific messages + * @return, the status with not supported error. + * + */ +template +static Status NotSupported(Args &&... args) { + return Status(StatusCode::NotSupported, MessageBuilder(std::forward(args)...)); +} - /** - * @brief ok - * - * Return true iff the status indicates success. - * - * @return, if the status indicates success. - * - */ - bool ok() const { return (state_ == nullptr); } +/** + * @brief ok + * + * Return true iff the status indicates success. + * + * @return, if the status indicates success. + * + */ +bool ok() const { return (state_ == nullptr); } - /** - * @brief IsInvalid - * - * Return true iff the status indicates invalid. - * - * @return, if the status indicates invalid. - * - */ - bool IsInvalid() const { return code() == StatusCode::InvalidAgument; } +/** + * @brief IsInvalid + * + * Return true iff the status indicates invalid. + * + * @return, if the status indicates invalid. + * + */ +bool IsInvalid() const { return code() == StatusCode::InvalidAgument; } - /** - * @brief IsUnknownError - * - * Return true iff the status indicates unknown error. - * - * @return, if the status indicates unknown error. - * - */ - bool IsUnknownError() const { return code() == StatusCode::UnknownError; } +/** + * @brief IsUnknownError + * + * Return true iff the status indicates unknown error. + * + * @return, if the status indicates unknown error. + * + */ +bool IsUnknownError() const { return code() == StatusCode::UnknownError; } - /** - * @brief IsNotSupported - * - * Return true iff the status indicates not supported. - * - * @return, if the status indicates not supported. - * - */ - bool IsNotSupported() const { return code() == StatusCode::NotSupported; } +/** + * @brief IsNotSupported + * + * Return true iff the status indicates not supported. + * + * @return, if the status indicates not supported. + * + */ +bool IsNotSupported() const { return code() == StatusCode::NotSupported; } - /** - * @brief ToString - * - * Return error message string. - * - * @return, error message string. - * - */ - std::string ToString() const; +/** + * @brief ToString + * + * Return error message string. + * + * @return, error message string. + * + */ +std::string ToString() const; - /** - * @brief CodeAsString - * - * Return a string representation of the status code. - * - * @return, a string representation of the status code. - * - */ - std::string CodeAsString() const; +/** + * @brief CodeAsString + * + * Return a string representation of the status code. + * + * @return, a string representation of the status code. + * + */ +std::string CodeAsString() const; - /** - * @brief code - * - * Return the StatusCode value attached to this status. - * - * @return, the status code value attached to this status. - * - */ - StatusCode code() const { return ok() ? StatusCode::OK : state_->code; } +/** + * @brief code + * + * Return the StatusCode value attached to this status. + * + * @return, the status code value attached to this status. + * + */ +StatusCode code() const { return ok() ? StatusCode::OK : state_->code; } - /** - * @brief message - * - * Return the specific error message attached to this status. - * - * @return, the specific error message attached to this status. - * - */ - std::string message() const { return ok() ? "" : state_->message; } +/** + * @brief message + * + * Return the specific error message attached to this status. + * + * @return, the specific error message attached to this status. + * + */ +std::string message() const { return ok() ? "" : state_->message; } - private: - struct State { - StatusCode code; - std::string message; - }; - - // OK status has a `nullptr` state_. Otherwise, `state_` points to - // a `State` structure containing the error code and message. - State *state_ = nullptr; - - void DeleteState() { - delete state_; - state_ = nullptr; - } - - void CopyFrom(const Status &s); - - inline void MoveFrom(Status &s); - - template - static void MessageBuilderRecursive(std::stringstream &stream, Head &&head) { - stream << head; - } - - template - static void MessageBuilderRecursive(std::stringstream &stream, Head &&head, Tail &&... tail) { - MessageBuilderRecursive(stream, std::forward(head)); - MessageBuilderRecursive(stream, std::forward(tail)...); - } - - template - static std::string MessageBuilder(Args &&... args) { - std::stringstream stream; - - MessageBuilderRecursive(stream, std::forward(args)...); - - return stream.str(); - } +private: +struct State { + StatusCode code; + std::string message; }; +// OK status has a `nullptr` state_. Otherwise, `state_` points to +// a `State` structure containing the error code and message. +State *state_ = nullptr; + +void DeleteState() { + delete state_; + state_ = nullptr; +} + +void CopyFrom(const Status &s); + +inline void MoveFrom(Status &s); + +template +static void MessageBuilderRecursive(std::stringstream &stream, Head &&head) { + stream << head; +} + +template +static void MessageBuilderRecursive(std::stringstream &stream, Head &&head, Tail &&... tail) { + MessageBuilderRecursive(stream, std::forward(head)); + MessageBuilderRecursive(stream, std::forward(tail)...); +} + +template +static std::string MessageBuilder(Args &&... args) { + std::stringstream stream; + + MessageBuilderRecursive(stream, std::forward(args)...); + + return stream.str(); +} +}; } \ No newline at end of file diff --git a/cpp/src/grpcsdk/src/interface/ConnectionImpl.cpp b/cpp/src/sdk/interface/ConnectionImpl.cpp similarity index 84% rename from cpp/src/grpcsdk/src/interface/ConnectionImpl.cpp rename to cpp/src/sdk/interface/ConnectionImpl.cpp index 61556f93aa..d8369c8577 100644 --- a/cpp/src/grpcsdk/src/interface/ConnectionImpl.cpp +++ b/cpp/src/sdk/interface/ConnectionImpl.cpp @@ -6,7 +6,6 @@ #include "ConnectionImpl.h" #include "version.h" -namespace zilliz { namespace milvus { std::shared_ptr @@ -15,10 +14,10 @@ Connection::Create() { } Status -Connection::Destroy(std::shared_ptr connection_ptr) { -// if (connection_ptr != nullptr) { -// return connection_ptr->Disconnect(); -// } +Connection::Destroy(std::shared_ptr& connection_ptr) { + if (connection_ptr != nullptr) { + return connection_ptr->Disconnect(); + } return Status::OK(); } @@ -67,6 +66,11 @@ ConnectionImpl::DropTable(const std::string &table_name) { return client_proxy_->DropTable(table_name); } +Status +ConnectionImpl::DeleteTable(const std::string &table_name) { + return client_proxy_->DropTable(table_name); +} + Status ConnectionImpl::BuildIndex(const std::string &table_name) { return client_proxy_->BuildIndex(table_name); @@ -79,6 +83,13 @@ ConnectionImpl::InsertVector(const std::string &table_name, return client_proxy_->InsertVector(table_name, record_array, id_array); } +Status +ConnectionImpl::AddVector(const std::string &table_name, + const std::vector &record_array, + std::vector &id_array) { + return client_proxy_->InsertVector(table_name, record_array, id_array); +} + Status ConnectionImpl::SearchVector(const std::string &table_name, const std::vector &query_record_array, @@ -115,4 +126,3 @@ ConnectionImpl::ServerStatus() const { } } -} diff --git a/cpp/src/grpcsdk/src/interface/ConnectionImpl.h b/cpp/src/sdk/interface/ConnectionImpl.h similarity index 85% rename from cpp/src/grpcsdk/src/interface/ConnectionImpl.h rename to cpp/src/sdk/interface/ConnectionImpl.h index 1262e9783d..706cd9acc8 100644 --- a/cpp/src/grpcsdk/src/interface/ConnectionImpl.h +++ b/cpp/src/sdk/interface/ConnectionImpl.h @@ -5,10 +5,9 @@ ******************************************************************************/ #pragma once -//#include "MilvusApi.h" -#include "client/ClientProxy.h" +#include "../include/MilvusApi.h" +#include "src/sdk/grpc/ClientProxy.h" -namespace zilliz { namespace milvus { class ConnectionImpl : public Connection { @@ -30,12 +29,18 @@ public: virtual Status DropTable(const std::string &table_name) override; + virtual Status DeleteTable(const std::string &table_name) override; + virtual Status BuildIndex(const std::string &table_name) override; virtual Status InsertVector(const std::string &table_name, const std::vector &record_array, std::vector &id_array) override; + virtual Status AddVector(const std::string &table_name, + const std::vector &record_array, + std::vector &id_array) override; + virtual Status SearchVector(const std::string &table_name, const std::vector &query_record_array, const std::vector &query_range_array, @@ -59,4 +64,3 @@ private: }; } -} diff --git a/cpp/src/grpcsdk/src/interface/Status.cpp b/cpp/src/sdk/interface/Status.cpp similarity index 98% rename from cpp/src/grpcsdk/src/interface/Status.cpp rename to cpp/src/sdk/interface/Status.cpp index 51fd7cc3fc..2d43c66181 100644 --- a/cpp/src/grpcsdk/src/interface/Status.cpp +++ b/cpp/src/sdk/interface/Status.cpp @@ -3,9 +3,8 @@ * Unauthorized copying of this file, via any medium is strictly prohibited. * Proprietary and confidential. ******************************************************************************/ -#include "Status.h" +#include "../include/Status.h" -namespace zilliz { namespace milvus { Status::~Status() noexcept { @@ -126,4 +125,4 @@ std::string Status::ToString() const { } } -} + diff --git a/cpp/src/sdk/src/interface/ConnectionImpl.cpp b/cpp/src/sdk/src/interface/ConnectionImpl.cpp deleted file mode 100644 index 737cd7d83b..0000000000 --- a/cpp/src/sdk/src/interface/ConnectionImpl.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/******************************************************************************* - * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved - * Unauthorized copying of this file, via any medium is strictly prohibited. - * Proprietary and confidential. - ******************************************************************************/ -#include "ConnectionImpl.h" -#include "version.h" - -namespace milvus { - -std::shared_ptr -Connection::Create() { - return std::shared_ptr(new ConnectionImpl()); -} - -Status -Connection::Destroy(std::shared_ptr connection_ptr) { - if(connection_ptr != nullptr) { - return connection_ptr->Disconnect(); - } - return Status::OK(); -} - -////////////////////////////////////////////////////////////////////////////////////////////// -ConnectionImpl::ConnectionImpl() { - client_proxy_ = std::make_shared(); -} - -Status -ConnectionImpl::Connect(const ConnectParam ¶m) { - return client_proxy_->Connect(param); -} - -Status -ConnectionImpl::Connect(const std::string &uri) { - return client_proxy_->Connect(uri); -} - -Status -ConnectionImpl::Connected() const { - return client_proxy_->Connected(); -} - -Status -ConnectionImpl::Disconnect() { - return client_proxy_->Disconnect(); -} - -std::string -ConnectionImpl::ClientVersion() const { - return MILVUS_VERSION; -} - -Status -ConnectionImpl::CreateTable(const TableSchema ¶m) { - return client_proxy_->CreateTable(param); -} - -bool -ConnectionImpl::HasTable(const std::string &table_name) { - return client_proxy_->HasTable(table_name); -} - -Status -ConnectionImpl::DeleteTable(const std::string &table_name) { - return client_proxy_->DeleteTable(table_name); -} - -Status -ConnectionImpl::BuildIndex(const std::string &table_name) { - return client_proxy_->BuildIndex(table_name); -} - -Status -ConnectionImpl::AddVector(const std::string &table_name, - const std::vector &record_array, - std::vector &id_array) { - return client_proxy_->AddVector(table_name, record_array, id_array); -} - -Status -ConnectionImpl::SearchVector(const std::string &table_name, - const std::vector &query_record_array, - const std::vector &query_range_array, - int64_t topk, - std::vector &topk_query_result_array) { - return client_proxy_->SearchVector(table_name, query_record_array, query_range_array, topk, topk_query_result_array); -} - -Status -ConnectionImpl::DescribeTable(const std::string &table_name, TableSchema &table_schema) { - return client_proxy_->DescribeTable(table_name, table_schema); -} - -Status -ConnectionImpl::GetTableRowCount(const std::string &table_name, int64_t &row_count) { - return client_proxy_->GetTableRowCount(table_name, row_count); -} - -Status -ConnectionImpl::ShowTables(std::vector &table_array) { - return client_proxy_->ShowTables(table_array); -} - -std::string -ConnectionImpl::ServerVersion() const { - return client_proxy_->ServerVersion(); -} - -std::string -ConnectionImpl::ServerStatus() const { - return client_proxy_->ServerStatus(); -} - -} - diff --git a/cpp/src/sdk/src/interface/ConnectionImpl.h b/cpp/src/sdk/src/interface/ConnectionImpl.h deleted file mode 100644 index a05e5acba5..0000000000 --- a/cpp/src/sdk/src/interface/ConnectionImpl.h +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved - * Unauthorized copying of this file, via any medium is strictly prohibited. - * Proprietary and confidential. - ******************************************************************************/ -#pragma once - -#include "MilvusApi.h" -#include "client/ClientProxy.h" - -namespace milvus { - -class ConnectionImpl : public Connection { -public: - ConnectionImpl(); - - // Implementations of the Connection interface - virtual Status Connect(const ConnectParam ¶m) override; - - virtual Status Connect(const std::string &uri) override; - - virtual Status Connected() const override; - - virtual Status Disconnect() override; - - virtual Status CreateTable(const TableSchema ¶m) override; - - virtual bool HasTable(const std::string &table_name) override; - - virtual Status DeleteTable(const std::string &table_name) override; - - virtual Status BuildIndex(const std::string &table_name) override; - - virtual Status AddVector(const std::string &table_name, - const std::vector &record_array, - std::vector &id_array) override; - - virtual Status SearchVector(const std::string &table_name, - const std::vector &query_record_array, - const std::vector &query_range_array, - int64_t topk, - std::vector &topk_query_result_array) override; - - virtual Status DescribeTable(const std::string &table_name, TableSchema &table_schema) override; - - virtual Status GetTableRowCount(const std::string &table_name, int64_t &row_count) override; - - virtual Status ShowTables(std::vector &table_array) override; - - virtual std::string ClientVersion() const override; - - virtual std::string ServerVersion() const override; - - virtual std::string ServerStatus() const override; - -private: - std::shared_ptr client_proxy_; -}; - -} diff --git a/cpp/src/sdk/src/interface/Status.cpp b/cpp/src/sdk/src/interface/Status.cpp deleted file mode 100644 index 0bacdfbe97..0000000000 --- a/cpp/src/sdk/src/interface/Status.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/******************************************************************************* - * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved - * Unauthorized copying of this file, via any medium is strictly prohibited. - * Proprietary and confidential. - ******************************************************************************/ -#include "Status.h" - - -namespace milvus { - -Status::~Status() noexcept { - if (state_ != nullptr) { - delete state_; - state_ = nullptr; - } -} - -static inline std::ostream &operator<<(std::ostream &os, const Status &x) { - os << x.ToString(); - return os; -} - -void Status::MoveFrom(Status &s) { - delete state_; - state_ = s.state_; - s.state_ = nullptr; -} - -Status::Status(const Status &s) - : state_((s.state_ == nullptr) ? nullptr : new State(*s.state_)) {} - -Status &Status::operator=(const Status &s) { - if (state_ != s.state_) { - CopyFrom(s); - } - return *this; -} - -Status &Status::operator=(Status &&s) noexcept { - MoveFrom(s); - return *this; -} - -Status Status::operator&(const Status &status) const noexcept { - if (ok()) { - return status; - } else { - return *this; - } -} - -Status Status::operator&(Status &&s) const noexcept { - if (ok()) { - return std::move(s); - } else { - return *this; - } -} - -Status &Status::operator&=(const Status &s) noexcept { - if (ok() && !s.ok()) { - CopyFrom(s); - } - return *this; -} - -Status &Status::operator&=(Status &&s) noexcept { - if (ok() && !s.ok()) { - MoveFrom(s); - } - return *this; -} - -Status::Status(StatusCode code, const std::string &message) { - state_ = new State; - state_->code = code; - state_->message = message; -} - -void Status::CopyFrom(const Status &status) { - delete state_; - if (status.state_ == nullptr) { - state_ = nullptr; - } else { - state_ = new State(*status.state_); - } -} - -std::string Status::CodeAsString() const { - if (state_ == nullptr) { - return "OK"; - } - - const char *type = nullptr; - switch (code()) { - case StatusCode::OK: type = "OK"; - break; - case StatusCode::InvalidAgument: type = "Invalid agument"; - break; - case StatusCode::UnknownError: type = "Unknown error"; - break; - case StatusCode::NotSupported: type = "Not Supported"; - break; - case StatusCode::NotConnected: type = "Not Connected"; - break; - default: type = "Unknown"; - break; - } - return std::string(type); -} - -std::string Status::ToString() const { - std::string result(CodeAsString()); - if (state_ == nullptr) { - return result; - } - result += ": "; - result += state_->message; - return result; -} - -} diff --git a/cpp/src/sdk/src/client/ClientProxy.cpp b/cpp/src/sdk/thrift/ClientProxy.cpp similarity index 93% rename from cpp/src/sdk/src/client/ClientProxy.cpp rename to cpp/src/sdk/thrift/ClientProxy.cpp index 7cd0b8e65c..0dc57caa30 100644 --- a/cpp/src/sdk/src/client/ClientProxy.cpp +++ b/cpp/src/sdk/thrift/ClientProxy.cpp @@ -127,6 +127,11 @@ ClientProxy::DeleteTable(const std::string &table_name) { return Status::OK(); } +Status +ClientProxy::DropTable(const std::string &table_name) { + return this->DeleteTable(table_name); +} + Status ClientProxy::BuildIndex(const std::string &table_name) { if(!IsConnected()) { @@ -173,6 +178,13 @@ ClientProxy::AddVector(const std::string &table_name, return Status::OK(); } +Status +ClientProxy::InsertVector(const std::string &table_name, + const std::vector &record_array, + std::vector &id_array) { + return this->AddVector(table_name, record_array, id_array); +} + Status ClientProxy::SearchVector(const std::string &table_name, const std::vector &query_record_array, @@ -191,7 +203,7 @@ ClientProxy::SearchVector(const std::string &table_name, thrift::RowRecord thrift_record; thrift_record.vector_data.resize(record.data.size() * sizeof(double)); - double *dbl = (double *) (const_cast(thrift_record.vector_data.data())); + auto dbl = (double *) (const_cast(thrift_record.vector_data.data())); for (size_t i = 0; i < record.data.size(); i++) { dbl[i] = (double) (record.data[i]); } @@ -223,8 +235,8 @@ ClientProxy::SearchVector(const std::string &table_name, return Status(StatusCode::UnknownError, "illegal result"); } - int64_t* id_ptr = (int64_t*)thrift_topk_result.id_array.data(); - double* dist_ptr = (double*)thrift_topk_result.distance_array.data(); + auto id_ptr = (int64_t*)thrift_topk_result.id_array.data(); + auto dist_ptr = (double*)thrift_topk_result.distance_array.data(); for(size_t i = 0; i < id_count; i++) { QueryResult query_result; query_result.id = id_ptr[i]; diff --git a/cpp/src/sdk/src/client/ClientProxy.h b/cpp/src/sdk/thrift/ClientProxy.h similarity index 88% rename from cpp/src/sdk/src/client/ClientProxy.h rename to cpp/src/sdk/thrift/ClientProxy.h index 3e4850ef07..041fda69d3 100644 --- a/cpp/src/sdk/src/client/ClientProxy.h +++ b/cpp/src/sdk/thrift/ClientProxy.h @@ -27,12 +27,18 @@ public: virtual Status DeleteTable(const std::string &table_name) override; + virtual Status DropTable(const std::string &table_name) override; + virtual Status BuildIndex(const std::string &table_name) override; virtual Status AddVector(const std::string &table_name, const std::vector &record_array, std::vector &id_array) override; + virtual Status InsertVector(const std::string &table_name, + const std::vector &record_array, + std::vector &id_array) override; + virtual Status SearchVector(const std::string &table_name, const std::vector &query_record_array, const std::vector &query_range_array, diff --git a/cpp/src/sdk/src/client/ThriftClient.cpp b/cpp/src/sdk/thrift/ThriftClient.cpp similarity index 100% rename from cpp/src/sdk/src/client/ThriftClient.cpp rename to cpp/src/sdk/thrift/ThriftClient.cpp diff --git a/cpp/src/sdk/src/client/ThriftClient.h b/cpp/src/sdk/thrift/ThriftClient.h similarity index 100% rename from cpp/src/sdk/src/client/ThriftClient.h rename to cpp/src/sdk/thrift/ThriftClient.h diff --git a/cpp/src/sdk/src/util/Exception.h b/cpp/src/sdk/util/Exception.h similarity index 100% rename from cpp/src/sdk/src/util/Exception.h rename to cpp/src/sdk/util/Exception.h diff --git a/cpp/src/server/Server.cpp b/cpp/src/server/Server.cpp index a79a8c7357..34433dd381 100644 --- a/cpp/src/server/Server.cpp +++ b/cpp/src/server/Server.cpp @@ -4,8 +4,13 @@ // Proprietary and confidential. //////////////////////////////////////////////////////////////////////////////// #include "Server.h" -#include "ServerConfig.h" -#include "MilvusServer.h" +//#include "ServerConfig.h" +#ifdef MILVUS_ENABLE_THRIFT +#include "server/thrift_impl/MilvusServer.h" +#else +#include "server/grpc_impl/MilvusServer.h" +#endif + #include "utils/Log.h" #include "utils/SignalUtil.h" #include "utils/TimeRecorder.h" diff --git a/cpp/src/grpcserver/MilvusServer.cpp b/cpp/src/server/grpc_impl/MilvusServer.cpp similarity index 72% rename from cpp/src/grpcserver/MilvusServer.cpp rename to cpp/src/server/grpc_impl/MilvusServer.cpp index 781521ea79..d4b9781d91 100644 --- a/cpp/src/grpcserver/MilvusServer.cpp +++ b/cpp/src/server/grpc_impl/MilvusServer.cpp @@ -5,8 +5,8 @@ ******************************************************************************/ #include "milvus.grpc.pb.h" #include "MilvusServer.h" -#include "ServerConfig.h" -#include "DBWrapper.h" +#include "../ServerConfig.h" +#include "../DBWrapper.h" #include "utils/Log.h" #include "faiss/utils.h" #include "RequestHandler.h" @@ -28,15 +28,10 @@ namespace zilliz { namespace milvus { namespace server { -using grpc::Server; -using grpc::ServerBuilder; -using grpc::ServerContext; -using grpc::ServerReader; -using grpc::ServerReaderWriter; -using grpc::ServerWriter; -using grpc::Status; -static std::unique_ptr server; +static std::unique_ptr server; + +constexpr long MESSAGE_SIZE = 400 * 1024 * 1024; void MilvusServer::StartService() { @@ -52,34 +47,25 @@ MilvusServer::StartService() { int32_t port = server_config.GetInt32Value(CONFIG_SERVER_PORT, 19530); faiss::distance_compute_blas_threshold = engine_config.GetInt32Value(CONFIG_DCBT, 20); - //TODO:add exception handle + DBWrapper::DB();//initialize db - std::string server_address("127.0.0.1:19530"); + std::string server_address(address + ":" + std::to_string(port)); - ServerBuilder builder; - builder.SetMaxReceiveMessageSize(400 * 1024 * 1024); //default 4 * 1024 * 1024 - builder.SetMaxSendMessageSize(400 * 1024 * 1024); + grpc::ServerBuilder builder; + builder.SetMaxReceiveMessageSize(MESSAGE_SIZE); //default 4 * 1024 * 1024 + builder.SetMaxSendMessageSize(MESSAGE_SIZE); builder.SetCompressionAlgorithmSupportStatus(GRPC_COMPRESS_STREAM_GZIP, true); - -// builder.SetDefaultCompressionAlgorithm(GRPC_COMPRESS_DEFLATE); -// builder.SetDefaultCompressionAlgorithm(GRPC_COMPRESS_GZIP); builder.SetDefaultCompressionAlgorithm(GRPC_COMPRESS_STREAM_GZIP); -// builder.SetDefaultCompressionAlgorithm(GRPC_COMPRESS_ALGORITHMS_COUNT); builder.SetDefaultCompressionLevel(GRPC_COMPRESS_LEVEL_HIGH); RequestHandler service; builder.AddListeningPort(server_address, grpc::InsecureServerCredentials()); - builder.RegisterService(&service); - builder.SetSyncServerOption(builder.MIN_POLLERS, 10); - builder.SetSyncServerOption(builder.MAX_POLLERS, 10); - server = builder.BuildAndStart(); - server->Wait(); } diff --git a/cpp/src/grpcserver/MilvusServer.h b/cpp/src/server/grpc_impl/MilvusServer.h similarity index 65% rename from cpp/src/grpcserver/MilvusServer.h rename to cpp/src/server/grpc_impl/MilvusServer.h index 10966300e4..a83e34e263 100644 --- a/cpp/src/grpcserver/MilvusServer.h +++ b/cpp/src/server/grpc_impl/MilvusServer.h @@ -7,17 +7,6 @@ #include #include -#include -#include -#include -#include -#include - -using grpc::Channel; -using grpc::ClientContext; -using grpc::ClientReader; -using grpc::ClientReaderWriter; -using grpc::ClientWriter; namespace zilliz { namespace milvus { diff --git a/cpp/src/grpcserver/RequestHandler.cpp b/cpp/src/server/grpc_impl/RequestHandler.cpp similarity index 92% rename from cpp/src/grpcserver/RequestHandler.cpp rename to cpp/src/server/grpc_impl/RequestHandler.cpp index 37f7d2f780..748461a32d 100644 --- a/cpp/src/grpcserver/RequestHandler.cpp +++ b/cpp/src/server/grpc_impl/RequestHandler.cpp @@ -13,18 +13,17 @@ namespace milvus { namespace server { ::grpc::Status -RequestHandler::CreateTable(::grpc::ServerContext *context, const ::milvus::grpc::TableSchema *request, ::milvus::Status *response) { +RequestHandler::CreateTable(::grpc::ServerContext *context, const ::milvus::grpc::TableSchema *request, ::milvus::grpc::Status *response) { BaseTaskPtr task_ptr = CreateTableTask::Create(*request); RequestScheduler::ExecTask(task_ptr, response); return ::grpc::Status::OK; } -//TODO: handle Response ::grpc::Status RequestHandler::HasTable(::grpc::ServerContext *context, const ::milvus::grpc::TableName *request, ::milvus::grpc::BoolReply *response) { bool has_table = false; BaseTaskPtr task_ptr = HasTableTask::Create(request->table_name(), has_table); - ::milvus::Status grpc_status; + ::milvus::grpc::Status grpc_status; RequestScheduler::ExecTask(task_ptr, &grpc_status); response->set_bool_reply(has_table); response->mutable_status()->set_reason(grpc_status.reason()); @@ -33,14 +32,14 @@ RequestHandler::HasTable(::grpc::ServerContext *context, const ::milvus::grpc::T } ::grpc::Status -RequestHandler::DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) { +RequestHandler::DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) { BaseTaskPtr task_ptr = DropTableTask::Create(request->table_name()); RequestScheduler::ExecTask(task_ptr, response); return ::grpc::Status::OK; } ::grpc::Status -RequestHandler::BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response) { +RequestHandler::BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) { BaseTaskPtr task_ptr = BuildIndexTask::Create(request->table_name()); RequestScheduler::ExecTask(task_ptr, response); return ::grpc::Status::OK; @@ -49,7 +48,7 @@ RequestHandler::BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc: ::grpc::Status RequestHandler::InsertVector(::grpc::ServerContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response) { BaseTaskPtr task_ptr = InsertVectorTask::Create(*request, *response); - ::milvus::Status grpc_status; + ::milvus::grpc::Status grpc_status; RequestScheduler::ExecTask(task_ptr, &grpc_status); response->mutable_status()->set_reason(grpc_status.reason()); response->mutable_status()->set_error_code(grpc_status.error_code()); @@ -59,7 +58,6 @@ RequestHandler::InsertVector(::grpc::ServerContext* context, const ::milvus::grp ::grpc::Status RequestHandler::SearchVector(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInfos* request, ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult>* writer) { std::vector file_id_array; - //TODO: handle status BaseTaskPtr task_ptr = SearchVectorTask::Create(*request, file_id_array, *writer); RequestScheduler::ExecTask(task_ptr, nullptr); return ::grpc::Status::OK; @@ -76,7 +74,7 @@ RequestHandler::SearchVectorInFiles(::grpc::ServerContext* context, const ::milv ::grpc::Status RequestHandler::DescribeTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response) { BaseTaskPtr task_ptr = DescribeTableTask::Create(request->table_name(), response); - ::milvus::Status grpc_status; + ::milvus::grpc::Status grpc_status; RequestScheduler::ExecTask(task_ptr, &grpc_status); response->mutable_table_name()->mutable_status()->set_error_code(grpc_status.error_code()); response->mutable_table_name()->mutable_status()->set_reason(grpc_status.reason()); @@ -87,7 +85,7 @@ RequestHandler::DescribeTable(::grpc::ServerContext* context, const ::milvus::gr RequestHandler::GetTableRowCount(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response) { int64_t row_count = 0; BaseTaskPtr task_ptr = GetTableRowCountTask::Create(request->table_name(), row_count); - ::milvus::Status grpc_status; + ::milvus::grpc::Status grpc_status; RequestScheduler::ExecTask(task_ptr, &grpc_status); response->set_table_row_count(row_count); response->mutable_status()->set_reason(grpc_status.reason()); @@ -106,7 +104,7 @@ RequestHandler::ShowTables(::grpc::ServerContext* context, const ::milvus::grpc: RequestHandler::Ping(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response) { std::string result; BaseTaskPtr task_ptr = PingTask::Create(request->cmd(), result); - ::milvus::Status grpc_status; + ::milvus::grpc::Status grpc_status; RequestScheduler::ExecTask(task_ptr, &grpc_status); response->set_info(result); response->mutable_status()->set_reason(grpc_status.reason()); diff --git a/cpp/src/grpcserver/RequestHandler.h b/cpp/src/server/grpc_impl/RequestHandler.h similarity index 65% rename from cpp/src/grpcserver/RequestHandler.h rename to cpp/src/server/grpc_impl/RequestHandler.h index abc8ad574b..07402f2478 100644 --- a/cpp/src/grpcserver/RequestHandler.h +++ b/cpp/src/server/grpc_impl/RequestHandler.h @@ -26,7 +26,9 @@ public: * * @param param */ - ::grpc::Status CreateTable(::grpc::ServerContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::Status* response); + ::grpc::Status + CreateTable(::grpc::ServerContext* context, + const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response) override ; /** * @brief Test table existence method @@ -38,7 +40,9 @@ public: * * @param table_name */ - ::grpc::Status HasTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response); + ::grpc::Status + HasTable(::grpc::ServerContext* context, + const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response) override ; /** * @brief Drop table method @@ -50,7 +54,9 @@ public: * * @param table_name */ - ::grpc::Status DropTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response); + ::grpc::Status + DropTable(::grpc::ServerContext* context, + const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) override; /** * @brief build index by table method @@ -62,7 +68,9 @@ public: * * @param table_name */ - ::grpc::Status BuildIndex(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::Status* response); + ::grpc::Status + BuildIndex(::grpc::ServerContext* context, + const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response) override; /** @@ -78,7 +86,9 @@ public: * @param table_name * @param record_array */ - ::grpc::Status InsertVector(::grpc::ServerContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response); + ::grpc::Status + InsertVector(::grpc::ServerContext* context, + const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response) override; /** * @brief Query vector @@ -97,7 +107,9 @@ public: * @param query_range_array * @param topk */ - ::grpc::Status SearchVector(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInfos* request, ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult>* writer); + ::grpc::Status + SearchVector(::grpc::ServerContext* context, + const ::milvus::grpc::SearchVectorInfos* request, ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult>* writer) override; /** * @brief Internal use query interface @@ -116,7 +128,9 @@ public: * @param query_range_array * @param topk */ - ::grpc::Status SearchVectorInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult>* writer); + ::grpc::Status + SearchVectorInFiles(::grpc::ServerContext* context, + const ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult>* writer) override; /** * @brief Get table schema @@ -129,7 +143,9 @@ public: * * @param table_name */ - ::grpc::Status DescribeTable(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response); + ::grpc::Status + DescribeTable(::grpc::ServerContext* context, + const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response) override; /** * @brief Get table row count @@ -142,7 +158,9 @@ public: * * @param table_name */ - ::grpc::Status GetTableRowCount(::grpc::ServerContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response); + ::grpc::Status + GetTableRowCount(::grpc::ServerContext* context, + const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response) override; /** * @brief List all tables in database @@ -152,7 +170,9 @@ public: * * @return table names. */ - ::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::grpc::ServerWriter< ::milvus::grpc::TableName>* writer); + ::grpc::Status + ShowTables(::grpc::ServerContext* context, + const ::milvus::grpc::Command* request, ::grpc::ServerWriter< ::milvus::grpc::TableName>* writer) override; /** * @brief Give the server status @@ -164,7 +184,9 @@ public: * * @param cmd */ - ::grpc::Status Ping(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response); + ::grpc::Status + Ping(::grpc::ServerContext* context, + const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response) override; }; } diff --git a/cpp/src/grpcserver/RequestScheduler.cpp b/cpp/src/server/grpc_impl/RequestScheduler.cpp similarity index 61% rename from cpp/src/grpcserver/RequestScheduler.cpp rename to cpp/src/server/grpc_impl/RequestScheduler.cpp index c290d95b9f..4cc0e9760d 100644 --- a/cpp/src/grpcserver/RequestScheduler.cpp +++ b/cpp/src/server/grpc_impl/RequestScheduler.cpp @@ -6,7 +6,7 @@ #include "RequestScheduler.h" #include "utils/Log.h" -#include "../grpc/gen-status/status.pb.h" +#include "src/grpc/gen-status/status.pb.h" namespace zilliz { namespace milvus { @@ -15,34 +15,34 @@ namespace server { using namespace ::milvus; namespace { - const std::map &ErrorMap() { - static const std::map code_map = { - {SERVER_UNEXPECTED_ERROR, ErrorCode::UNEXPECTED_ERROR}, - {SERVER_UNSUPPORTED_ERROR, ErrorCode::UNEXPECTED_ERROR}, - {SERVER_NULL_POINTER, ErrorCode::UNEXPECTED_ERROR}, - {SERVER_INVALID_ARGUMENT, ErrorCode::ILLEGAL_ARGUMENT}, - {SERVER_FILE_NOT_FOUND, ErrorCode::FILE_NOT_FOUND}, - {SERVER_NOT_IMPLEMENT, ErrorCode::UNEXPECTED_ERROR}, - {SERVER_BLOCKING_QUEUE_EMPTY, ErrorCode::UNEXPECTED_ERROR}, - {SERVER_CANNOT_CREATE_FOLDER, ErrorCode::CANNOT_CREATE_FOLDER}, - {SERVER_CANNOT_CREATE_FILE, ErrorCode::CANNOT_CREATE_FILE}, - {SERVER_CANNOT_DELETE_FOLDER, ErrorCode::CANNOT_DELETE_FOLDER}, - {SERVER_CANNOT_DELETE_FILE, ErrorCode::CANNOT_DELETE_FILE}, - {SERVER_TABLE_NOT_EXIST, ErrorCode::TABLE_NOT_EXISTS}, - {SERVER_INVALID_TABLE_NAME, ErrorCode::ILLEGAL_TABLE_NAME}, - {SERVER_INVALID_TABLE_DIMENSION, ErrorCode::ILLEGAL_DIMENSION}, - {SERVER_INVALID_TIME_RANGE, ErrorCode::ILLEGAL_RANGE}, - {SERVER_INVALID_VECTOR_DIMENSION, ErrorCode::ILLEGAL_DIMENSION}, + const std::map &ErrorMap() { + static const std::map code_map = { + {SERVER_UNEXPECTED_ERROR, ::milvus::grpc::ErrorCode::UNEXPECTED_ERROR}, + {SERVER_UNSUPPORTED_ERROR, ::milvus::grpc::ErrorCode::UNEXPECTED_ERROR}, + {SERVER_NULL_POINTER, ::milvus::grpc::ErrorCode::UNEXPECTED_ERROR}, + {SERVER_INVALID_ARGUMENT, ::milvus::grpc::ErrorCode::ILLEGAL_ARGUMENT}, + {SERVER_FILE_NOT_FOUND, ::milvus::grpc::ErrorCode::FILE_NOT_FOUND}, + {SERVER_NOT_IMPLEMENT, ::milvus::grpc::ErrorCode::UNEXPECTED_ERROR}, + {SERVER_BLOCKING_QUEUE_EMPTY, ::milvus::grpc::ErrorCode::UNEXPECTED_ERROR}, + {SERVER_CANNOT_CREATE_FOLDER, ::milvus::grpc::ErrorCode::CANNOT_CREATE_FOLDER}, + {SERVER_CANNOT_CREATE_FILE, ::milvus::grpc::ErrorCode::CANNOT_CREATE_FILE}, + {SERVER_CANNOT_DELETE_FOLDER, ::milvus::grpc::ErrorCode::CANNOT_DELETE_FOLDER}, + {SERVER_CANNOT_DELETE_FILE, ::milvus::grpc::ErrorCode::CANNOT_DELETE_FILE}, + {SERVER_TABLE_NOT_EXIST, ::milvus::grpc::ErrorCode::TABLE_NOT_EXISTS}, + {SERVER_INVALID_TABLE_NAME, ::milvus::grpc::ErrorCode::ILLEGAL_TABLE_NAME}, + {SERVER_INVALID_TABLE_DIMENSION, ::milvus::grpc::ErrorCode::ILLEGAL_DIMENSION}, + {SERVER_INVALID_TIME_RANGE, ::milvus::grpc::ErrorCode::ILLEGAL_RANGE}, + {SERVER_INVALID_VECTOR_DIMENSION, ::milvus::grpc::ErrorCode::ILLEGAL_DIMENSION}, - {SERVER_INVALID_INDEX_TYPE, ErrorCode::ILLEGAL_INDEX_TYPE}, - {SERVER_INVALID_ROWRECORD, ErrorCode::ILLEGAL_ROWRECORD}, - {SERVER_INVALID_ROWRECORD_ARRAY, ErrorCode::ILLEGAL_ROWRECORD}, - {SERVER_INVALID_TOPK, ErrorCode::ILLEGAL_TOPK}, - {SERVER_ILLEGAL_VECTOR_ID, ErrorCode::ILLEGAL_VECTOR_ID}, - {SERVER_ILLEGAL_SEARCH_RESULT, ErrorCode::ILLEGAL_SEARCH_RESULT}, - {SERVER_CACHE_ERROR, ErrorCode::CACHE_FAILED}, - {DB_META_TRANSACTION_FAILED, ErrorCode::META_FAILED}, - {SERVER_BUILD_INDEX_ERROR, ErrorCode::BUILD_INDEX_ERROR}, + {SERVER_INVALID_INDEX_TYPE, ::milvus::grpc::ErrorCode::ILLEGAL_INDEX_TYPE}, + {SERVER_INVALID_ROWRECORD, ::milvus::grpc::ErrorCode::ILLEGAL_ROWRECORD}, + {SERVER_INVALID_ROWRECORD_ARRAY, ::milvus::grpc::ErrorCode::ILLEGAL_ROWRECORD}, + {SERVER_INVALID_TOPK, ::milvus::grpc::ErrorCode::ILLEGAL_TOPK}, + {SERVER_ILLEGAL_VECTOR_ID, ::milvus::grpc::ErrorCode::ILLEGAL_VECTOR_ID}, + {SERVER_ILLEGAL_SEARCH_RESULT, ::milvus::grpc::ErrorCode::ILLEGAL_SEARCH_RESULT}, + {SERVER_CACHE_ERROR, ::milvus::grpc::ErrorCode::CACHE_FAILED}, + {DB_META_TRANSACTION_FAILED, ::milvus::grpc::ErrorCode::META_FAILED}, + {SERVER_BUILD_INDEX_ERROR, ::milvus::grpc::ErrorCode::BUILD_INDEX_ERROR}, }; return code_map; @@ -94,7 +94,7 @@ RequestScheduler::~RequestScheduler() { Stop(); } -void RequestScheduler::ExecTask(BaseTaskPtr& task_ptr, ::milvus::Status *grpc_status) { +void RequestScheduler::ExecTask(BaseTaskPtr& task_ptr, ::milvus::grpc::Status *grpc_status) { if(task_ptr == nullptr) { return; } @@ -102,22 +102,15 @@ void RequestScheduler::ExecTask(BaseTaskPtr& task_ptr, ::milvus::Status *grpc_st RequestScheduler& scheduler = RequestScheduler::GetInstance(); scheduler.ExecuteTask(task_ptr); + if(!task_ptr->IsAsync()) { task_ptr->WaitToFinish(); ServerError err = task_ptr->ErrorCode(); if (err != SERVER_SUCCESS) { - //TODO:Handle exception grpc_status->set_reason(task_ptr->ErrorMsg()); - grpc_status->set_error_code(::milvus::ErrorCode((int) err)); -// grpc_status.set_error_code(err); -// Exception ex; -// ex.__set_code(ErrorMap().at(err)); -// std::string msg = task_ptr->ErrorMsg(); -// if(msg.empty()){ -// msg = "Error message not set"; -// } -// ex.__set_reason(msg); -// throw ex; + grpc_status->set_error_code(::milvus::grpc::ErrorCode((int) err)); + } else { +// grpc_status->set_error_code(::milvus::ErrorCode((int) SERVER_SUCCESS)); } } } diff --git a/cpp/src/grpcserver/RequestScheduler.h b/cpp/src/server/grpc_impl/RequestScheduler.h similarity index 95% rename from cpp/src/grpcserver/RequestScheduler.h rename to cpp/src/server/grpc_impl/RequestScheduler.h index c4440cdffe..8b02801866 100644 --- a/cpp/src/grpcserver/RequestScheduler.h +++ b/cpp/src/server/grpc_impl/RequestScheduler.h @@ -66,7 +66,7 @@ public: ServerError ExecuteTask(const BaseTaskPtr& task_ptr); - static void ExecTask(BaseTaskPtr& task_ptr, ::milvus::Status* grpc_status); + static void ExecTask(BaseTaskPtr& task_ptr, ::milvus::grpc::Status* grpc_status); protected: RequestScheduler(); diff --git a/cpp/src/grpcserver/RequestTask.cpp b/cpp/src/server/grpc_impl/RequestTask.cpp similarity index 84% rename from cpp/src/grpcserver/RequestTask.cpp rename to cpp/src/server/grpc_impl/RequestTask.cpp index 7f0bf7d31d..3032e3839f 100644 --- a/cpp/src/grpcserver/RequestTask.cpp +++ b/cpp/src/server/grpc_impl/RequestTask.cpp @@ -4,23 +4,23 @@ * Proprietary and confidential. ******************************************************************************/ #include "RequestTask.h" -#include "ServerConfig.h" +#include "../ServerConfig.h" #include "utils/CommonUtil.h" #include "utils/Log.h" #include "utils/TimeRecorder.h" #include "utils/ValidationUtil.h" -#include "DBWrapper.h" +#include "../DBWrapper.h" #include "version.h" #include "MilvusServer.h" -#include "Server.h" +#include "src/server/Server.h" namespace zilliz { namespace milvus { namespace server { -static const std::string DQL_TASK_GROUP = "dql"; -static const std::string DDL_DML_TASK_GROUP = "ddl_dml"; -static const std::string PING_TASK_GROUP = "ping"; +static const char* DQL_TASK_GROUP = "dql"; +static const char* DDL_DML_TASK_GROUP = "ddl_dml"; +static const char* PING_TASK_GROUP = "ping"; using DB_META = zilliz::milvus::engine::meta::Meta; using DB_DATE = zilliz::milvus::engine::meta::DateT; @@ -55,21 +55,8 @@ namespace { return map_type[type]; } - - void - ConvertRowRecordToFloatArray(const ::milvus::grpc::InsertInfos insert_infos, - uint64_t dimension, - std::vector& float_array) { - uint64_t vec_count = insert_infos.row_record_array_size(); - float_array.resize(vec_count * dimension);//allocate enough memory - for(uint64_t i = 0; i < vec_count; i++) { - for (uint64_t j = 0; j < dimension; j++) { - float_array[i * dimension + j] = insert_infos.row_record_array(i).vector_data(j); - } - } - } - static constexpr long DAY_SECONDS = 86400; + constexpr long DAY_SECONDS = 24 * 60 * 60; void ConvertTimeRangeToDBDates(const std::vector<::milvus::grpc::Range> &range_array, @@ -112,13 +99,13 @@ namespace { } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -CreateTableTask::CreateTableTask(const ::milvus::grpc::TableSchema schema) +CreateTableTask::CreateTableTask(const ::milvus::grpc::TableSchema& schema) : BaseTask(DDL_DML_TASK_GROUP), schema_(schema) { } -BaseTaskPtr CreateTableTask::Create(const ::milvus::grpc::TableSchema schema) { +BaseTaskPtr CreateTableTask::Create(const ::milvus::grpc::TableSchema& schema) { return std::shared_ptr(new CreateTableTask(schema)); } @@ -127,8 +114,7 @@ ServerError CreateTableTask::OnExecute() { try { //step 1: check arguments - ServerError res = SERVER_SUCCESS; - res = ValidateTableName(schema_.table_name().table_name()); + ServerError res = ValidateTableName(schema_.table_name().table_name()); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + schema_.table_name().table_name()); } @@ -152,7 +138,8 @@ ServerError CreateTableTask::OnExecute() { //step 3: create table engine::Status stat = DBWrapper::DB()->CreateTable(table_info); - if(!stat.ok()) {//table could exist + if(!stat.ok()) { + //table could exist return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); } @@ -181,8 +168,7 @@ ServerError DescribeTableTask::OnExecute() { try { //step 1: check arguments - ServerError res = SERVER_SUCCESS; - res = ValidateTableName(table_name_); + ServerError res = ValidateTableName(table_name_); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + table_name_); } @@ -225,14 +211,17 @@ ServerError BuildIndexTask::OnExecute() { TimeRecorder rc("BuildIndexTask"); //step 1: check arguments - ServerError res = SERVER_SUCCESS; - res = ValidateTableName(table_name_); + ServerError res = ValidateTableName(table_name_); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + table_name_); } bool has_table = false; engine::Status stat = DBWrapper::DB()->HasTable(table_name_, has_table); + if(!stat.ok()) { + return SetError(DB_META_TRANSACTION_FAILED, "Engine failed: " + stat.ToString()); + } + if(!has_table) { return SetError(SERVER_TABLE_NOT_EXIST, "Table " + table_name_ + " not exists"); } @@ -252,14 +241,14 @@ ServerError BuildIndexTask::OnExecute() { } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -HasTableTask::HasTableTask(const std::string table_name, bool& has_table) +HasTableTask::HasTableTask(const std::string& table_name, bool& has_table) : BaseTask(DDL_DML_TASK_GROUP), table_name_(table_name), has_table_(has_table) { } -BaseTaskPtr HasTableTask::Create(const std::string table_name, bool& has_table) { +BaseTaskPtr HasTableTask::Create(const std::string& table_name, bool& has_table) { return std::shared_ptr(new HasTableTask(table_name, has_table)); } @@ -268,8 +257,7 @@ ServerError HasTableTask::OnExecute() { TimeRecorder rc("HasTableTask"); //step 1: check arguments - ServerError res = SERVER_SUCCESS; - res = ValidateTableName(table_name_); + ServerError res = ValidateTableName(table_name_); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + table_name_); } @@ -304,8 +292,7 @@ ServerError DropTableTask::OnExecute() { TimeRecorder rc("DropTableTask"); //step 1: check arguments - ServerError res = SERVER_SUCCESS; - res = ValidateTableName(table_name_); + ServerError res = ValidateTableName(table_name_); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + table_name_); } @@ -340,13 +327,13 @@ ServerError DropTableTask::OnExecute() { } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -ShowTablesTask::ShowTablesTask(::grpc::ServerWriter< ::milvus::grpc::TableName> writer) +ShowTablesTask::ShowTablesTask(::grpc::ServerWriter< ::milvus::grpc::TableName>& writer) : BaseTask(DDL_DML_TASK_GROUP), writer_(writer) { } -BaseTaskPtr ShowTablesTask::Create(::grpc::ServerWriter< ::milvus::grpc::TableName> writer) { +BaseTaskPtr ShowTablesTask::Create(::grpc::ServerWriter< ::milvus::grpc::TableName>& writer) { return std::shared_ptr(new ShowTablesTask(writer)); } @@ -366,7 +353,7 @@ ServerError ShowTablesTask::OnExecute() { } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -InsertVectorTask::InsertVectorTask(const ::milvus::grpc::InsertInfos insert_infos, +InsertVectorTask::InsertVectorTask(const ::milvus::grpc::InsertInfos& insert_infos, ::milvus::grpc::VectorIds& record_ids) : BaseTask(DDL_DML_TASK_GROUP), insert_infos_(insert_infos), @@ -374,7 +361,7 @@ InsertVectorTask::InsertVectorTask(const ::milvus::grpc::InsertInfos insert_info record_ids_.Clear(); } -BaseTaskPtr InsertVectorTask::Create(const ::milvus::grpc::InsertInfos insert_infos, +BaseTaskPtr InsertVectorTask::Create(const ::milvus::grpc::InsertInfos& insert_infos, ::milvus::grpc::VectorIds& record_ids) { return std::shared_ptr(new InsertVectorTask(insert_infos, record_ids)); } @@ -384,8 +371,7 @@ ServerError InsertVectorTask::OnExecute() { TimeRecorder rc("InsertVectorTask"); //step 1: check arguments - ServerError res = SERVER_SUCCESS; - res = ValidateTableName(insert_infos_.table_name()); + ServerError res = ValidateTableName(insert_infos_.table_name()); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + insert_infos_.table_name()); } @@ -414,9 +400,9 @@ ServerError InsertVectorTask::OnExecute() { #endif //step 3: prepare float data - std::vector vec_f; + std::vector vec_f(insert_infos_.row_record_array_size() * table_info.dimension_, 0); - vec_f.resize(insert_infos_.row_record_array_size() * table_info.dimension_); + // TODO: change to one dimension array in protobuf or use multiple-thread to copy the data for (size_t i = 0; i < insert_infos_.row_record_array_size(); i++) { for (size_t j = 0; j < table_info.dimension_; j++) { vec_f[i * table_info.dimension_ + j] = insert_infos_.row_record_array(i).vector_data(j); @@ -426,23 +412,22 @@ ServerError InsertVectorTask::OnExecute() { rc.ElapseFromBegin("prepare vectors data"); //step 4: insert vectors - uint64_t vec_count = (uint64_t)insert_infos_.row_record_array_size(); - std::vector vec_ids; - vec_ids.resize(record_ids_.vector_id_array_size()); - vec_ids.clear(); + auto vec_count = (uint64_t)insert_infos_.row_record_array_size(); + std::vector vec_ids(record_ids_.vector_id_array_size(), 0); stat = DBWrapper::DB()->InsertVectors(insert_infos_.table_name(), vec_count, vec_f.data(), vec_ids); rc.ElapseFromBegin("add vectors to engine"); if(!stat.ok()) { return SetError(SERVER_CACHE_ERROR, "Cache error: " + stat.ToString()); } - for (size_t i = 0; i < vec_ids.size(); i++) { - record_ids_.add_vector_id_array(vec_ids.at(i)); + for (int64_t id : vec_ids) { + record_ids_.add_vector_id_array(id); } - if(record_ids_.vector_id_array_size() != vec_count) { + auto ids_size = record_ids_.vector_id_array_size(); + if(ids_size != vec_count) { std::string msg = "Add " + std::to_string(vec_count) + " vectors but only return " - + std::to_string(record_ids_.vector_id_array_size()) + " id"; + + std::to_string(ids_size) + " id"; return SetError(SERVER_ILLEGAL_VECTOR_ID, msg); } @@ -461,20 +446,20 @@ ServerError InsertVectorTask::OnExecute() { } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -SearchVectorTask::SearchVectorTask(const ::milvus::grpc::SearchVectorInfos searchVectorInfos, - const std::vector file_id_array, - ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult> writer) +SearchVectorTask::SearchVectorTask(const ::milvus::grpc::SearchVectorInfos& search_vector_infos, + const std::vector& file_id_array, + ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult>& writer) : BaseTask(DQL_TASK_GROUP), - searchVector_infos_(searchVectorInfos), + search_vector_infos_(search_vector_infos), file_id_array_(file_id_array), writer_(writer) { } -BaseTaskPtr SearchVectorTask::Create(const ::milvus::grpc::SearchVectorInfos searchVectorInfos, - const std::vector file_id_array, - ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult> writer) { - return std::shared_ptr(new SearchVectorTask(searchVectorInfos, file_id_array, +BaseTaskPtr SearchVectorTask::Create(const ::milvus::grpc::SearchVectorInfos& search_vector_infos, + const std::vector& file_id_array, + ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult>& writer) { + return std::shared_ptr(new SearchVectorTask(search_vector_infos, file_id_array, writer)); } @@ -483,20 +468,19 @@ ServerError SearchVectorTask::OnExecute() { TimeRecorder rc("SearchVectorTask"); //step 1: check arguments - ServerError res = SERVER_SUCCESS; - std::string table_name_ = searchVector_infos_.table_name(); - res = ValidateTableName(table_name_); + std::string table_name_ = search_vector_infos_.table_name(); + ServerError res = ValidateTableName(table_name_); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + table_name_); } - int top_k_ = searchVector_infos_.topk(); + int top_k_ = search_vector_infos_.topk(); if(top_k_ <= 0) { return SetError(SERVER_INVALID_TOPK, "Invalid topk: " + std::to_string( top_k_)); } - if(searchVector_infos_.query_record_array().empty()) { + if(search_vector_infos_.query_record_array().empty()) { return SetError(SERVER_INVALID_ROWRECORD_ARRAY, "Row record array is empty"); } @@ -518,8 +502,8 @@ ServerError SearchVectorTask::OnExecute() { std::string error_msg; std::vector<::milvus::grpc::Range> range_array; - for (size_t i = 0; i < searchVector_infos_.query_range_array_size(); i++) { - range_array.emplace_back(searchVector_infos_.query_range_array(i)); + for (size_t i = 0; i < search_vector_infos_.query_range_array_size(); i++) { + range_array.emplace_back(search_vector_infos_.query_range_array(i)); } ConvertTimeRangeToDBDates(range_array, dates, error_code, error_msg); if(error_code != SERVER_SUCCESS) { @@ -536,19 +520,19 @@ ServerError SearchVectorTask::OnExecute() { #endif //step 3: prepare float data - std::vector vec_f; - vec_f.resize(searchVector_infos_.query_record_array_size() * table_info.dimension_); -// vec_f.resize(searchVector_infos_.query_range_array_size() * table_info.dimension_); - for (size_t i = 0; i < searchVector_infos_.query_record_array_size(); i++) { + auto record_array_size = search_vector_infos_.query_record_array_size(); + std::vector vec_f(record_array_size * table_info.dimension_, 0); + //TODO + for (size_t i = 0; i < record_array_size; i++) { for (size_t j = 0; j < table_info.dimension_; j++) { - vec_f[i * table_info.dimension_ + j] = searchVector_infos_.query_record_array(i).vector_data(j); + vec_f[i * table_info.dimension_ + j] = search_vector_infos_.query_record_array(i).vector_data(j); } } rc.ElapseFromBegin("prepare vector data"); //step 4: search vectors engine::QueryResults results; - uint64_t record_count = (uint64_t)searchVector_infos_.query_record_array().size(); + auto record_count = (uint64_t)search_vector_infos_.query_record_array().size(); if(file_id_array_.empty()) { stat = DBWrapper::DB()->Query(table_name_, (size_t) top_k_, record_count, vec_f.data(), dates, results); @@ -577,7 +561,7 @@ ServerError SearchVectorTask::OnExecute() { //step 5: construct result array for(uint64_t i = 0; i < record_count; i++) { auto& result = results[i]; - const auto &record = searchVector_infos_.query_record_array(i); + const auto &record = search_vector_infos_.query_record_array(i); ::milvus::grpc::TopKQueryResult grpc_topk_result; for(auto& pair : result) { ::milvus::grpc::QueryResult *grpc_result = grpc_topk_result.add_query_result_arrays(); @@ -604,14 +588,14 @@ ServerError SearchVectorTask::OnExecute() { } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -GetTableRowCountTask::GetTableRowCountTask(const std::string table_name, int64_t& row_count) +GetTableRowCountTask::GetTableRowCountTask(const std::string& table_name, int64_t& row_count) : BaseTask(DDL_DML_TASK_GROUP), table_name_(table_name), row_count_(row_count) { } -BaseTaskPtr GetTableRowCountTask::Create(const std::string table_name, int64_t& row_count) { +BaseTaskPtr GetTableRowCountTask::Create(const std::string& table_name, int64_t& row_count) { return std::shared_ptr(new GetTableRowCountTask(table_name, row_count)); } @@ -661,7 +645,6 @@ ServerError PingTask::OnExecute() { result_ = MILVUS_VERSION; } else if (cmd_ == "disconnect") { //TODO stopservice -// MilvusServer::StopService(); } return SERVER_SUCCESS; diff --git a/cpp/src/grpcserver/RequestTask.h b/cpp/src/server/grpc_impl/RequestTask.h similarity index 78% rename from cpp/src/grpcserver/RequestTask.h rename to cpp/src/server/grpc_impl/RequestTask.h index f7b45775d4..8a8796b30d 100644 --- a/cpp/src/grpcserver/RequestTask.h +++ b/cpp/src/server/grpc_impl/RequestTask.h @@ -21,10 +21,10 @@ namespace server { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class CreateTableTask : public BaseTask { public: - static BaseTaskPtr Create(const ::milvus::grpc::TableSchema schema); + static BaseTaskPtr Create(const ::milvus::grpc::TableSchema& schema); protected: - CreateTableTask(const ::milvus::grpc::TableSchema request); + explicit CreateTableTask(const ::milvus::grpc::TableSchema& request); ServerError OnExecute() override; @@ -35,10 +35,10 @@ private: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class HasTableTask : public BaseTask { public: - static BaseTaskPtr Create(const std::string table_name, bool& has_table); + static BaseTaskPtr Create(const std::string& table_name, bool& has_table); protected: - HasTableTask(const std::string request, bool& has_table); + HasTableTask(const std::string& request, bool& has_table); ServerError OnExecute() override; @@ -70,7 +70,7 @@ public: static BaseTaskPtr Create(const std::string& table_name); protected: - DropTableTask(const std::string& table_name); + explicit DropTableTask(const std::string& table_name); ServerError OnExecute() override; @@ -85,7 +85,7 @@ public: static BaseTaskPtr Create(const std::string& table_name); protected: - BuildIndexTask(const std::string& table_name); + explicit BuildIndexTask(const std::string& table_name); ServerError OnExecute() override; @@ -97,10 +97,10 @@ private: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class ShowTablesTask : public BaseTask { public: - static BaseTaskPtr Create(::grpc::ServerWriter< ::milvus::grpc::TableName> writer); + static BaseTaskPtr Create(::grpc::ServerWriter< ::milvus::grpc::TableName>& writer); protected: - ShowTablesTask(::grpc::ServerWriter< ::milvus::grpc::TableName> writer); + explicit ShowTablesTask(::grpc::ServerWriter< ::milvus::grpc::TableName>& writer); ServerError OnExecute() override; @@ -111,11 +111,11 @@ private: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class InsertVectorTask : public BaseTask { public: - static BaseTaskPtr Create(const ::milvus::grpc::InsertInfos insert_infos, + static BaseTaskPtr Create(const ::milvus::grpc::InsertInfos& insert_infos, ::milvus::grpc::VectorIds& record_ids_); protected: - InsertVectorTask(const ::milvus::grpc::InsertInfos insert_infos, + InsertVectorTask(const ::milvus::grpc::InsertInfos& insert_infos, ::milvus::grpc::VectorIds& record_ids_); ServerError OnExecute() override; @@ -128,19 +128,19 @@ private: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class SearchVectorTask : public BaseTask { public: - static BaseTaskPtr Create(const ::milvus::grpc::SearchVectorInfos searchVectorInfos, - const std::vector file_id_array, - ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult> writer); + static BaseTaskPtr Create(const ::milvus::grpc::SearchVectorInfos& searchVectorInfos, + const std::vector& file_id_array, + ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult>& writer); protected: - SearchVectorTask(const ::milvus::grpc::SearchVectorInfos searchVectorInfos, - const std::vector file_id_array, - ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult> writer); + SearchVectorTask(const ::milvus::grpc::SearchVectorInfos& searchVectorInfos, + const std::vector& file_id_array, + ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult>& writer); ServerError OnExecute() override; private: - const ::milvus::grpc::SearchVectorInfos searchVector_infos_; + const ::milvus::grpc::SearchVectorInfos search_vector_infos_; std::vector file_id_array_; ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult> writer_; }; @@ -148,16 +148,16 @@ private: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class GetTableRowCountTask : public BaseTask { public: - static BaseTaskPtr Create(const std::string table_name, int64_t& row_count); + static BaseTaskPtr Create(const std::string& table_name, int64_t& row_count); protected: - GetTableRowCountTask(const std::string table_name, int64_t& row_count); + GetTableRowCountTask(const std::string& table_name, int64_t& row_count); ServerError OnExecute() override; private: std::string table_name_; - int64_t row_count_; + int64_t& row_count_; }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/cpp/src/server/MilvusServer.cpp b/cpp/src/server/thrift_impl/MilvusServer.cpp similarity index 98% rename from cpp/src/server/MilvusServer.cpp rename to cpp/src/server/thrift_impl/MilvusServer.cpp index 2f68c4b189..eb501d57eb 100644 --- a/cpp/src/server/MilvusServer.cpp +++ b/cpp/src/server/thrift_impl/MilvusServer.cpp @@ -5,9 +5,9 @@ ******************************************************************************/ #include "MilvusServer.h" #include "RequestHandler.h" -#include "ServerConfig.h" +#include "src/server/ServerConfig.h" #include "ThreadPoolServer.h" -#include "DBWrapper.h" +#include "src/server/DBWrapper.h" #include "utils/Log.h" #include "milvus_types.h" diff --git a/cpp/src/server/MilvusServer.h b/cpp/src/server/thrift_impl/MilvusServer.h similarity index 100% rename from cpp/src/server/MilvusServer.h rename to cpp/src/server/thrift_impl/MilvusServer.h diff --git a/cpp/src/server/RequestHandler.cpp b/cpp/src/server/thrift_impl/RequestHandler.cpp similarity index 100% rename from cpp/src/server/RequestHandler.cpp rename to cpp/src/server/thrift_impl/RequestHandler.cpp diff --git a/cpp/src/server/RequestHandler.h b/cpp/src/server/thrift_impl/RequestHandler.h similarity index 100% rename from cpp/src/server/RequestHandler.h rename to cpp/src/server/thrift_impl/RequestHandler.h diff --git a/cpp/src/server/RequestScheduler.cpp b/cpp/src/server/thrift_impl/RequestScheduler.cpp similarity index 100% rename from cpp/src/server/RequestScheduler.cpp rename to cpp/src/server/thrift_impl/RequestScheduler.cpp diff --git a/cpp/src/server/RequestScheduler.h b/cpp/src/server/thrift_impl/RequestScheduler.h similarity index 100% rename from cpp/src/server/RequestScheduler.h rename to cpp/src/server/thrift_impl/RequestScheduler.h diff --git a/cpp/src/server/RequestTask.cpp b/cpp/src/server/thrift_impl/RequestTask.cpp similarity index 99% rename from cpp/src/server/RequestTask.cpp rename to cpp/src/server/thrift_impl/RequestTask.cpp index d6c1a2fb9c..13085942ac 100644 --- a/cpp/src/server/RequestTask.cpp +++ b/cpp/src/server/thrift_impl/RequestTask.cpp @@ -4,12 +4,12 @@ * Proprietary and confidential. ******************************************************************************/ #include "RequestTask.h" -#include "ServerConfig.h" +#include "src/server/ServerConfig.h" #include "utils/CommonUtil.h" #include "utils/Log.h" #include "utils/TimeRecorder.h" #include "utils/ValidationUtil.h" -#include "DBWrapper.h" +#include "src/server/DBWrapper.h" #include "version.h" #ifdef MILVUS_ENABLE_PROFILING diff --git a/cpp/src/server/RequestTask.h b/cpp/src/server/thrift_impl/RequestTask.h similarity index 100% rename from cpp/src/server/RequestTask.h rename to cpp/src/server/thrift_impl/RequestTask.h diff --git a/cpp/src/server/ThreadPoolServer.cpp b/cpp/src/server/thrift_impl/ThreadPoolServer.cpp similarity index 100% rename from cpp/src/server/ThreadPoolServer.cpp rename to cpp/src/server/thrift_impl/ThreadPoolServer.cpp diff --git a/cpp/src/server/ThreadPoolServer.h b/cpp/src/server/thrift_impl/ThreadPoolServer.h similarity index 100% rename from cpp/src/server/ThreadPoolServer.h rename to cpp/src/server/thrift_impl/ThreadPoolServer.h diff --git a/cpp/src/utils/SignalUtil.cpp b/cpp/src/utils/SignalUtil.cpp index 35683b34ef..2bc62b2364 100644 --- a/cpp/src/utils/SignalUtil.cpp +++ b/cpp/src/utils/SignalUtil.cpp @@ -4,7 +4,7 @@ // Proprietary and confidential. //////////////////////////////////////////////////////////////////////////////// #include "SignalUtil.h" -#include "server/Server.h" +#include "src/server/Server.h" #include "utils/Log.h" #include @@ -16,7 +16,6 @@ namespace server { void SignalUtil::HandleSignal(int signum){ - switch(signum){ case SIGINT: case SIGUSR2:{ From 6aba1d011b49d4ea2fa96aa0cf1a295e483a973e Mon Sep 17 00:00:00 2001 From: kun yu Date: Thu, 25 Jul 2019 17:26:30 +0800 Subject: [PATCH 4/5] pull upstream Former-commit-id: 82dafb79113706d919562c5aeefbf32ae010f9c3 --- cpp/src/server/grpc_impl/RequestTask.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cpp/src/server/grpc_impl/RequestTask.cpp b/cpp/src/server/grpc_impl/RequestTask.cpp index 3032e3839f..44a9495a83 100644 --- a/cpp/src/server/grpc_impl/RequestTask.cpp +++ b/cpp/src/server/grpc_impl/RequestTask.cpp @@ -114,17 +114,17 @@ ServerError CreateTableTask::OnExecute() { try { //step 1: check arguments - ServerError res = ValidateTableName(schema_.table_name().table_name()); + ServerError res = ValidationUtil::ValidateTableName(schema_.table_name().table_name()); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + schema_.table_name().table_name()); } - res = ValidateTableDimension(schema_.dimension()); + res = ValidationUtil::ValidateTableDimension(schema_.dimension()); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table dimension: " + std::to_string(schema_.dimension())); } - res = ValidateTableIndexType(schema_.index_type()); + res = ValidationUtil::ValidateTableIndexType(schema_.index_type()); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid index type: " + std::to_string(schema_.index_type())); } @@ -168,7 +168,7 @@ ServerError DescribeTableTask::OnExecute() { try { //step 1: check arguments - ServerError res = ValidateTableName(table_name_); + ServerError res = ValidationUtil::ValidateTableName(table_name_); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + table_name_); } @@ -211,7 +211,7 @@ ServerError BuildIndexTask::OnExecute() { TimeRecorder rc("BuildIndexTask"); //step 1: check arguments - ServerError res = ValidateTableName(table_name_); + ServerError res = ValidationUtil::ValidateTableName(table_name_); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + table_name_); } @@ -257,7 +257,7 @@ ServerError HasTableTask::OnExecute() { TimeRecorder rc("HasTableTask"); //step 1: check arguments - ServerError res = ValidateTableName(table_name_); + ServerError res = ValidationUtil::ValidateTableName(table_name_); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + table_name_); } @@ -292,7 +292,7 @@ ServerError DropTableTask::OnExecute() { TimeRecorder rc("DropTableTask"); //step 1: check arguments - ServerError res = ValidateTableName(table_name_); + ServerError res = ValidationUtil::ValidateTableName(table_name_); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + table_name_); } @@ -371,7 +371,7 @@ ServerError InsertVectorTask::OnExecute() { TimeRecorder rc("InsertVectorTask"); //step 1: check arguments - ServerError res = ValidateTableName(insert_infos_.table_name()); + ServerError res = ValidationUtil::ValidateTableName(insert_infos_.table_name()); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + insert_infos_.table_name()); } @@ -469,7 +469,7 @@ ServerError SearchVectorTask::OnExecute() { //step 1: check arguments std::string table_name_ = search_vector_infos_.table_name(); - ServerError res = ValidateTableName(table_name_); + ServerError res = ValidationUtil::ValidateTableName(table_name_); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + table_name_); } @@ -605,7 +605,7 @@ ServerError GetTableRowCountTask::OnExecute() { //step 1: check arguments ServerError res = SERVER_SUCCESS; - res = ValidateTableName(table_name_); + res = ValidationUtil::ValidateTableName(table_name_); if(res != SERVER_SUCCESS) { return SetError(res, "Invalid table name: " + table_name_); } From 2ac2dfca011cecad95c5dcd0a8058b0852c2d926 Mon Sep 17 00:00:00 2001 From: jinhai Date: Thu, 25 Jul 2019 19:57:10 +0800 Subject: [PATCH 5/5] Fix build error and refactor code Former-commit-id: da6bf57fdebc0fc9b03251d7d9eb6c398dd35770 --- cpp/src/db/Options.h | 7 +- cpp/src/db/Utils.cpp | 6 +- cpp/src/grpc/cpp_gen.sh | 0 cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc | 96 +- cpp/src/grpc/gen-milvus/milvus.grpc.pb.h | 92 +- cpp/src/grpc/gen-milvus/milvus.pb.cc | 3169 ++++++++--------- cpp/src/grpc/gen-milvus/milvus.pb.h | 1630 +++++---- cpp/src/grpc/gen-status/status.grpc.pb.h | 12 +- cpp/src/grpc/gen-status/status.pb.cc | 252 +- cpp/src/grpc/gen-status/status.pb.h | 182 +- cpp/src/sdk/CMakeLists.txt | 7 +- cpp/src/sdk/examples/CMakeLists.txt | 7 +- .../examples/grpcsimple/src/ClientTest.cpp | 18 +- .../examples/thriftsimple/src/ClientTest.cpp | 14 +- cpp/src/sdk/thrift/ThriftClient.h | 6 +- cpp/src/server/ServerConfig.h | 66 +- cpp/src/server/thrift_impl/RequestTask.cpp | 6 +- cpp/unittest/db/db_tests.cpp | 2 +- cpp/unittest/db/mem_test.cpp | 2 +- cpp/unittest/db/mysql_db_test.cpp | 2 +- cpp/unittest/metrics/metrics_test.cpp | 2 +- cpp/unittest/server/config_test.cpp | 4 +- cpp/unittest/server/util_test.cpp | 2 +- 23 files changed, 2793 insertions(+), 2791 deletions(-) mode change 100644 => 100755 cpp/src/grpc/cpp_gen.sh diff --git a/cpp/src/db/Options.h b/cpp/src/db/Options.h index 2f7869d6e2..a1ff28419d 100644 --- a/cpp/src/db/Options.h +++ b/cpp/src/db/Options.h @@ -20,14 +20,13 @@ static constexpr uint64_t ONE_KB = 1024; static constexpr uint64_t ONE_MB = ONE_KB*ONE_KB; static constexpr uint64_t ONE_GB = ONE_KB*ONE_MB; -static const std::string ARCHIVE_CONF_DISK = "disk"; -static const std::string ARCHIVE_CONF_DAYS = "days"; -static const std::string ARCHIVE_CONF_DEFAULT = ""; +static const char* ARCHIVE_CONF_DISK = "disk"; +static const char* ARCHIVE_CONF_DAYS = "days"; struct ArchiveConf { using CriteriaT = std::map; - ArchiveConf(const std::string& type, const std::string& criterias = ARCHIVE_CONF_DEFAULT); + ArchiveConf(const std::string& type, const std::string& criterias = std::string()); const std::string& GetType() const { return type_; } const CriteriaT GetCriterias() const { return criterias_; } diff --git a/cpp/src/db/Utils.cpp b/cpp/src/db/Utils.cpp index aa533559bd..022991fc0a 100644 --- a/cpp/src/db/Utils.cpp +++ b/cpp/src/db/Utils.cpp @@ -18,10 +18,10 @@ namespace utils { namespace { -static const std::string TABLES_FOLDER = "/tables/"; +const char* TABLES_FOLDER = "/tables/"; -static uint64_t index_file_counter = 0; -static std::mutex index_file_counter_mutex; +uint64_t index_file_counter = 0; +std::mutex index_file_counter_mutex; std::string ConstructParentFolder(const std::string& db_path, const meta::TableFileSchema& table_file) { std::string table_path = db_path + TABLES_FOLDER + table_file.table_id_; diff --git a/cpp/src/grpc/cpp_gen.sh b/cpp/src/grpc/cpp_gen.sh old mode 100644 new mode 100755 diff --git a/cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc b/cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc index ef9fa3d46d..0e6ede4e06 100644 --- a/cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc +++ b/cpp/src/grpc/gen-milvus/milvus.grpc.pb.cc @@ -58,11 +58,19 @@ MilvusService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& chan } void MilvusService::Stub::experimental_async::CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_CreateTable_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_CreateTable_, context, request, response, std::move(f)); } void MilvusService::Stub::experimental_async::CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_CreateTable_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_CreateTable_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_CreateTable_, context, request, response, reactor); +} + +void MilvusService::Stub::experimental_async::CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_CreateTable_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* MilvusService::Stub::AsyncCreateTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema& request, ::grpc::CompletionQueue* cq) { @@ -78,11 +86,19 @@ void MilvusService::Stub::experimental_async::CreateTable(::grpc::ClientContext* } void MilvusService::Stub::experimental_async::HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HasTable_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HasTable_, context, request, response, std::move(f)); } void MilvusService::Stub::experimental_async::HasTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::BoolReply* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HasTable_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HasTable_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HasTable_, context, request, response, reactor); +} + +void MilvusService::Stub::experimental_async::HasTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::BoolReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HasTable_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::milvus::grpc::BoolReply>* MilvusService::Stub::AsyncHasTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { @@ -98,11 +114,19 @@ void MilvusService::Stub::experimental_async::HasTable(::grpc::ClientContext* co } void MilvusService::Stub::experimental_async::DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DropTable_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DropTable_, context, request, response, std::move(f)); } void MilvusService::Stub::experimental_async::DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DropTable_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DropTable_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_DropTable_, context, request, response, reactor); +} + +void MilvusService::Stub::experimental_async::DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_DropTable_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* MilvusService::Stub::AsyncDropTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { @@ -118,11 +142,19 @@ void MilvusService::Stub::experimental_async::DropTable(::grpc::ClientContext* c } void MilvusService::Stub::experimental_async::BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_BuildIndex_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_BuildIndex_, context, request, response, std::move(f)); } void MilvusService::Stub::experimental_async::BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_BuildIndex_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_BuildIndex_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_BuildIndex_, context, request, response, reactor); +} + +void MilvusService::Stub::experimental_async::BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_BuildIndex_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* MilvusService::Stub::AsyncBuildIndexRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { @@ -138,11 +170,19 @@ void MilvusService::Stub::experimental_async::BuildIndex(::grpc::ClientContext* } void MilvusService::Stub::experimental_async::InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_InsertVector_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_InsertVector_, context, request, response, std::move(f)); } void MilvusService::Stub::experimental_async::InsertVector(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::VectorIds* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_InsertVector_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_InsertVector_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_InsertVector_, context, request, response, reactor); +} + +void MilvusService::Stub::experimental_async::InsertVector(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::VectorIds* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_InsertVector_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>* MilvusService::Stub::AsyncInsertVectorRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos& request, ::grpc::CompletionQueue* cq) { @@ -190,11 +230,19 @@ void MilvusService::Stub::experimental_async::SearchVectorInFiles(::grpc::Client } void MilvusService::Stub::experimental_async::DescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DescribeTable_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DescribeTable_, context, request, response, std::move(f)); } void MilvusService::Stub::experimental_async::DescribeTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableSchema* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DescribeTable_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DescribeTable_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::DescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_DescribeTable_, context, request, response, reactor); +} + +void MilvusService::Stub::experimental_async::DescribeTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableSchema* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_DescribeTable_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableSchema>* MilvusService::Stub::AsyncDescribeTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { @@ -210,11 +258,19 @@ void MilvusService::Stub::experimental_async::DescribeTable(::grpc::ClientContex } void MilvusService::Stub::experimental_async::GetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_GetTableRowCount_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_GetTableRowCount_, context, request, response, std::move(f)); } void MilvusService::Stub::experimental_async::GetTableRowCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableRowCount* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_GetTableRowCount_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_GetTableRowCount_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::GetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_GetTableRowCount_, context, request, response, reactor); +} + +void MilvusService::Stub::experimental_async::GetTableRowCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableRowCount* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_GetTableRowCount_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableRowCount>* MilvusService::Stub::AsyncGetTableRowCountRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) { @@ -246,11 +302,19 @@ void MilvusService::Stub::experimental_async::ShowTables(::grpc::ClientContext* } void MilvusService::Stub::experimental_async::Ping(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Ping_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Ping_, context, request, response, std::move(f)); } void MilvusService::Stub::experimental_async::Ping(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::ServerStatus* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Ping_, context, request, response, std::move(f)); + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Ping_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::Ping(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Ping_, context, request, response, reactor); +} + +void MilvusService::Stub::experimental_async::Ping(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::ServerStatus* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Ping_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::milvus::grpc::ServerStatus>* MilvusService::Stub::AsyncPingRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) { diff --git a/cpp/src/grpc/gen-milvus/milvus.grpc.pb.h b/cpp/src/grpc/gen-milvus/milvus.grpc.pb.h index 24e79df382..716248d05e 100644 --- a/cpp/src/grpc/gen-milvus/milvus.grpc.pb.h +++ b/cpp/src/grpc/gen-milvus/milvus.grpc.pb.h @@ -11,20 +11,28 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include #include -namespace grpc { +namespace grpc_impl { class CompletionQueue; -class Channel; class ServerCompletionQueue; class ServerContext; +} // namespace grpc_impl + +namespace grpc { +namespace experimental { +template +class MessageAllocator; +} // namespace experimental } // namespace grpc namespace milvus { @@ -221,6 +229,8 @@ class MilvusService final { // virtual void CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response, std::function) = 0; virtual void CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function) = 0; + virtual void CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; // * // @brief Test table existence method // @@ -230,6 +240,8 @@ class MilvusService final { // virtual void HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response, std::function) = 0; virtual void HasTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::BoolReply* response, std::function) = 0; + virtual void HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void HasTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::BoolReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; // * // @brief Delete table method // @@ -239,6 +251,8 @@ class MilvusService final { // virtual void DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, std::function) = 0; virtual void DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function) = 0; + virtual void DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; // * // @brief Build index by table method // @@ -248,6 +262,8 @@ class MilvusService final { // virtual void BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, std::function) = 0; virtual void BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function) = 0; + virtual void BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; // * // @brief Add vector array to table // @@ -259,6 +275,8 @@ class MilvusService final { // @return vector id array virtual void InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response, std::function) = 0; virtual void InsertVector(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::VectorIds* response, std::function) = 0; + virtual void InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void InsertVector(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::VectorIds* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; // * // @brief Query vector // @@ -293,6 +311,8 @@ class MilvusService final { // @return table schema virtual void DescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response, std::function) = 0; virtual void DescribeTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableSchema* response, std::function) = 0; + virtual void DescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void DescribeTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableSchema* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; // * // @brief Get table schema // @@ -303,6 +323,8 @@ class MilvusService final { // @return table schema virtual void GetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response, std::function) = 0; virtual void GetTableRowCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableRowCount* response, std::function) = 0; + virtual void GetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void GetTableRowCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableRowCount* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; // * // @brief List all tables in database // @@ -319,6 +341,8 @@ class MilvusService final { // @return Server status. virtual void Ping(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response, std::function) = 0; virtual void Ping(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::ServerStatus* response, std::function) = 0; + virtual void Ping(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void Ping(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::ServerStatus* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; }; virtual class experimental_async_interface* experimental_async() { return nullptr; } private: @@ -439,23 +463,39 @@ class MilvusService final { public: void CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response, std::function) override; void CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function) override; + void CreateTable(::grpc::ClientContext* context, const ::milvus::grpc::TableSchema* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void CreateTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response, std::function) override; void HasTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::BoolReply* response, std::function) override; + void HasTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::BoolReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void HasTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::BoolReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, std::function) override; void DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function) override; + void DropTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void DropTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, std::function) override; void BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function) override; + void BuildIndex(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void BuildIndex(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response, std::function) override; void InsertVector(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::VectorIds* response, std::function) override; + void InsertVector(::grpc::ClientContext* context, const ::milvus::grpc::InsertInfos* request, ::milvus::grpc::VectorIds* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void InsertVector(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::VectorIds* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void SearchVector(::grpc::ClientContext* context, ::milvus::grpc::SearchVectorInfos* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TopKQueryResult>* reactor) override; void SearchVectorInFiles(::grpc::ClientContext* context, ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TopKQueryResult>* reactor) override; void DescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response, std::function) override; void DescribeTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableSchema* response, std::function) override; + void DescribeTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableSchema* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void DescribeTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableSchema* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void GetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response, std::function) override; void GetTableRowCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableRowCount* response, std::function) override; + void GetTableRowCount(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void GetTableRowCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableRowCount* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void ShowTables(::grpc::ClientContext* context, ::milvus::grpc::Command* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TableName>* reactor) override; void Ping(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response, std::function) override; void Ping(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::ServerStatus* response, std::function) override; + void Ping(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::ServerStatus* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void Ping(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::ServerStatus* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; private: friend class Stub; explicit experimental_async(Stub* stub): stub_(stub) { } @@ -846,6 +886,12 @@ class MilvusService final { return this->CreateTable(context, request, response, controller); })); } + void SetMessageAllocatorFor_CreateTable( + ::grpc::experimental::MessageAllocator< ::milvus::grpc::TableSchema, ::milvus::grpc::Status>* allocator) { + static_cast<::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableSchema, ::milvus::grpc::Status>*>( + ::grpc::Service::experimental().GetHandler(0)) + ->SetMessageAllocator(allocator); + } ~ExperimentalWithCallbackMethod_CreateTable() override { BaseClassMustBeDerivedFromService(this); } @@ -871,6 +917,12 @@ class MilvusService final { return this->HasTable(context, request, response, controller); })); } + void SetMessageAllocatorFor_HasTable( + ::grpc::experimental::MessageAllocator< ::milvus::grpc::TableName, ::milvus::grpc::BoolReply>* allocator) { + static_cast<::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::BoolReply>*>( + ::grpc::Service::experimental().GetHandler(1)) + ->SetMessageAllocator(allocator); + } ~ExperimentalWithCallbackMethod_HasTable() override { BaseClassMustBeDerivedFromService(this); } @@ -896,6 +948,12 @@ class MilvusService final { return this->DropTable(context, request, response, controller); })); } + void SetMessageAllocatorFor_DropTable( + ::grpc::experimental::MessageAllocator< ::milvus::grpc::TableName, ::milvus::grpc::Status>* allocator) { + static_cast<::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::Status>*>( + ::grpc::Service::experimental().GetHandler(2)) + ->SetMessageAllocator(allocator); + } ~ExperimentalWithCallbackMethod_DropTable() override { BaseClassMustBeDerivedFromService(this); } @@ -921,6 +979,12 @@ class MilvusService final { return this->BuildIndex(context, request, response, controller); })); } + void SetMessageAllocatorFor_BuildIndex( + ::grpc::experimental::MessageAllocator< ::milvus::grpc::TableName, ::milvus::grpc::Status>* allocator) { + static_cast<::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::Status>*>( + ::grpc::Service::experimental().GetHandler(3)) + ->SetMessageAllocator(allocator); + } ~ExperimentalWithCallbackMethod_BuildIndex() override { BaseClassMustBeDerivedFromService(this); } @@ -946,6 +1010,12 @@ class MilvusService final { return this->InsertVector(context, request, response, controller); })); } + void SetMessageAllocatorFor_InsertVector( + ::grpc::experimental::MessageAllocator< ::milvus::grpc::InsertInfos, ::milvus::grpc::VectorIds>* allocator) { + static_cast<::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::InsertInfos, ::milvus::grpc::VectorIds>*>( + ::grpc::Service::experimental().GetHandler(4)) + ->SetMessageAllocator(allocator); + } ~ExperimentalWithCallbackMethod_InsertVector() override { BaseClassMustBeDerivedFromService(this); } @@ -1015,6 +1085,12 @@ class MilvusService final { return this->DescribeTable(context, request, response, controller); })); } + void SetMessageAllocatorFor_DescribeTable( + ::grpc::experimental::MessageAllocator< ::milvus::grpc::TableName, ::milvus::grpc::TableSchema>* allocator) { + static_cast<::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::TableSchema>*>( + ::grpc::Service::experimental().GetHandler(7)) + ->SetMessageAllocator(allocator); + } ~ExperimentalWithCallbackMethod_DescribeTable() override { BaseClassMustBeDerivedFromService(this); } @@ -1040,6 +1116,12 @@ class MilvusService final { return this->GetTableRowCount(context, request, response, controller); })); } + void SetMessageAllocatorFor_GetTableRowCount( + ::grpc::experimental::MessageAllocator< ::milvus::grpc::TableName, ::milvus::grpc::TableRowCount>* allocator) { + static_cast<::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::TableName, ::milvus::grpc::TableRowCount>*>( + ::grpc::Service::experimental().GetHandler(8)) + ->SetMessageAllocator(allocator); + } ~ExperimentalWithCallbackMethod_GetTableRowCount() override { BaseClassMustBeDerivedFromService(this); } @@ -1087,6 +1169,12 @@ class MilvusService final { return this->Ping(context, request, response, controller); })); } + void SetMessageAllocatorFor_Ping( + ::grpc::experimental::MessageAllocator< ::milvus::grpc::Command, ::milvus::grpc::ServerStatus>* allocator) { + static_cast<::grpc::internal::CallbackUnaryHandler< ::milvus::grpc::Command, ::milvus::grpc::ServerStatus>*>( + ::grpc::Service::experimental().GetHandler(10)) + ->SetMessageAllocator(allocator); + } ~ExperimentalWithCallbackMethod_Ping() override { BaseClassMustBeDerivedFromService(this); } diff --git a/cpp/src/grpc/gen-milvus/milvus.pb.cc b/cpp/src/grpc/gen-milvus/milvus.pb.cc index a4b770e0e6..8b675484dd 100644 --- a/cpp/src/grpc/gen-milvus/milvus.pb.cc +++ b/cpp/src/grpc/gen-milvus/milvus.pb.cc @@ -8,330 +8,311 @@ #include #include #include -#include +#include #include #include #include #include // @@protoc_insertion_point(includes) #include - -extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_QueryResult_milvus_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Range_milvus_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_RowRecord_milvus_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TableName_milvus_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_SearchVectorInfos_milvus_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_status_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Status_status_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_QueryResult_milvus_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Range_milvus_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_RowRecord_milvus_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_SearchVectorInfos_milvus_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_status_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Status_status_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TableName_milvus_2eproto; namespace milvus { namespace grpc { class TableNameDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _TableName_default_instance_; class TableSchemaDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _TableSchema_default_instance_; class RangeDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Range_default_instance_; class RowRecordDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _RowRecord_default_instance_; class InsertInfosDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _InsertInfos_default_instance_; class VectorIdsDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _VectorIds_default_instance_; class SearchVectorInfosDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _SearchVectorInfos_default_instance_; class SearchVectorInFilesInfosDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _SearchVectorInFilesInfos_default_instance_; class QueryResultDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _QueryResult_default_instance_; class TopKQueryResultDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _TopKQueryResult_default_instance_; class StringReplyDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _StringReply_default_instance_; class BoolReplyDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _BoolReply_default_instance_; class TableRowCountDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _TableRowCount_default_instance_; class CommandDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Command_default_instance_; class ServerStatusDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _ServerStatus_default_instance_; } // namespace grpc } // namespace milvus -static void InitDefaultsTableName_milvus_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::grpc::_TableName_default_instance_; - new (ptr) ::milvus::grpc::TableName(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::grpc::TableName::InitAsDefaultInstance(); -} - -::google::protobuf::internal::SCCInfo<1> scc_info_TableName_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTableName_milvus_2eproto}, { - &scc_info_Status_status_2eproto.base,}}; - -static void InitDefaultsTableSchema_milvus_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::grpc::_TableSchema_default_instance_; - new (ptr) ::milvus::grpc::TableSchema(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::grpc::TableSchema::InitAsDefaultInstance(); -} - -::google::protobuf::internal::SCCInfo<1> scc_info_TableSchema_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTableSchema_milvus_2eproto}, { - &scc_info_TableName_milvus_2eproto.base,}}; - -static void InitDefaultsRange_milvus_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::grpc::_Range_default_instance_; - new (ptr) ::milvus::grpc::Range(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::grpc::Range::InitAsDefaultInstance(); -} - -::google::protobuf::internal::SCCInfo<0> scc_info_Range_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRange_milvus_2eproto}, {}}; - -static void InitDefaultsRowRecord_milvus_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::grpc::_RowRecord_default_instance_; - new (ptr) ::milvus::grpc::RowRecord(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::grpc::RowRecord::InitAsDefaultInstance(); -} - -::google::protobuf::internal::SCCInfo<0> scc_info_RowRecord_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRowRecord_milvus_2eproto}, {}}; - -static void InitDefaultsInsertInfos_milvus_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::grpc::_InsertInfos_default_instance_; - new (ptr) ::milvus::grpc::InsertInfos(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::grpc::InsertInfos::InitAsDefaultInstance(); -} - -::google::protobuf::internal::SCCInfo<1> scc_info_InsertInfos_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsInsertInfos_milvus_2eproto}, { - &scc_info_RowRecord_milvus_2eproto.base,}}; - -static void InitDefaultsVectorIds_milvus_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::grpc::_VectorIds_default_instance_; - new (ptr) ::milvus::grpc::VectorIds(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::grpc::VectorIds::InitAsDefaultInstance(); -} - -::google::protobuf::internal::SCCInfo<1> scc_info_VectorIds_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsVectorIds_milvus_2eproto}, { - &scc_info_Status_status_2eproto.base,}}; - -static void InitDefaultsSearchVectorInfos_milvus_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::grpc::_SearchVectorInfos_default_instance_; - new (ptr) ::milvus::grpc::SearchVectorInfos(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::grpc::SearchVectorInfos::InitAsDefaultInstance(); -} - -::google::protobuf::internal::SCCInfo<2> scc_info_SearchVectorInfos_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsSearchVectorInfos_milvus_2eproto}, { - &scc_info_RowRecord_milvus_2eproto.base, - &scc_info_Range_milvus_2eproto.base,}}; - -static void InitDefaultsSearchVectorInFilesInfos_milvus_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::grpc::_SearchVectorInFilesInfos_default_instance_; - new (ptr) ::milvus::grpc::SearchVectorInFilesInfos(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::grpc::SearchVectorInFilesInfos::InitAsDefaultInstance(); -} - -::google::protobuf::internal::SCCInfo<1> scc_info_SearchVectorInFilesInfos_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsSearchVectorInFilesInfos_milvus_2eproto}, { - &scc_info_SearchVectorInfos_milvus_2eproto.base,}}; - -static void InitDefaultsQueryResult_milvus_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::grpc::_QueryResult_default_instance_; - new (ptr) ::milvus::grpc::QueryResult(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::grpc::QueryResult::InitAsDefaultInstance(); -} - -::google::protobuf::internal::SCCInfo<0> scc_info_QueryResult_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsQueryResult_milvus_2eproto}, {}}; - -static void InitDefaultsTopKQueryResult_milvus_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::grpc::_TopKQueryResult_default_instance_; - new (ptr) ::milvus::grpc::TopKQueryResult(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::grpc::TopKQueryResult::InitAsDefaultInstance(); -} - -::google::protobuf::internal::SCCInfo<2> scc_info_TopKQueryResult_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTopKQueryResult_milvus_2eproto}, { - &scc_info_Status_status_2eproto.base, - &scc_info_QueryResult_milvus_2eproto.base,}}; - -static void InitDefaultsStringReply_milvus_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::grpc::_StringReply_default_instance_; - new (ptr) ::milvus::grpc::StringReply(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::grpc::StringReply::InitAsDefaultInstance(); -} - -::google::protobuf::internal::SCCInfo<1> scc_info_StringReply_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsStringReply_milvus_2eproto}, { - &scc_info_Status_status_2eproto.base,}}; - -static void InitDefaultsBoolReply_milvus_2eproto() { +static void InitDefaultsscc_info_BoolReply_milvus_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::milvus::grpc::_BoolReply_default_instance_; new (ptr) ::milvus::grpc::BoolReply(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } ::milvus::grpc::BoolReply::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<1> scc_info_BoolReply_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsBoolReply_milvus_2eproto}, { +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_BoolReply_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_BoolReply_milvus_2eproto}, { &scc_info_Status_status_2eproto.base,}}; -static void InitDefaultsTableRowCount_milvus_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::grpc::_TableRowCount_default_instance_; - new (ptr) ::milvus::grpc::TableRowCount(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::grpc::TableRowCount::InitAsDefaultInstance(); -} - -::google::protobuf::internal::SCCInfo<1> scc_info_TableRowCount_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTableRowCount_milvus_2eproto}, { - &scc_info_Status_status_2eproto.base,}}; - -static void InitDefaultsCommand_milvus_2eproto() { +static void InitDefaultsscc_info_Command_milvus_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::milvus::grpc::_Command_default_instance_; new (ptr) ::milvus::grpc::Command(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } ::milvus::grpc::Command::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_Command_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCommand_milvus_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Command_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Command_milvus_2eproto}, {}}; -static void InitDefaultsServerStatus_milvus_2eproto() { +static void InitDefaultsscc_info_InsertInfos_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_InsertInfos_default_instance_; + new (ptr) ::milvus::grpc::InsertInfos(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::InsertInfos::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_InsertInfos_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_InsertInfos_milvus_2eproto}, { + &scc_info_RowRecord_milvus_2eproto.base,}}; + +static void InitDefaultsscc_info_QueryResult_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_QueryResult_default_instance_; + new (ptr) ::milvus::grpc::QueryResult(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::QueryResult::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_QueryResult_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_QueryResult_milvus_2eproto}, {}}; + +static void InitDefaultsscc_info_Range_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_Range_default_instance_; + new (ptr) ::milvus::grpc::Range(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::Range::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Range_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Range_milvus_2eproto}, {}}; + +static void InitDefaultsscc_info_RowRecord_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_RowRecord_default_instance_; + new (ptr) ::milvus::grpc::RowRecord(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::RowRecord::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_RowRecord_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_RowRecord_milvus_2eproto}, {}}; + +static void InitDefaultsscc_info_SearchVectorInFilesInfos_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_SearchVectorInFilesInfos_default_instance_; + new (ptr) ::milvus::grpc::SearchVectorInFilesInfos(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::SearchVectorInFilesInfos::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SearchVectorInFilesInfos_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_SearchVectorInFilesInfos_milvus_2eproto}, { + &scc_info_SearchVectorInfos_milvus_2eproto.base,}}; + +static void InitDefaultsscc_info_SearchVectorInfos_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_SearchVectorInfos_default_instance_; + new (ptr) ::milvus::grpc::SearchVectorInfos(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::SearchVectorInfos::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_SearchVectorInfos_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_SearchVectorInfos_milvus_2eproto}, { + &scc_info_RowRecord_milvus_2eproto.base, + &scc_info_Range_milvus_2eproto.base,}}; + +static void InitDefaultsscc_info_ServerStatus_milvus_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::milvus::grpc::_ServerStatus_default_instance_; new (ptr) ::milvus::grpc::ServerStatus(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } ::milvus::grpc::ServerStatus::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<1> scc_info_ServerStatus_milvus_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsServerStatus_milvus_2eproto}, { +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ServerStatus_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ServerStatus_milvus_2eproto}, { &scc_info_Status_status_2eproto.base,}}; -void InitDefaults_milvus_2eproto() { - ::google::protobuf::internal::InitSCC(&scc_info_TableName_milvus_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_TableSchema_milvus_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_Range_milvus_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_RowRecord_milvus_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_InsertInfos_milvus_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_VectorIds_milvus_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_SearchVectorInfos_milvus_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_SearchVectorInFilesInfos_milvus_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_QueryResult_milvus_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_TopKQueryResult_milvus_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_StringReply_milvus_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_BoolReply_milvus_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_TableRowCount_milvus_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_Command_milvus_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_ServerStatus_milvus_2eproto.base); +static void InitDefaultsscc_info_StringReply_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_StringReply_default_instance_; + new (ptr) ::milvus::grpc::StringReply(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::StringReply::InitAsDefaultInstance(); } -::google::protobuf::Metadata file_level_metadata_milvus_2eproto[15]; -constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_milvus_2eproto = nullptr; -constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_milvus_2eproto = nullptr; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_StringReply_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_StringReply_milvus_2eproto}, { + &scc_info_Status_status_2eproto.base,}}; -const ::google::protobuf::uint32 TableStruct_milvus_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { +static void InitDefaultsscc_info_TableName_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_TableName_default_instance_; + new (ptr) ::milvus::grpc::TableName(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::TableName::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TableName_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_TableName_milvus_2eproto}, { + &scc_info_Status_status_2eproto.base,}}; + +static void InitDefaultsscc_info_TableRowCount_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_TableRowCount_default_instance_; + new (ptr) ::milvus::grpc::TableRowCount(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::TableRowCount::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TableRowCount_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_TableRowCount_milvus_2eproto}, { + &scc_info_Status_status_2eproto.base,}}; + +static void InitDefaultsscc_info_TableSchema_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_TableSchema_default_instance_; + new (ptr) ::milvus::grpc::TableSchema(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::TableSchema::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TableSchema_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_TableSchema_milvus_2eproto}, { + &scc_info_TableName_milvus_2eproto.base,}}; + +static void InitDefaultsscc_info_TopKQueryResult_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_TopKQueryResult_default_instance_; + new (ptr) ::milvus::grpc::TopKQueryResult(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::TopKQueryResult::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_TopKQueryResult_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_TopKQueryResult_milvus_2eproto}, { + &scc_info_Status_status_2eproto.base, + &scc_info_QueryResult_milvus_2eproto.base,}}; + +static void InitDefaultsscc_info_VectorIds_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_VectorIds_default_instance_; + new (ptr) ::milvus::grpc::VectorIds(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::VectorIds::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_VectorIds_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_VectorIds_milvus_2eproto}, { + &scc_info_Status_status_2eproto.base,}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_milvus_2eproto[15]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_milvus_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_milvus_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_milvus_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::grpc::TableName, _internal_metadata_), ~0u, // no _extensions_ @@ -440,7 +421,7 @@ const ::google::protobuf::uint32 TableStruct_milvus_2eproto::offsets[] PROTOBUF_ PROTOBUF_FIELD_OFFSET(::milvus::grpc::ServerStatus, status_), PROTOBUF_FIELD_OFFSET(::milvus::grpc::ServerStatus, info_), }; -static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(::milvus::grpc::TableName)}, { 7, -1, sizeof(::milvus::grpc::TableSchema)}, { 16, -1, sizeof(::milvus::grpc::Range)}, @@ -458,28 +439,22 @@ static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SE { 100, -1, sizeof(::milvus::grpc::ServerStatus)}, }; -static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::milvus::grpc::_TableName_default_instance_), - reinterpret_cast(&::milvus::grpc::_TableSchema_default_instance_), - reinterpret_cast(&::milvus::grpc::_Range_default_instance_), - reinterpret_cast(&::milvus::grpc::_RowRecord_default_instance_), - reinterpret_cast(&::milvus::grpc::_InsertInfos_default_instance_), - reinterpret_cast(&::milvus::grpc::_VectorIds_default_instance_), - reinterpret_cast(&::milvus::grpc::_SearchVectorInfos_default_instance_), - reinterpret_cast(&::milvus::grpc::_SearchVectorInFilesInfos_default_instance_), - reinterpret_cast(&::milvus::grpc::_QueryResult_default_instance_), - reinterpret_cast(&::milvus::grpc::_TopKQueryResult_default_instance_), - reinterpret_cast(&::milvus::grpc::_StringReply_default_instance_), - reinterpret_cast(&::milvus::grpc::_BoolReply_default_instance_), - reinterpret_cast(&::milvus::grpc::_TableRowCount_default_instance_), - reinterpret_cast(&::milvus::grpc::_Command_default_instance_), - reinterpret_cast(&::milvus::grpc::_ServerStatus_default_instance_), -}; - -::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_milvus_2eproto = { - {}, AddDescriptors_milvus_2eproto, "milvus.proto", schemas, - file_default_instances, TableStruct_milvus_2eproto::offsets, - file_level_metadata_milvus_2eproto, 15, file_level_enum_descriptors_milvus_2eproto, file_level_service_descriptors_milvus_2eproto, +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::milvus::grpc::_TableName_default_instance_), + reinterpret_cast(&::milvus::grpc::_TableSchema_default_instance_), + reinterpret_cast(&::milvus::grpc::_Range_default_instance_), + reinterpret_cast(&::milvus::grpc::_RowRecord_default_instance_), + reinterpret_cast(&::milvus::grpc::_InsertInfos_default_instance_), + reinterpret_cast(&::milvus::grpc::_VectorIds_default_instance_), + reinterpret_cast(&::milvus::grpc::_SearchVectorInfos_default_instance_), + reinterpret_cast(&::milvus::grpc::_SearchVectorInFilesInfos_default_instance_), + reinterpret_cast(&::milvus::grpc::_QueryResult_default_instance_), + reinterpret_cast(&::milvus::grpc::_TopKQueryResult_default_instance_), + reinterpret_cast(&::milvus::grpc::_StringReply_default_instance_), + reinterpret_cast(&::milvus::grpc::_BoolReply_default_instance_), + reinterpret_cast(&::milvus::grpc::_TableRowCount_default_instance_), + reinterpret_cast(&::milvus::grpc::_Command_default_instance_), + reinterpret_cast(&::milvus::grpc::_ServerStatus_default_instance_), }; const char descriptor_table_protodef_milvus_2eproto[] = @@ -534,22 +509,37 @@ const char descriptor_table_protodef_milvus_2eproto[] = "TableName\"\0000\001\0229\n\004Ping\022\024.milvus.grpc.Comm" "and\032\031.milvus.grpc.ServerStatus\"\000b\006proto3" ; -::google::protobuf::internal::DescriptorTable descriptor_table_milvus_2eproto = { - false, InitDefaults_milvus_2eproto, - descriptor_table_protodef_milvus_2eproto, - "milvus.proto", &assign_descriptors_table_milvus_2eproto, 2000, +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_milvus_2eproto_deps[1] = { + &::descriptor_table_status_2eproto, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_milvus_2eproto_sccs[15] = { + &scc_info_BoolReply_milvus_2eproto.base, + &scc_info_Command_milvus_2eproto.base, + &scc_info_InsertInfos_milvus_2eproto.base, + &scc_info_QueryResult_milvus_2eproto.base, + &scc_info_Range_milvus_2eproto.base, + &scc_info_RowRecord_milvus_2eproto.base, + &scc_info_SearchVectorInFilesInfos_milvus_2eproto.base, + &scc_info_SearchVectorInfos_milvus_2eproto.base, + &scc_info_ServerStatus_milvus_2eproto.base, + &scc_info_StringReply_milvus_2eproto.base, + &scc_info_TableName_milvus_2eproto.base, + &scc_info_TableRowCount_milvus_2eproto.base, + &scc_info_TableSchema_milvus_2eproto.base, + &scc_info_TopKQueryResult_milvus_2eproto.base, + &scc_info_VectorIds_milvus_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_milvus_2eproto_once; +static bool descriptor_table_milvus_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_milvus_2eproto = { + &descriptor_table_milvus_2eproto_initialized, descriptor_table_protodef_milvus_2eproto, "milvus.proto", 2000, + &descriptor_table_milvus_2eproto_once, descriptor_table_milvus_2eproto_sccs, descriptor_table_milvus_2eproto_deps, 15, 1, + schemas, file_default_instances, TableStruct_milvus_2eproto::offsets, + file_level_metadata_milvus_2eproto, 15, file_level_enum_descriptors_milvus_2eproto, file_level_service_descriptors_milvus_2eproto, }; -void AddDescriptors_milvus_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[1] = - { - ::AddDescriptors_status_2eproto, - }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_milvus_2eproto, deps, 1); -} - // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_milvus_2eproto = []() { AddDescriptors_milvus_2eproto(); return true; }(); +static bool dynamic_init_dummy_milvus_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_milvus_2eproto), true); namespace milvus { namespace grpc { @@ -580,17 +570,17 @@ const int TableName::kTableNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 TableName::TableName() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.TableName) } TableName::TableName(const TableName& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - table_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + table_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.table_name().size() > 0) { - table_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.table_name_); + table_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.table_name_); } if (from.has_status()) { status_ = new ::milvus::grpc::Status(*from.status_); @@ -601,9 +591,8 @@ TableName::TableName(const TableName& from) } void TableName::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_TableName_milvus_2eproto.base); - table_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TableName_milvus_2eproto.base); + table_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); status_ = nullptr; } @@ -613,7 +602,7 @@ TableName::~TableName() { } void TableName::SharedDtor() { - table_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + table_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete status_; } @@ -621,18 +610,18 @@ void TableName::SetCachedSize(int size) const { _cached_size_.Set(size); } const TableName& TableName::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_TableName_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TableName_milvus_2eproto.base); return *internal_default_instance(); } void TableName::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.TableName) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - table_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + table_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { delete status_; } @@ -641,85 +630,61 @@ void TableName::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* TableName::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* TableName::_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) { // .milvus.grpc.Status status = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::grpc::Status::_InternalParse; - object = msg->mutable_status(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(mutable_status(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // string table_name = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("milvus.grpc.TableName.table_name"); - object = msg->mutable_table_name(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_table_name(), ptr, ctx, "milvus.grpc.TableName.table_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool TableName::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.TableName) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .milvus.grpc.Status status = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_status())); } else { goto handle_unusual; @@ -729,12 +694,12 @@ bool TableName::MergePartialFromCodedStream( // string table_name = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_table_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->table_name().data(), static_cast(this->table_name().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.grpc.TableName.table_name")); } else { goto handle_unusual; @@ -747,7 +712,7 @@ bool TableName::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -764,60 +729,60 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void TableName::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.TableName) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::status(this), output); } // string table_name = 2; if (this->table_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->table_name().data(), static_cast(this->table_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.TableName.table_name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->table_name(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.TableName) } -::google::protobuf::uint8* TableName::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* TableName::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.TableName) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 1, HasBitSetters::status(this), target); } // string table_name = 2; if (this->table_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->table_name().data(), static_cast(this->table_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.TableName.table_name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 2, this->table_name(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.TableName) @@ -830,41 +795,41 @@ size_t TableName::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string table_name = 2; if (this->table_name().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->table_name()); } // .milvus.grpc.Status status = 1; if (this->has_status()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *status_); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void TableName::MergeFrom(const ::google::protobuf::Message& from) { +void TableName::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.TableName) GOOGLE_DCHECK_NE(&from, this); const TableName* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.TableName) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.TableName) MergeFrom(*source); @@ -875,19 +840,19 @@ void TableName::MergeFrom(const TableName& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.TableName) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.table_name().size() > 0) { - table_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.table_name_); + table_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.table_name_); } if (from.has_status()) { mutable_status()->::milvus::grpc::Status::MergeFrom(from.status()); } } -void TableName::CopyFrom(const ::google::protobuf::Message& from) { +void TableName::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.TableName) if (&from == this) return; Clear(); @@ -912,14 +877,13 @@ void TableName::Swap(TableName* other) { void TableName::InternalSwap(TableName* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - table_name_.Swap(&other->table_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + table_name_.Swap(&other->table_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(status_, other->status_); } -::google::protobuf::Metadata TableName::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata TableName::GetMetadata() const { + return GetMetadataStatic(); } @@ -946,12 +910,12 @@ const int TableSchema::kStoreRawVectorFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 TableSchema::TableSchema() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.TableSchema) } TableSchema::TableSchema(const TableSchema& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_table_name()) { @@ -966,8 +930,7 @@ TableSchema::TableSchema(const TableSchema& from) } void TableSchema::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_TableSchema_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TableSchema_milvus_2eproto.base); ::memset(&table_name_, 0, static_cast( reinterpret_cast(&store_raw_vector_) - reinterpret_cast(&table_name_)) + sizeof(store_raw_vector_)); @@ -986,14 +949,14 @@ void TableSchema::SetCachedSize(int size) const { _cached_size_.Set(size); } const TableSchema& TableSchema::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_TableSchema_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TableSchema_milvus_2eproto.base); return *internal_default_instance(); } void TableSchema::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.TableSchema) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1008,86 +971,75 @@ void TableSchema::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* TableSchema::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* TableSchema::_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) { // .milvus.grpc.TableName table_name = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::grpc::TableName::_InternalParse; - object = msg->mutable_table_name(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(mutable_table_name(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // int32 index_type = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - msg->set_index_type(::google::protobuf::internal::ReadVarint(&ptr)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + index_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // int64 dimension = 3; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; - msg->set_dimension(::google::protobuf::internal::ReadVarint(&ptr)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + dimension_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // bool store_raw_vector = 4; - case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; - msg->set_store_raw_vector(::google::protobuf::internal::ReadVarint(&ptr)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + store_raw_vector_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool TableSchema::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.TableSchema) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .milvus.grpc.TableName table_name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_table_name())); } else { goto handle_unusual; @@ -1097,10 +1049,10 @@ bool TableSchema::MergePartialFromCodedStream( // int32 index_type = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &index_type_))); } else { goto handle_unusual; @@ -1110,10 +1062,10 @@ bool TableSchema::MergePartialFromCodedStream( // int64 dimension = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( input, &dimension_))); } else { goto handle_unusual; @@ -1123,10 +1075,10 @@ bool TableSchema::MergePartialFromCodedStream( // bool store_raw_vector = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &store_raw_vector_))); } else { goto handle_unusual; @@ -1139,7 +1091,7 @@ bool TableSchema::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -1156,69 +1108,69 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void TableSchema::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.TableSchema) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.TableName table_name = 1; if (this->has_table_name()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::table_name(this), output); } // int32 index_type = 2; if (this->index_type() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->index_type(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->index_type(), output); } // int64 dimension = 3; if (this->dimension() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->dimension(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->dimension(), output); } // bool store_raw_vector = 4; if (this->store_raw_vector() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->store_raw_vector(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->store_raw_vector(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.TableSchema) } -::google::protobuf::uint8* TableSchema::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* TableSchema::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.TableSchema) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.TableName table_name = 1; if (this->has_table_name()) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 1, HasBitSetters::table_name(this), target); } // int32 index_type = 2; if (this->index_type() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->index_type(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->index_type(), target); } // int64 dimension = 3; if (this->dimension() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->dimension(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->dimension(), target); } // bool store_raw_vector = 4; if (this->store_raw_vector() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->store_raw_vector(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->store_raw_vector(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.TableSchema) @@ -1231,31 +1183,31 @@ size_t TableSchema::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // .milvus.grpc.TableName table_name = 1; if (this->has_table_name()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *table_name_); } // int64 dimension = 3; if (this->dimension() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( this->dimension()); } // int32 index_type = 2; if (this->index_type() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->index_type()); } @@ -1264,20 +1216,20 @@ size_t TableSchema::ByteSizeLong() const { total_size += 1 + 1; } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void TableSchema::MergeFrom(const ::google::protobuf::Message& from) { +void TableSchema::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.TableSchema) GOOGLE_DCHECK_NE(&from, this); const TableSchema* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.TableSchema) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.TableSchema) MergeFrom(*source); @@ -1288,7 +1240,7 @@ void TableSchema::MergeFrom(const TableSchema& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.TableSchema) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.has_table_name()) { @@ -1305,7 +1257,7 @@ void TableSchema::MergeFrom(const TableSchema& from) { } } -void TableSchema::CopyFrom(const ::google::protobuf::Message& from) { +void TableSchema::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.TableSchema) if (&from == this) return; Clear(); @@ -1336,9 +1288,8 @@ void TableSchema::InternalSwap(TableSchema* other) { swap(store_raw_vector_, other->store_raw_vector_); } -::google::protobuf::Metadata TableSchema::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata TableSchema::GetMetadata() const { + return GetMetadataStatic(); } @@ -1356,30 +1307,29 @@ const int Range::kEndValueFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Range::Range() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.Range) } Range::Range(const Range& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - start_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + start_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.start_value().size() > 0) { - start_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.start_value_); + start_value_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.start_value_); } - end_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + end_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.end_value().size() > 0) { - end_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.end_value_); + end_value_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.end_value_); } // @@protoc_insertion_point(copy_constructor:milvus.grpc.Range) } void Range::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_Range_milvus_2eproto.base); - start_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - end_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Range_milvus_2eproto.base); + start_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + end_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } Range::~Range() { @@ -1388,117 +1338,90 @@ Range::~Range() { } void Range::SharedDtor() { - start_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - end_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + start_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + end_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void Range::SetCachedSize(int size) const { _cached_size_.Set(size); } const Range& Range::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Range_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Range_milvus_2eproto.base); return *internal_default_instance(); } void Range::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.Range) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - start_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - end_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + start_value_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + end_value_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Range::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* Range::_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 start_value = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("milvus.grpc.Range.start_value"); - object = msg->mutable_start_value(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_start_value(), ptr, ctx, "milvus.grpc.Range.start_value"); + CHK_(ptr); + } else goto handle_unusual; + continue; // string end_value = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("milvus.grpc.Range.end_value"); - object = msg->mutable_end_value(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_end_value(), ptr, ctx, "milvus.grpc.Range.end_value"); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool Range::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.Range) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string start_value = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_start_value())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->start_value().data(), static_cast(this->start_value().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.grpc.Range.start_value")); } else { goto handle_unusual; @@ -1508,12 +1431,12 @@ bool Range::MergePartialFromCodedStream( // string end_value = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_end_value())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->end_value().data(), static_cast(this->end_value().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.grpc.Range.end_value")); } else { goto handle_unusual; @@ -1526,7 +1449,7 @@ bool Range::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -1543,68 +1466,68 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Range::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.Range) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string start_value = 1; if (this->start_value().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->start_value().data(), static_cast(this->start_value().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.Range.start_value"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->start_value(), output); } // string end_value = 2; if (this->end_value().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->end_value().data(), static_cast(this->end_value().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.Range.end_value"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->end_value(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.Range) } -::google::protobuf::uint8* Range::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Range::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.Range) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string start_value = 1; if (this->start_value().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->start_value().data(), static_cast(this->start_value().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.Range.start_value"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->start_value(), target); } // string end_value = 2; if (this->end_value().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->end_value().data(), static_cast(this->end_value().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.Range.end_value"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 2, this->end_value(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.Range) @@ -1617,41 +1540,41 @@ size_t Range::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string start_value = 1; if (this->start_value().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->start_value()); } // string end_value = 2; if (this->end_value().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->end_value()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Range::MergeFrom(const ::google::protobuf::Message& from) { +void Range::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.Range) GOOGLE_DCHECK_NE(&from, this); const Range* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.Range) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.Range) MergeFrom(*source); @@ -1662,20 +1585,20 @@ void Range::MergeFrom(const Range& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.Range) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.start_value().size() > 0) { - start_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.start_value_); + start_value_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.start_value_); } if (from.end_value().size() > 0) { - end_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.end_value_); + end_value_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.end_value_); } } -void Range::CopyFrom(const ::google::protobuf::Message& from) { +void Range::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.Range) if (&from == this) return; Clear(); @@ -1700,15 +1623,14 @@ void Range::Swap(Range* other) { void Range::InternalSwap(Range* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - start_value_.Swap(&other->start_value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + start_value_.Swap(&other->start_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - end_value_.Swap(&other->end_value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + end_value_.Swap(&other->end_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata Range::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata Range::GetMetadata() const { + return GetMetadataStatic(); } @@ -1725,12 +1647,12 @@ const int RowRecord::kVectorDataFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 RowRecord::RowRecord() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.RowRecord) } RowRecord::RowRecord(const RowRecord& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), vector_data_(from.vector_data_) { _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -1752,14 +1674,14 @@ void RowRecord::SetCachedSize(int size) const { _cached_size_.Set(size); } const RowRecord& RowRecord::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_RowRecord_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RowRecord_milvus_2eproto.base); return *internal_default_instance(); } void RowRecord::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.RowRecord) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1768,77 +1690,62 @@ void RowRecord::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* RowRecord::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* RowRecord::_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) { // repeated float vector_data = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == 10) { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::google::protobuf::internal::PackedFloatParser; - object = msg->mutable_vector_data(); - if (size > end - ptr) goto len_delim_till_end; - auto newend = ptr + size; - if (size) ptr = parser_till_end(ptr, newend, object, ctx); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend); - break; - } else if (static_cast<::google::protobuf::uint8>(tag) != 13) goto handle_unusual; - do { - msg->add_vector_data(::google::protobuf::io::UnalignedLoad(ptr)); + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(mutable_vector_data(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13) { + add_vector_data(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(float); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 13 && (ptr += 1)); - break; - } + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool RowRecord::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.RowRecord) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated float vector_data = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< - float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + float, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_FLOAT>( input, this->mutable_vector_data()))); - } else if (static_cast< ::google::protobuf::uint8>(tag) == (13 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (13 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + float, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_FLOAT>( 1, 10u, input, this->mutable_vector_data()))); } else { goto handle_unusual; @@ -1851,7 +1758,7 @@ bool RowRecord::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -1868,48 +1775,48 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void RowRecord::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.RowRecord) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated float vector_data = 1; if (this->vector_data_size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(1, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); output->WriteVarint32(_vector_data_cached_byte_size_.load( std::memory_order_relaxed)); - ::google::protobuf::internal::WireFormatLite::WriteFloatArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatArray( this->vector_data().data(), this->vector_data_size(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.RowRecord) } -::google::protobuf::uint8* RowRecord::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* RowRecord::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.RowRecord) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated float vector_data = 1; if (this->vector_data_size() > 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( 1, - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); - target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( _vector_data_cached_byte_size_.load(std::memory_order_relaxed), target); - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: WriteFloatNoTagToArray(this->vector_data_, target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.RowRecord) @@ -1922,10 +1829,10 @@ size_t RowRecord::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1935,29 +1842,29 @@ size_t RowRecord::ByteSizeLong() const { size_t data_size = 4UL * count; if (data_size > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - static_cast<::google::protobuf::int32>(data_size)); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); } - int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); _vector_data_cached_byte_size_.store(cached_size, std::memory_order_relaxed); total_size += data_size; } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void RowRecord::MergeFrom(const ::google::protobuf::Message& from) { +void RowRecord::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.RowRecord) GOOGLE_DCHECK_NE(&from, this); const RowRecord* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.RowRecord) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.RowRecord) MergeFrom(*source); @@ -1968,13 +1875,13 @@ void RowRecord::MergeFrom(const RowRecord& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.RowRecord) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; vector_data_.MergeFrom(from.vector_data_); } -void RowRecord::CopyFrom(const ::google::protobuf::Message& from) { +void RowRecord::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.RowRecord) if (&from == this) return; Clear(); @@ -2002,9 +1909,8 @@ void RowRecord::InternalSwap(RowRecord* other) { vector_data_.InternalSwap(&other->vector_data_); } -::google::protobuf::Metadata RowRecord::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata RowRecord::GetMetadata() const { + return GetMetadataStatic(); } @@ -2022,26 +1928,25 @@ const int InsertInfos::kRowRecordArrayFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 InsertInfos::InsertInfos() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.InsertInfos) } InsertInfos::InsertInfos(const InsertInfos& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), row_record_array_(from.row_record_array_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - table_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + table_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.table_name().size() > 0) { - table_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.table_name_); + table_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.table_name_); } // @@protoc_insertion_point(copy_constructor:milvus.grpc.InsertInfos) } void InsertInfos::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_InsertInfos_milvus_2eproto.base); - table_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_InsertInfos_milvus_2eproto.base); + table_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } InsertInfos::~InsertInfos() { @@ -2050,116 +1955,94 @@ InsertInfos::~InsertInfos() { } void InsertInfos::SharedDtor() { - table_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + table_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void InsertInfos::SetCachedSize(int size) const { _cached_size_.Set(size); } const InsertInfos& InsertInfos::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_InsertInfos_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_InsertInfos_milvus_2eproto.base); return *internal_default_instance(); } void InsertInfos::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.InsertInfos) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; row_record_array_.Clear(); - table_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + table_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* InsertInfos::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* InsertInfos::_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 table_name = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("milvus.grpc.InsertInfos.table_name"); - object = msg->mutable_table_name(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_table_name(), ptr, ctx, "milvus.grpc.InsertInfos.table_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; // repeated .milvus.grpc.RowRecord row_record_array = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - do { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::grpc::RowRecord::_InternalParse; - object = msg->add_row_record_array(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_row_record_array(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool InsertInfos::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.InsertInfos) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string table_name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_table_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->table_name().data(), static_cast(this->table_name().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.grpc.InsertInfos.table_name")); } else { goto handle_unusual; @@ -2169,8 +2052,8 @@ bool InsertInfos::MergePartialFromCodedStream( // repeated .milvus.grpc.RowRecord row_record_array = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_row_record_array())); } else { goto handle_unusual; @@ -2183,7 +2066,7 @@ bool InsertInfos::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -2200,64 +2083,64 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void InsertInfos::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.InsertInfos) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string table_name = 1; if (this->table_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->table_name().data(), static_cast(this->table_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.InsertInfos.table_name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->table_name(), output); } // repeated .milvus.grpc.RowRecord row_record_array = 2; for (unsigned int i = 0, n = static_cast(this->row_record_array_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->row_record_array(static_cast(i)), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.InsertInfos) } -::google::protobuf::uint8* InsertInfos::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* InsertInfos::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.InsertInfos) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string table_name = 1; if (this->table_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->table_name().data(), static_cast(this->table_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.InsertInfos.table_name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->table_name(), target); } // repeated .milvus.grpc.RowRecord row_record_array = 2; for (unsigned int i = 0, n = static_cast(this->row_record_array_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->row_record_array(static_cast(i)), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.InsertInfos) @@ -2270,10 +2153,10 @@ size_t InsertInfos::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2283,7 +2166,7 @@ size_t InsertInfos::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->row_record_array(static_cast(i))); } } @@ -2291,24 +2174,24 @@ size_t InsertInfos::ByteSizeLong() const { // string table_name = 1; if (this->table_name().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->table_name()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void InsertInfos::MergeFrom(const ::google::protobuf::Message& from) { +void InsertInfos::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.InsertInfos) GOOGLE_DCHECK_NE(&from, this); const InsertInfos* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.InsertInfos) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.InsertInfos) MergeFrom(*source); @@ -2319,17 +2202,17 @@ void InsertInfos::MergeFrom(const InsertInfos& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.InsertInfos) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; row_record_array_.MergeFrom(from.row_record_array_); if (from.table_name().size() > 0) { - table_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.table_name_); + table_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.table_name_); } } -void InsertInfos::CopyFrom(const ::google::protobuf::Message& from) { +void InsertInfos::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.InsertInfos) if (&from == this) return; Clear(); @@ -2355,13 +2238,12 @@ void InsertInfos::InternalSwap(InsertInfos* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); CastToBase(&row_record_array_)->InternalSwap(CastToBase(&other->row_record_array_)); - table_name_.Swap(&other->table_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + table_name_.Swap(&other->table_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata InsertInfos::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata InsertInfos::GetMetadata() const { + return GetMetadataStatic(); } @@ -2392,12 +2274,12 @@ const int VectorIds::kVectorIdArrayFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 VectorIds::VectorIds() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.VectorIds) } VectorIds::VectorIds(const VectorIds& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), vector_id_array_(from.vector_id_array_) { _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -2410,8 +2292,7 @@ VectorIds::VectorIds(const VectorIds& from) } void VectorIds::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_VectorIds_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_VectorIds_milvus_2eproto.base); status_ = nullptr; } @@ -2428,14 +2309,14 @@ void VectorIds::SetCachedSize(int size) const { _cached_size_.Set(size); } const VectorIds& VectorIds::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_VectorIds_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_VectorIds_milvus_2eproto.base); return *internal_default_instance(); } void VectorIds::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.VectorIds) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2448,85 +2329,64 @@ void VectorIds::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* VectorIds::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* VectorIds::_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) { // .milvus.grpc.Status status = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::grpc::Status::_InternalParse; - object = msg->mutable_status(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(mutable_status(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // repeated int64 vector_id_array = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == 18) { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::google::protobuf::internal::PackedInt64Parser; - object = msg->mutable_vector_id_array(); - if (size > end - ptr) goto len_delim_till_end; - auto newend = ptr + size; - if (size) ptr = parser_till_end(ptr, newend, object, ctx); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend); - break; - } else if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - do { - msg->add_vector_id_array(::google::protobuf::internal::ReadVarint(&ptr)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 16 && (ptr += 1)); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(mutable_vector_id_array(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) { + add_vector_id_array(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool VectorIds::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.VectorIds) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .milvus.grpc.Status status = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_status())); } else { goto handle_unusual; @@ -2536,13 +2396,13 @@ bool VectorIds::MergePartialFromCodedStream( // repeated int64 vector_id_array = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< - ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + 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_vector_id_array()))); - } else if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + } 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, 18u, input, this->mutable_vector_id_array()))); } else { goto handle_unusual; @@ -2555,7 +2415,7 @@ bool VectorIds::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -2572,63 +2432,63 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void VectorIds::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.VectorIds) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::status(this), output); } // repeated int64 vector_id_array = 2; if (this->vector_id_array_size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(2, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); output->WriteVarint32(_vector_id_array_cached_byte_size_.load( std::memory_order_relaxed)); } for (int i = 0, n = this->vector_id_array_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64NoTag( this->vector_id_array(i), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.VectorIds) } -::google::protobuf::uint8* VectorIds::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* VectorIds::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.VectorIds) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 1, HasBitSetters::status(this), target); } // repeated int64 vector_id_array = 2; if (this->vector_id_array_size() > 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( 2, - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); - target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( _vector_id_array_cached_byte_size_.load(std::memory_order_relaxed), target); - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: WriteInt64NoTagToArray(this->vector_id_array_, target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.VectorIds) @@ -2641,23 +2501,23 @@ size_t VectorIds::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated int64 vector_id_array = 2; { - size_t data_size = ::google::protobuf::internal::WireFormatLite:: + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: Int64Size(this->vector_id_array_); if (data_size > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - static_cast<::google::protobuf::int32>(data_size)); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); } - int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); _vector_id_array_cached_byte_size_.store(cached_size, std::memory_order_relaxed); total_size += data_size; @@ -2666,24 +2526,24 @@ size_t VectorIds::ByteSizeLong() const { // .milvus.grpc.Status status = 1; if (this->has_status()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *status_); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void VectorIds::MergeFrom(const ::google::protobuf::Message& from) { +void VectorIds::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.VectorIds) GOOGLE_DCHECK_NE(&from, this); const VectorIds* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.VectorIds) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.VectorIds) MergeFrom(*source); @@ -2694,7 +2554,7 @@ void VectorIds::MergeFrom(const VectorIds& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.VectorIds) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; vector_id_array_.MergeFrom(from.vector_id_array_); @@ -2703,7 +2563,7 @@ void VectorIds::MergeFrom(const VectorIds& from) { } } -void VectorIds::CopyFrom(const ::google::protobuf::Message& from) { +void VectorIds::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.VectorIds) if (&from == this) return; Clear(); @@ -2732,9 +2592,8 @@ void VectorIds::InternalSwap(VectorIds* other) { swap(status_, other->status_); } -::google::protobuf::Metadata VectorIds::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata VectorIds::GetMetadata() const { + return GetMetadataStatic(); } @@ -2754,28 +2613,27 @@ const int SearchVectorInfos::kTopkFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SearchVectorInfos::SearchVectorInfos() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.SearchVectorInfos) } SearchVectorInfos::SearchVectorInfos(const SearchVectorInfos& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), query_record_array_(from.query_record_array_), query_range_array_(from.query_range_array_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - table_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + table_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.table_name().size() > 0) { - table_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.table_name_); + table_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.table_name_); } topk_ = from.topk_; // @@protoc_insertion_point(copy_constructor:milvus.grpc.SearchVectorInfos) } void SearchVectorInfos::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_SearchVectorInfos_milvus_2eproto.base); - table_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SearchVectorInfos_milvus_2eproto.base); + table_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); topk_ = PROTOBUF_LONGLONG(0); } @@ -2785,141 +2643,115 @@ SearchVectorInfos::~SearchVectorInfos() { } void SearchVectorInfos::SharedDtor() { - table_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + table_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void SearchVectorInfos::SetCachedSize(int size) const { _cached_size_.Set(size); } const SearchVectorInfos& SearchVectorInfos::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_SearchVectorInfos_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SearchVectorInfos_milvus_2eproto.base); return *internal_default_instance(); } void SearchVectorInfos::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.SearchVectorInfos) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; query_record_array_.Clear(); query_range_array_.Clear(); - table_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + table_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); topk_ = PROTOBUF_LONGLONG(0); _internal_metadata_.Clear(); } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* SearchVectorInfos::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* SearchVectorInfos::_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 table_name = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("milvus.grpc.SearchVectorInfos.table_name"); - object = msg->mutable_table_name(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_table_name(), ptr, ctx, "milvus.grpc.SearchVectorInfos.table_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; // repeated .milvus.grpc.RowRecord query_record_array = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - do { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::grpc::RowRecord::_InternalParse; - object = msg->add_query_record_array(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_query_record_array(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } else goto handle_unusual; + continue; // repeated .milvus.grpc.Range query_range_array = 3; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; - do { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::grpc::Range::_InternalParse; - object = msg->add_query_range_array(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 26 && (ptr += 1)); - break; - } + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_query_range_array(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); + } else goto handle_unusual; + continue; // int64 topk = 4; - case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; - msg->set_topk(::google::protobuf::internal::ReadVarint(&ptr)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + topk_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool SearchVectorInfos::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.SearchVectorInfos) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string table_name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_table_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->table_name().data(), static_cast(this->table_name().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.grpc.SearchVectorInfos.table_name")); } else { goto handle_unusual; @@ -2929,8 +2761,8 @@ bool SearchVectorInfos::MergePartialFromCodedStream( // repeated .milvus.grpc.RowRecord query_record_array = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_query_record_array())); } else { goto handle_unusual; @@ -2940,8 +2772,8 @@ bool SearchVectorInfos::MergePartialFromCodedStream( // repeated .milvus.grpc.Range query_range_array = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_query_range_array())); } else { goto handle_unusual; @@ -2951,10 +2783,10 @@ bool SearchVectorInfos::MergePartialFromCodedStream( // int64 topk = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( input, &topk_))); } else { goto handle_unusual; @@ -2967,7 +2799,7 @@ bool SearchVectorInfos::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -2984,25 +2816,25 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SearchVectorInfos::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.SearchVectorInfos) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string table_name = 1; if (this->table_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->table_name().data(), static_cast(this->table_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.SearchVectorInfos.table_name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->table_name(), output); } // repeated .milvus.grpc.RowRecord query_record_array = 2; for (unsigned int i = 0, n = static_cast(this->query_record_array_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->query_record_array(static_cast(i)), output); @@ -3011,7 +2843,7 @@ void SearchVectorInfos::SerializeWithCachedSizes( // repeated .milvus.grpc.Range query_range_array = 3; for (unsigned int i = 0, n = static_cast(this->query_range_array_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 3, this->query_range_array(static_cast(i)), output); @@ -3019,37 +2851,37 @@ void SearchVectorInfos::SerializeWithCachedSizes( // int64 topk = 4; if (this->topk() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->topk(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(4, this->topk(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.SearchVectorInfos) } -::google::protobuf::uint8* SearchVectorInfos::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* SearchVectorInfos::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.SearchVectorInfos) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string table_name = 1; if (this->table_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->table_name().data(), static_cast(this->table_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.SearchVectorInfos.table_name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->table_name(), target); } // repeated .milvus.grpc.RowRecord query_record_array = 2; for (unsigned int i = 0, n = static_cast(this->query_record_array_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->query_record_array(static_cast(i)), target); } @@ -3057,18 +2889,18 @@ void SearchVectorInfos::SerializeWithCachedSizes( // repeated .milvus.grpc.Range query_range_array = 3; for (unsigned int i = 0, n = static_cast(this->query_range_array_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 3, this->query_range_array(static_cast(i)), target); } // int64 topk = 4; if (this->topk() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->topk(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->topk(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.SearchVectorInfos) @@ -3081,10 +2913,10 @@ size_t SearchVectorInfos::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3094,7 +2926,7 @@ size_t SearchVectorInfos::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->query_record_array(static_cast(i))); } } @@ -3105,7 +2937,7 @@ size_t SearchVectorInfos::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->query_range_array(static_cast(i))); } } @@ -3113,31 +2945,31 @@ size_t SearchVectorInfos::ByteSizeLong() const { // string table_name = 1; if (this->table_name().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->table_name()); } // int64 topk = 4; if (this->topk() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( this->topk()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void SearchVectorInfos::MergeFrom(const ::google::protobuf::Message& from) { +void SearchVectorInfos::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.SearchVectorInfos) GOOGLE_DCHECK_NE(&from, this); const SearchVectorInfos* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.SearchVectorInfos) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.SearchVectorInfos) MergeFrom(*source); @@ -3148,21 +2980,21 @@ void SearchVectorInfos::MergeFrom(const SearchVectorInfos& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.SearchVectorInfos) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; query_record_array_.MergeFrom(from.query_record_array_); query_range_array_.MergeFrom(from.query_range_array_); if (from.table_name().size() > 0) { - table_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.table_name_); + table_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.table_name_); } if (from.topk() != 0) { set_topk(from.topk()); } } -void SearchVectorInfos::CopyFrom(const ::google::protobuf::Message& from) { +void SearchVectorInfos::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.SearchVectorInfos) if (&from == this) return; Clear(); @@ -3189,14 +3021,13 @@ void SearchVectorInfos::InternalSwap(SearchVectorInfos* other) { _internal_metadata_.Swap(&other->_internal_metadata_); CastToBase(&query_record_array_)->InternalSwap(CastToBase(&other->query_record_array_)); CastToBase(&query_range_array_)->InternalSwap(CastToBase(&other->query_range_array_)); - table_name_.Swap(&other->table_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + table_name_.Swap(&other->table_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(topk_, other->topk_); } -::google::protobuf::Metadata SearchVectorInfos::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata SearchVectorInfos::GetMetadata() const { + return GetMetadataStatic(); } @@ -3221,12 +3052,12 @@ const int SearchVectorInFilesInfos::kSearchVectorInfosFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SearchVectorInFilesInfos::SearchVectorInFilesInfos() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.SearchVectorInFilesInfos) } SearchVectorInFilesInfos::SearchVectorInFilesInfos(const SearchVectorInFilesInfos& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), file_id_array_(from.file_id_array_) { _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -3239,8 +3070,7 @@ SearchVectorInFilesInfos::SearchVectorInFilesInfos(const SearchVectorInFilesInfo } void SearchVectorInFilesInfos::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_SearchVectorInFilesInfos_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SearchVectorInFilesInfos_milvus_2eproto.base); search_vector_infos_ = nullptr; } @@ -3257,14 +3087,14 @@ void SearchVectorInFilesInfos::SetCachedSize(int size) const { _cached_size_.Set(size); } const SearchVectorInFilesInfos& SearchVectorInFilesInfos::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_SearchVectorInFilesInfos_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SearchVectorInFilesInfos_milvus_2eproto.base); return *internal_default_instance(); } void SearchVectorInFilesInfos::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.SearchVectorInFilesInfos) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3277,93 +3107,71 @@ void SearchVectorInFilesInfos::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* SearchVectorInFilesInfos::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* SearchVectorInFilesInfos::_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) { // repeated string file_id_array = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - do { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("milvus.grpc.SearchVectorInFilesInfos.file_id_array"); - object = msg->add_file_id_array(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_file_id_array(), ptr, ctx, "milvus.grpc.SearchVectorInFilesInfos.file_id_array"); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); + } else goto handle_unusual; + continue; // .milvus.grpc.SearchVectorInfos search_vector_infos = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::grpc::SearchVectorInfos::_InternalParse; - object = msg->mutable_search_vector_infos(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(mutable_search_vector_infos(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool SearchVectorInFilesInfos::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.SearchVectorInFilesInfos) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated string file_id_array = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->add_file_id_array())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->file_id_array(this->file_id_array_size() - 1).data(), static_cast(this->file_id_array(this->file_id_array_size() - 1).length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.grpc.SearchVectorInFilesInfos.file_id_array")); } else { goto handle_unusual; @@ -3373,8 +3181,8 @@ bool SearchVectorInFilesInfos::MergePartialFromCodedStream( // .milvus.grpc.SearchVectorInfos search_vector_infos = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_search_vector_infos())); } else { goto handle_unusual; @@ -3387,7 +3195,7 @@ bool SearchVectorInFilesInfos::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -3404,59 +3212,59 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SearchVectorInFilesInfos::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.SearchVectorInFilesInfos) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated string file_id_array = 1; for (int i = 0, n = this->file_id_array_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->file_id_array(i).data(), static_cast(this->file_id_array(i).length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.SearchVectorInFilesInfos.file_id_array"); - ::google::protobuf::internal::WireFormatLite::WriteString( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( 1, this->file_id_array(i), output); } // .milvus.grpc.SearchVectorInfos search_vector_infos = 2; if (this->has_search_vector_infos()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 2, HasBitSetters::search_vector_infos(this), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.SearchVectorInFilesInfos) } -::google::protobuf::uint8* SearchVectorInFilesInfos::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* SearchVectorInFilesInfos::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.SearchVectorInFilesInfos) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated string file_id_array = 1; for (int i = 0, n = this->file_id_array_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->file_id_array(i).data(), static_cast(this->file_id_array(i).length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.SearchVectorInFilesInfos.file_id_array"); - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: WriteStringToArray(1, this->file_id_array(i), target); } // .milvus.grpc.SearchVectorInfos search_vector_infos = 2; if (this->has_search_vector_infos()) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 2, HasBitSetters::search_vector_infos(this), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.SearchVectorInFilesInfos) @@ -3469,42 +3277,42 @@ size_t SearchVectorInFilesInfos::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated string file_id_array = 1; total_size += 1 * - ::google::protobuf::internal::FromIntSize(this->file_id_array_size()); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->file_id_array_size()); for (int i = 0, n = this->file_id_array_size(); i < n; i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->file_id_array(i)); } // .milvus.grpc.SearchVectorInfos search_vector_infos = 2; if (this->has_search_vector_infos()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *search_vector_infos_); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void SearchVectorInFilesInfos::MergeFrom(const ::google::protobuf::Message& from) { +void SearchVectorInFilesInfos::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.SearchVectorInFilesInfos) GOOGLE_DCHECK_NE(&from, this); const SearchVectorInFilesInfos* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.SearchVectorInFilesInfos) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.SearchVectorInFilesInfos) MergeFrom(*source); @@ -3515,7 +3323,7 @@ void SearchVectorInFilesInfos::MergeFrom(const SearchVectorInFilesInfos& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.SearchVectorInFilesInfos) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; file_id_array_.MergeFrom(from.file_id_array_); @@ -3524,7 +3332,7 @@ void SearchVectorInFilesInfos::MergeFrom(const SearchVectorInFilesInfos& from) { } } -void SearchVectorInFilesInfos::CopyFrom(const ::google::protobuf::Message& from) { +void SearchVectorInFilesInfos::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.SearchVectorInFilesInfos) if (&from == this) return; Clear(); @@ -3553,9 +3361,8 @@ void SearchVectorInFilesInfos::InternalSwap(SearchVectorInFilesInfos* other) { swap(search_vector_infos_, other->search_vector_infos_); } -::google::protobuf::Metadata SearchVectorInFilesInfos::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata SearchVectorInFilesInfos::GetMetadata() const { + return GetMetadataStatic(); } @@ -3573,12 +3380,12 @@ const int QueryResult::kDistanceFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 QueryResult::QueryResult() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.QueryResult) } QueryResult::QueryResult(const QueryResult& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&id_, &from.id_, @@ -3605,14 +3412,14 @@ void QueryResult::SetCachedSize(int size) const { _cached_size_.Set(size); } const QueryResult& QueryResult::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_QueryResult_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_QueryResult_milvus_2eproto.base); return *internal_default_instance(); } void QueryResult::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.QueryResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3623,65 +3430,63 @@ void QueryResult::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* QueryResult::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* QueryResult::_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) { // int64 id = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - msg->set_id(::google::protobuf::internal::ReadVarint(&ptr)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // double distance = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 17) goto handle_unusual; - msg->set_distance(::google::protobuf::io::UnalignedLoad(ptr)); - ptr += sizeof(double); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 17)) { + distance_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(double); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + 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 QueryResult::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.QueryResult) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // int64 id = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( input, &id_))); } else { goto handle_unusual; @@ -3691,10 +3496,10 @@ bool QueryResult::MergePartialFromCodedStream( // double distance = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (17 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (17 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( input, &distance_))); } else { goto handle_unusual; @@ -3707,7 +3512,7 @@ bool QueryResult::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -3724,46 +3529,46 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void QueryResult::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.QueryResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 id = 1; if (this->id() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->id(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->id(), output); } // double distance = 2; - if (this->distance() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->distance(), output); + if (!(this->distance() <= 0 && this->distance() >= 0)) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(2, this->distance(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.QueryResult) } -::google::protobuf::uint8* QueryResult::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* QueryResult::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.QueryResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 id = 1; if (this->id() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->id(), target); } // double distance = 2; - if (this->distance() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->distance(), target); + if (!(this->distance() <= 0 && this->distance() >= 0)) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->distance(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.QueryResult) @@ -3776,39 +3581,39 @@ size_t QueryResult::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // int64 id = 1; if (this->id() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( this->id()); } // double distance = 2; - if (this->distance() != 0) { + if (!(this->distance() <= 0 && this->distance() >= 0)) { total_size += 1 + 8; } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void QueryResult::MergeFrom(const ::google::protobuf::Message& from) { +void QueryResult::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.QueryResult) GOOGLE_DCHECK_NE(&from, this); const QueryResult* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.QueryResult) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.QueryResult) MergeFrom(*source); @@ -3819,18 +3624,18 @@ void QueryResult::MergeFrom(const QueryResult& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.QueryResult) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.id() != 0) { set_id(from.id()); } - if (from.distance() != 0) { + if (!(from.distance() <= 0 && from.distance() >= 0)) { set_distance(from.distance()); } } -void QueryResult::CopyFrom(const ::google::protobuf::Message& from) { +void QueryResult::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.QueryResult) if (&from == this) return; Clear(); @@ -3859,9 +3664,8 @@ void QueryResult::InternalSwap(QueryResult* other) { swap(distance_, other->distance_); } -::google::protobuf::Metadata QueryResult::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata QueryResult::GetMetadata() const { + return GetMetadataStatic(); } @@ -3892,12 +3696,12 @@ const int TopKQueryResult::kQueryResultArraysFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 TopKQueryResult::TopKQueryResult() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.TopKQueryResult) } TopKQueryResult::TopKQueryResult(const TopKQueryResult& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), query_result_arrays_(from.query_result_arrays_) { _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -3910,8 +3714,7 @@ TopKQueryResult::TopKQueryResult(const TopKQueryResult& from) } void TopKQueryResult::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_TopKQueryResult_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TopKQueryResult_milvus_2eproto.base); status_ = nullptr; } @@ -3928,14 +3731,14 @@ void TopKQueryResult::SetCachedSize(int size) const { _cached_size_.Set(size); } const TopKQueryResult& TopKQueryResult::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_TopKQueryResult_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TopKQueryResult_milvus_2eproto.base); return *internal_default_instance(); } void TopKQueryResult::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.TopKQueryResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3948,81 +3751,66 @@ void TopKQueryResult::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* TopKQueryResult::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* TopKQueryResult::_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) { // .milvus.grpc.Status status = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::grpc::Status::_InternalParse; - object = msg->mutable_status(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(mutable_status(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // repeated .milvus.grpc.QueryResult query_result_arrays = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - do { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::grpc::QueryResult::_InternalParse; - object = msg->add_query_result_arrays(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_query_result_arrays(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool TopKQueryResult::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.TopKQueryResult) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .milvus.grpc.Status status = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_status())); } else { goto handle_unusual; @@ -4032,8 +3820,8 @@ bool TopKQueryResult::MergePartialFromCodedStream( // repeated .milvus.grpc.QueryResult query_result_arrays = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_query_result_arrays())); } else { goto handle_unusual; @@ -4046,7 +3834,7 @@ bool TopKQueryResult::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -4063,42 +3851,42 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void TopKQueryResult::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.TopKQueryResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::status(this), output); } // repeated .milvus.grpc.QueryResult query_result_arrays = 2; for (unsigned int i = 0, n = static_cast(this->query_result_arrays_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->query_result_arrays(static_cast(i)), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.TopKQueryResult) } -::google::protobuf::uint8* TopKQueryResult::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* TopKQueryResult::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.TopKQueryResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 1, HasBitSetters::status(this), target); } @@ -4106,13 +3894,13 @@ void TopKQueryResult::SerializeWithCachedSizes( // repeated .milvus.grpc.QueryResult query_result_arrays = 2; for (unsigned int i = 0, n = static_cast(this->query_result_arrays_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->query_result_arrays(static_cast(i)), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.TopKQueryResult) @@ -4125,10 +3913,10 @@ size_t TopKQueryResult::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -4138,7 +3926,7 @@ size_t TopKQueryResult::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->query_result_arrays(static_cast(i))); } } @@ -4146,24 +3934,24 @@ size_t TopKQueryResult::ByteSizeLong() const { // .milvus.grpc.Status status = 1; if (this->has_status()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *status_); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void TopKQueryResult::MergeFrom(const ::google::protobuf::Message& from) { +void TopKQueryResult::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.TopKQueryResult) GOOGLE_DCHECK_NE(&from, this); const TopKQueryResult* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.TopKQueryResult) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.TopKQueryResult) MergeFrom(*source); @@ -4174,7 +3962,7 @@ void TopKQueryResult::MergeFrom(const TopKQueryResult& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.TopKQueryResult) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; query_result_arrays_.MergeFrom(from.query_result_arrays_); @@ -4183,7 +3971,7 @@ void TopKQueryResult::MergeFrom(const TopKQueryResult& from) { } } -void TopKQueryResult::CopyFrom(const ::google::protobuf::Message& from) { +void TopKQueryResult::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.TopKQueryResult) if (&from == this) return; Clear(); @@ -4212,9 +4000,8 @@ void TopKQueryResult::InternalSwap(TopKQueryResult* other) { swap(status_, other->status_); } -::google::protobuf::Metadata TopKQueryResult::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata TopKQueryResult::GetMetadata() const { + return GetMetadataStatic(); } @@ -4245,17 +4032,17 @@ const int StringReply::kStringReplyFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 StringReply::StringReply() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.StringReply) } StringReply::StringReply(const StringReply& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - string_reply_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + string_reply_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.string_reply().size() > 0) { - string_reply_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string_reply_); + string_reply_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.string_reply_); } if (from.has_status()) { status_ = new ::milvus::grpc::Status(*from.status_); @@ -4266,9 +4053,8 @@ StringReply::StringReply(const StringReply& from) } void StringReply::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_StringReply_milvus_2eproto.base); - string_reply_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_StringReply_milvus_2eproto.base); + string_reply_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); status_ = nullptr; } @@ -4278,7 +4064,7 @@ StringReply::~StringReply() { } void StringReply::SharedDtor() { - string_reply_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + string_reply_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete status_; } @@ -4286,18 +4072,18 @@ void StringReply::SetCachedSize(int size) const { _cached_size_.Set(size); } const StringReply& StringReply::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_StringReply_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_StringReply_milvus_2eproto.base); return *internal_default_instance(); } void StringReply::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.StringReply) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - string_reply_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + string_reply_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { delete status_; } @@ -4306,85 +4092,61 @@ void StringReply::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* StringReply::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* StringReply::_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) { // .milvus.grpc.Status status = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::grpc::Status::_InternalParse; - object = msg->mutable_status(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(mutable_status(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // string string_reply = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("milvus.grpc.StringReply.string_reply"); - object = msg->mutable_string_reply(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_string_reply(), ptr, ctx, "milvus.grpc.StringReply.string_reply"); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool StringReply::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.StringReply) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .milvus.grpc.Status status = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_status())); } else { goto handle_unusual; @@ -4394,12 +4156,12 @@ bool StringReply::MergePartialFromCodedStream( // string string_reply = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_string_reply())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->string_reply().data(), static_cast(this->string_reply().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.grpc.StringReply.string_reply")); } else { goto handle_unusual; @@ -4412,7 +4174,7 @@ bool StringReply::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -4429,60 +4191,60 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void StringReply::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.StringReply) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::status(this), output); } // string string_reply = 2; if (this->string_reply().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->string_reply().data(), static_cast(this->string_reply().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.StringReply.string_reply"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->string_reply(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.StringReply) } -::google::protobuf::uint8* StringReply::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* StringReply::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.StringReply) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 1, HasBitSetters::status(this), target); } // string string_reply = 2; if (this->string_reply().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->string_reply().data(), static_cast(this->string_reply().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.StringReply.string_reply"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 2, this->string_reply(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.StringReply) @@ -4495,41 +4257,41 @@ size_t StringReply::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string string_reply = 2; if (this->string_reply().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->string_reply()); } // .milvus.grpc.Status status = 1; if (this->has_status()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *status_); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void StringReply::MergeFrom(const ::google::protobuf::Message& from) { +void StringReply::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.StringReply) GOOGLE_DCHECK_NE(&from, this); const StringReply* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.StringReply) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.StringReply) MergeFrom(*source); @@ -4540,19 +4302,19 @@ void StringReply::MergeFrom(const StringReply& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.StringReply) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.string_reply().size() > 0) { - string_reply_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string_reply_); + string_reply_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.string_reply_); } if (from.has_status()) { mutable_status()->::milvus::grpc::Status::MergeFrom(from.status()); } } -void StringReply::CopyFrom(const ::google::protobuf::Message& from) { +void StringReply::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.StringReply) if (&from == this) return; Clear(); @@ -4577,14 +4339,13 @@ void StringReply::Swap(StringReply* other) { void StringReply::InternalSwap(StringReply* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - string_reply_.Swap(&other->string_reply_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + string_reply_.Swap(&other->string_reply_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(status_, other->status_); } -::google::protobuf::Metadata StringReply::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata StringReply::GetMetadata() const { + return GetMetadataStatic(); } @@ -4615,12 +4376,12 @@ const int BoolReply::kBoolReplyFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 BoolReply::BoolReply() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.BoolReply) } BoolReply::BoolReply(const BoolReply& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_status()) { @@ -4633,8 +4394,7 @@ BoolReply::BoolReply(const BoolReply& from) } void BoolReply::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_BoolReply_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BoolReply_milvus_2eproto.base); ::memset(&status_, 0, static_cast( reinterpret_cast(&bool_reply_) - reinterpret_cast(&status_)) + sizeof(bool_reply_)); @@ -4653,14 +4413,14 @@ void BoolReply::SetCachedSize(int size) const { _cached_size_.Set(size); } const BoolReply& BoolReply::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_BoolReply_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BoolReply_milvus_2eproto.base); return *internal_default_instance(); } void BoolReply::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.BoolReply) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -4673,72 +4433,61 @@ void BoolReply::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* BoolReply::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* BoolReply::_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) { // .milvus.grpc.Status status = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::grpc::Status::_InternalParse; - object = msg->mutable_status(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(mutable_status(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // bool bool_reply = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - msg->set_bool_reply(::google::protobuf::internal::ReadVarint(&ptr)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + bool_reply_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool BoolReply::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.BoolReply) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .milvus.grpc.Status status = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_status())); } else { goto handle_unusual; @@ -4748,10 +4497,10 @@ bool BoolReply::MergePartialFromCodedStream( // bool bool_reply = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &bool_reply_))); } else { goto handle_unusual; @@ -4764,7 +4513,7 @@ bool BoolReply::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -4781,49 +4530,49 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void BoolReply::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.BoolReply) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::status(this), output); } // bool bool_reply = 2; if (this->bool_reply() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->bool_reply(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(2, this->bool_reply(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.BoolReply) } -::google::protobuf::uint8* BoolReply::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* BoolReply::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.BoolReply) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 1, HasBitSetters::status(this), target); } // bool bool_reply = 2; if (this->bool_reply() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->bool_reply(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->bool_reply(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.BoolReply) @@ -4836,17 +4585,17 @@ size_t BoolReply::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *status_); } @@ -4855,20 +4604,20 @@ size_t BoolReply::ByteSizeLong() const { total_size += 1 + 1; } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void BoolReply::MergeFrom(const ::google::protobuf::Message& from) { +void BoolReply::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.BoolReply) GOOGLE_DCHECK_NE(&from, this); const BoolReply* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.BoolReply) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.BoolReply) MergeFrom(*source); @@ -4879,7 +4628,7 @@ void BoolReply::MergeFrom(const BoolReply& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.BoolReply) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.has_status()) { @@ -4890,7 +4639,7 @@ void BoolReply::MergeFrom(const BoolReply& from) { } } -void BoolReply::CopyFrom(const ::google::protobuf::Message& from) { +void BoolReply::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.BoolReply) if (&from == this) return; Clear(); @@ -4919,9 +4668,8 @@ void BoolReply::InternalSwap(BoolReply* other) { swap(bool_reply_, other->bool_reply_); } -::google::protobuf::Metadata BoolReply::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata BoolReply::GetMetadata() const { + return GetMetadataStatic(); } @@ -4952,12 +4700,12 @@ const int TableRowCount::kTableRowCountFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 TableRowCount::TableRowCount() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.TableRowCount) } TableRowCount::TableRowCount(const TableRowCount& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_status()) { @@ -4970,8 +4718,7 @@ TableRowCount::TableRowCount(const TableRowCount& from) } void TableRowCount::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_TableRowCount_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TableRowCount_milvus_2eproto.base); ::memset(&status_, 0, static_cast( reinterpret_cast(&table_row_count_) - reinterpret_cast(&status_)) + sizeof(table_row_count_)); @@ -4990,14 +4737,14 @@ void TableRowCount::SetCachedSize(int size) const { _cached_size_.Set(size); } const TableRowCount& TableRowCount::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_TableRowCount_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TableRowCount_milvus_2eproto.base); return *internal_default_instance(); } void TableRowCount::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.TableRowCount) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -5010,72 +4757,61 @@ void TableRowCount::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* TableRowCount::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* TableRowCount::_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) { // .milvus.grpc.Status status = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::grpc::Status::_InternalParse; - object = msg->mutable_status(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(mutable_status(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // int64 table_row_count = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - msg->set_table_row_count(::google::protobuf::internal::ReadVarint(&ptr)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + table_row_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool TableRowCount::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.TableRowCount) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .milvus.grpc.Status status = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_status())); } else { goto handle_unusual; @@ -5085,10 +4821,10 @@ bool TableRowCount::MergePartialFromCodedStream( // int64 table_row_count = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( input, &table_row_count_))); } else { goto handle_unusual; @@ -5101,7 +4837,7 @@ bool TableRowCount::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -5118,49 +4854,49 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void TableRowCount::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.TableRowCount) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::status(this), output); } // int64 table_row_count = 2; if (this->table_row_count() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->table_row_count(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->table_row_count(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.TableRowCount) } -::google::protobuf::uint8* TableRowCount::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* TableRowCount::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.TableRowCount) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 1, HasBitSetters::status(this), target); } // int64 table_row_count = 2; if (this->table_row_count() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->table_row_count(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->table_row_count(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.TableRowCount) @@ -5173,41 +4909,41 @@ size_t TableRowCount::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *status_); } // int64 table_row_count = 2; if (this->table_row_count() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( this->table_row_count()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void TableRowCount::MergeFrom(const ::google::protobuf::Message& from) { +void TableRowCount::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.TableRowCount) GOOGLE_DCHECK_NE(&from, this); const TableRowCount* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.TableRowCount) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.TableRowCount) MergeFrom(*source); @@ -5218,7 +4954,7 @@ void TableRowCount::MergeFrom(const TableRowCount& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.TableRowCount) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.has_status()) { @@ -5229,7 +4965,7 @@ void TableRowCount::MergeFrom(const TableRowCount& from) { } } -void TableRowCount::CopyFrom(const ::google::protobuf::Message& from) { +void TableRowCount::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.TableRowCount) if (&from == this) return; Clear(); @@ -5258,9 +4994,8 @@ void TableRowCount::InternalSwap(TableRowCount* other) { swap(table_row_count_, other->table_row_count_); } -::google::protobuf::Metadata TableRowCount::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata TableRowCount::GetMetadata() const { + return GetMetadataStatic(); } @@ -5277,25 +5012,24 @@ const int Command::kCmdFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Command::Command() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.Command) } Command::Command(const Command& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - cmd_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + cmd_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.cmd().size() > 0) { - cmd_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cmd_); + cmd_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.cmd_); } // @@protoc_insertion_point(copy_constructor:milvus.grpc.Command) } void Command::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_Command_milvus_2eproto.base); - cmd_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Command_milvus_2eproto.base); + cmd_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } Command::~Command() { @@ -5304,99 +5038,81 @@ Command::~Command() { } void Command::SharedDtor() { - cmd_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + cmd_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void Command::SetCachedSize(int size) const { _cached_size_.Set(size); } const Command& Command::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Command_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Command_milvus_2eproto.base); return *internal_default_instance(); } void Command::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.Command) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - cmd_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + cmd_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Command::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* Command::_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 cmd = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("milvus.grpc.Command.cmd"); - object = msg->mutable_cmd(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_cmd(), ptr, ctx, "milvus.grpc.Command.cmd"); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool Command::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.Command) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string cmd = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_cmd())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->cmd().data(), static_cast(this->cmd().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.grpc.Command.cmd")); } else { goto handle_unusual; @@ -5409,7 +5125,7 @@ bool Command::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -5426,47 +5142,47 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Command::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.Command) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string cmd = 1; if (this->cmd().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->cmd().data(), static_cast(this->cmd().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.Command.cmd"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->cmd(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.Command) } -::google::protobuf::uint8* Command::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Command::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.Command) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string cmd = 1; if (this->cmd().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->cmd().data(), static_cast(this->cmd().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.Command.cmd"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->cmd(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.Command) @@ -5479,34 +5195,34 @@ size_t Command::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string cmd = 1; if (this->cmd().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->cmd()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Command::MergeFrom(const ::google::protobuf::Message& from) { +void Command::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.Command) GOOGLE_DCHECK_NE(&from, this); const Command* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.Command) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.Command) MergeFrom(*source); @@ -5517,16 +5233,16 @@ void Command::MergeFrom(const Command& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.Command) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.cmd().size() > 0) { - cmd_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cmd_); + cmd_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.cmd_); } } -void Command::CopyFrom(const ::google::protobuf::Message& from) { +void Command::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.Command) if (&from == this) return; Clear(); @@ -5551,13 +5267,12 @@ void Command::Swap(Command* other) { void Command::InternalSwap(Command* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - cmd_.Swap(&other->cmd_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + cmd_.Swap(&other->cmd_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata Command::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata Command::GetMetadata() const { + return GetMetadataStatic(); } @@ -5588,17 +5303,17 @@ const int ServerStatus::kInfoFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ServerStatus::ServerStatus() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.ServerStatus) } ServerStatus::ServerStatus(const ServerStatus& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - info_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + info_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.info().size() > 0) { - info_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.info_); + info_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.info_); } if (from.has_status()) { status_ = new ::milvus::grpc::Status(*from.status_); @@ -5609,9 +5324,8 @@ ServerStatus::ServerStatus(const ServerStatus& from) } void ServerStatus::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_ServerStatus_milvus_2eproto.base); - info_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ServerStatus_milvus_2eproto.base); + info_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); status_ = nullptr; } @@ -5621,7 +5335,7 @@ ServerStatus::~ServerStatus() { } void ServerStatus::SharedDtor() { - info_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + info_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete status_; } @@ -5629,18 +5343,18 @@ void ServerStatus::SetCachedSize(int size) const { _cached_size_.Set(size); } const ServerStatus& ServerStatus::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_ServerStatus_milvus_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ServerStatus_milvus_2eproto.base); return *internal_default_instance(); } void ServerStatus::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.ServerStatus) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - info_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + info_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { delete status_; } @@ -5649,85 +5363,61 @@ void ServerStatus::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* ServerStatus::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* ServerStatus::_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) { // .milvus.grpc.Status status = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::milvus::grpc::Status::_InternalParse; - object = msg->mutable_status(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(mutable_status(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // string info = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("milvus.grpc.ServerStatus.info"); - object = msg->mutable_info(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_info(), ptr, ctx, "milvus.grpc.ServerStatus.info"); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool ServerStatus::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.ServerStatus) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .milvus.grpc.Status status = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_status())); } else { goto handle_unusual; @@ -5737,12 +5427,12 @@ bool ServerStatus::MergePartialFromCodedStream( // string info = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_info())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->info().data(), static_cast(this->info().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.grpc.ServerStatus.info")); } else { goto handle_unusual; @@ -5755,7 +5445,7 @@ bool ServerStatus::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -5772,60 +5462,60 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void ServerStatus::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.ServerStatus) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 1, HasBitSetters::status(this), output); } // string info = 2; if (this->info().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->info().data(), static_cast(this->info().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.ServerStatus.info"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->info(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.ServerStatus) } -::google::protobuf::uint8* ServerStatus::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* ServerStatus::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.ServerStatus) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.Status status = 1; if (this->has_status()) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 1, HasBitSetters::status(this), target); } // string info = 2; if (this->info().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->info().data(), static_cast(this->info().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.ServerStatus.info"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 2, this->info(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.ServerStatus) @@ -5838,41 +5528,41 @@ size_t ServerStatus::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string info = 2; if (this->info().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->info()); } // .milvus.grpc.Status status = 1; if (this->has_status()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *status_); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void ServerStatus::MergeFrom(const ::google::protobuf::Message& from) { +void ServerStatus::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.ServerStatus) GOOGLE_DCHECK_NE(&from, this); const ServerStatus* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.ServerStatus) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.ServerStatus) MergeFrom(*source); @@ -5883,19 +5573,19 @@ void ServerStatus::MergeFrom(const ServerStatus& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.ServerStatus) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.info().size() > 0) { - info_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.info_); + info_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.info_); } if (from.has_status()) { mutable_status()->::milvus::grpc::Status::MergeFrom(from.status()); } } -void ServerStatus::CopyFrom(const ::google::protobuf::Message& from) { +void ServerStatus::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.ServerStatus) if (&from == this) return; Clear(); @@ -5920,22 +5610,20 @@ void ServerStatus::Swap(ServerStatus* other) { void ServerStatus::InternalSwap(ServerStatus* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - info_.Swap(&other->info_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + info_.Swap(&other->info_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(status_, other->status_); } -::google::protobuf::Metadata ServerStatus::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_milvus_2eproto); - return ::file_level_metadata_milvus_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata ServerStatus::GetMetadata() const { + return GetMetadataStatic(); } // @@protoc_insertion_point(namespace_scope) } // namespace grpc } // namespace milvus -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN template<> PROTOBUF_NOINLINE ::milvus::grpc::TableName* Arena::CreateMaybeMessage< ::milvus::grpc::TableName >(Arena* arena) { return Arena::CreateInternal< ::milvus::grpc::TableName >(arena); } @@ -5981,8 +5669,7 @@ template<> PROTOBUF_NOINLINE ::milvus::grpc::Command* Arena::CreateMaybeMessage< template<> PROTOBUF_NOINLINE ::milvus::grpc::ServerStatus* Arena::CreateMaybeMessage< ::milvus::grpc::ServerStatus >(Arena* arena) { return Arena::CreateInternal< ::milvus::grpc::ServerStatus >(arena); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include diff --git a/cpp/src/grpc/gen-milvus/milvus.pb.h b/cpp/src/grpc/gen-milvus/milvus.pb.h index d391ed3344..f794c5909d 100644 --- a/cpp/src/grpc/gen-milvus/milvus.pb.h +++ b/cpp/src/grpc/gen-milvus/milvus.pb.h @@ -1,19 +1,19 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: milvus.proto -#ifndef PROTOBUF_INCLUDED_milvus_2eproto -#define PROTOBUF_INCLUDED_milvus_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_milvus_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_milvus_2eproto #include #include #include -#if PROTOBUF_VERSION < 3007000 +#if PROTOBUF_VERSION < 3008000 #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 3007000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3008000 < 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. @@ -27,6 +27,7 @@ #include #include #include +#include #include #include // IWYU pragma: export #include // IWYU pragma: export @@ -35,20 +36,25 @@ // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_milvus_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct TableStruct_milvus_2eproto { - static const ::google::protobuf::internal::ParseTableField entries[] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[15] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[15] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::FieldMetadata field_metadata[]; - static const ::google::protobuf::internal::SerializationTable serialization_table[]; - static const ::google::protobuf::uint32 offsets[]; + 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[]; }; -void AddDescriptors_milvus_2eproto(); +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_milvus_2eproto; namespace milvus { namespace grpc { class BoolReply; @@ -98,8 +104,7 @@ class VectorIdsDefaultTypeInternal; extern VectorIdsDefaultTypeInternal _VectorIds_default_instance_; } // namespace grpc } // namespace milvus -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN template<> ::milvus::grpc::BoolReply* Arena::CreateMaybeMessage<::milvus::grpc::BoolReply>(Arena*); template<> ::milvus::grpc::Command* Arena::CreateMaybeMessage<::milvus::grpc::Command>(Arena*); template<> ::milvus::grpc::InsertInfos* Arena::CreateMaybeMessage<::milvus::grpc::InsertInfos>(Arena*); @@ -115,31 +120,28 @@ template<> ::milvus::grpc::TableRowCount* Arena::CreateMaybeMessage<::milvus::gr template<> ::milvus::grpc::TableSchema* Arena::CreateMaybeMessage<::milvus::grpc::TableSchema>(Arena*); template<> ::milvus::grpc::TopKQueryResult* Arena::CreateMaybeMessage<::milvus::grpc::TopKQueryResult>(Arena*); template<> ::milvus::grpc::VectorIds* Arena::CreateMaybeMessage<::milvus::grpc::VectorIds>(Arena*); -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE namespace milvus { namespace grpc { // =================================================================== -class TableName final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TableName) */ { +class TableName : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TableName) */ { public: TableName(); virtual ~TableName(); TableName(const TableName& from); - - inline TableName& operator=(const TableName& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 TableName(TableName&& from) noexcept : TableName() { *this = ::std::move(from); } + inline TableName& operator=(const TableName& from) { + CopyFrom(from); + return *this; + } inline TableName& operator=(TableName&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -148,9 +150,15 @@ class TableName final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 TableName& default_instance(); @@ -173,11 +181,11 @@ class TableName final : return CreateMaybeMessage(nullptr); } - TableName* New(::google::protobuf::Arena* arena) const final { + TableName* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const TableName& from); void MergeFrom(const TableName& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -185,25 +193,28 @@ class TableName final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(TableName* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.TableName"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -211,7 +222,14 @@ class TableName final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -220,16 +238,14 @@ class TableName final : // string table_name = 2; void clear_table_name(); static const int kTableNameFieldNumber = 2; - const ::std::string& table_name() const; - void set_table_name(const ::std::string& value); - #if LANG_CXX11 - void set_table_name(::std::string&& value); - #endif + const std::string& table_name() const; + void set_table_name(const std::string& value); + void set_table_name(std::string&& value); void set_table_name(const char* value); void set_table_name(const char* value, size_t size); - ::std::string* mutable_table_name(); - ::std::string* release_table_name(); - void set_allocated_table_name(::std::string* table_name); + std::string* mutable_table_name(); + std::string* release_table_name(); + void set_allocated_table_name(std::string* table_name); // .milvus.grpc.Status status = 1; bool has_status() const; @@ -244,32 +260,30 @@ class TableName final : private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr table_name_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr table_name_; ::milvus::grpc::Status* status_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // ------------------------------------------------------------------- -class TableSchema final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TableSchema) */ { +class TableSchema : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TableSchema) */ { public: TableSchema(); virtual ~TableSchema(); TableSchema(const TableSchema& from); - - inline TableSchema& operator=(const TableSchema& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 TableSchema(TableSchema&& from) noexcept : TableSchema() { *this = ::std::move(from); } + inline TableSchema& operator=(const TableSchema& from) { + CopyFrom(from); + return *this; + } inline TableSchema& operator=(TableSchema&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -278,9 +292,15 @@ class TableSchema final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 TableSchema& default_instance(); @@ -303,11 +323,11 @@ class TableSchema final : return CreateMaybeMessage(nullptr); } - TableSchema* New(::google::protobuf::Arena* arena) const final { + TableSchema* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const TableSchema& from); void MergeFrom(const TableSchema& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -315,25 +335,28 @@ class TableSchema final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(TableSchema* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.TableSchema"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -341,7 +364,14 @@ class TableSchema final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -359,14 +389,14 @@ class TableSchema final : // int64 dimension = 3; void clear_dimension(); static const int kDimensionFieldNumber = 3; - ::google::protobuf::int64 dimension() const; - void set_dimension(::google::protobuf::int64 value); + ::PROTOBUF_NAMESPACE_ID::int64 dimension() const; + void set_dimension(::PROTOBUF_NAMESPACE_ID::int64 value); // int32 index_type = 2; void clear_index_type(); static const int kIndexTypeFieldNumber = 2; - ::google::protobuf::int32 index_type() const; - void set_index_type(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 index_type() const; + void set_index_type(::PROTOBUF_NAMESPACE_ID::int32 value); // bool store_raw_vector = 4; void clear_store_raw_vector(); @@ -378,34 +408,32 @@ class TableSchema final : private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; ::milvus::grpc::TableName* table_name_; - ::google::protobuf::int64 dimension_; - ::google::protobuf::int32 index_type_; + ::PROTOBUF_NAMESPACE_ID::int64 dimension_; + ::PROTOBUF_NAMESPACE_ID::int32 index_type_; bool store_raw_vector_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // ------------------------------------------------------------------- -class Range final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.Range) */ { +class Range : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.Range) */ { public: Range(); virtual ~Range(); Range(const Range& from); - - inline Range& operator=(const Range& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Range(Range&& from) noexcept : Range() { *this = ::std::move(from); } + inline Range& operator=(const Range& from) { + CopyFrom(from); + return *this; + } inline Range& operator=(Range&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -414,9 +442,15 @@ class Range final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 Range& default_instance(); @@ -439,11 +473,11 @@ class Range final : return CreateMaybeMessage(nullptr); } - Range* New(::google::protobuf::Arena* arena) const final { + Range* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Range& from); void MergeFrom(const Range& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -451,25 +485,28 @@ class Range final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Range* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.Range"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -477,7 +514,14 @@ class Range final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -486,61 +530,55 @@ class Range final : // string start_value = 1; void clear_start_value(); static const int kStartValueFieldNumber = 1; - const ::std::string& start_value() const; - void set_start_value(const ::std::string& value); - #if LANG_CXX11 - void set_start_value(::std::string&& value); - #endif + const std::string& start_value() const; + void set_start_value(const std::string& value); + void set_start_value(std::string&& value); void set_start_value(const char* value); void set_start_value(const char* value, size_t size); - ::std::string* mutable_start_value(); - ::std::string* release_start_value(); - void set_allocated_start_value(::std::string* start_value); + std::string* mutable_start_value(); + std::string* release_start_value(); + void set_allocated_start_value(std::string* start_value); // string end_value = 2; void clear_end_value(); static const int kEndValueFieldNumber = 2; - const ::std::string& end_value() const; - void set_end_value(const ::std::string& value); - #if LANG_CXX11 - void set_end_value(::std::string&& value); - #endif + const std::string& end_value() const; + void set_end_value(const std::string& value); + void set_end_value(std::string&& value); void set_end_value(const char* value); void set_end_value(const char* value, size_t size); - ::std::string* mutable_end_value(); - ::std::string* release_end_value(); - void set_allocated_end_value(::std::string* end_value); + std::string* mutable_end_value(); + std::string* release_end_value(); + void set_allocated_end_value(std::string* end_value); // @@protoc_insertion_point(class_scope:milvus.grpc.Range) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr start_value_; - ::google::protobuf::internal::ArenaStringPtr end_value_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr start_value_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr end_value_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // ------------------------------------------------------------------- -class RowRecord final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.RowRecord) */ { +class RowRecord : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.RowRecord) */ { public: RowRecord(); virtual ~RowRecord(); RowRecord(const RowRecord& from); - - inline RowRecord& operator=(const RowRecord& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 RowRecord(RowRecord&& from) noexcept : RowRecord() { *this = ::std::move(from); } + inline RowRecord& operator=(const RowRecord& from) { + CopyFrom(from); + return *this; + } inline RowRecord& operator=(RowRecord&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -549,9 +587,15 @@ class RowRecord final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 RowRecord& default_instance(); @@ -574,11 +618,11 @@ class RowRecord final : return CreateMaybeMessage(nullptr); } - RowRecord* New(::google::protobuf::Arena* arena) const final { + RowRecord* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const RowRecord& from); void MergeFrom(const RowRecord& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -586,25 +630,28 @@ class RowRecord final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(RowRecord* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.RowRecord"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -612,7 +659,14 @@ class RowRecord final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -625,41 +679,39 @@ class RowRecord final : float vector_data(int index) const; void set_vector_data(int index, float value); void add_vector_data(float value); - const ::google::protobuf::RepeatedField< float >& + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& vector_data() const; - ::google::protobuf::RepeatedField< float >* + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* mutable_vector_data(); // @@protoc_insertion_point(class_scope:milvus.grpc.RowRecord) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedField< float > vector_data_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float > vector_data_; mutable std::atomic _vector_data_cached_byte_size_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // ------------------------------------------------------------------- -class InsertInfos final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.InsertInfos) */ { +class InsertInfos : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.InsertInfos) */ { public: InsertInfos(); virtual ~InsertInfos(); InsertInfos(const InsertInfos& from); - - inline InsertInfos& operator=(const InsertInfos& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 InsertInfos(InsertInfos&& from) noexcept : InsertInfos() { *this = ::std::move(from); } + inline InsertInfos& operator=(const InsertInfos& from) { + CopyFrom(from); + return *this; + } inline InsertInfos& operator=(InsertInfos&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -668,9 +720,15 @@ class InsertInfos final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 InsertInfos& default_instance(); @@ -693,11 +751,11 @@ class InsertInfos final : return CreateMaybeMessage(nullptr); } - InsertInfos* New(::google::protobuf::Arena* arena) const final { + InsertInfos* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const InsertInfos& from); void MergeFrom(const InsertInfos& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -705,25 +763,28 @@ class InsertInfos final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(InsertInfos* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.InsertInfos"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -731,7 +792,14 @@ class InsertInfos final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -742,57 +810,53 @@ class InsertInfos final : void clear_row_record_array(); static const int kRowRecordArrayFieldNumber = 2; ::milvus::grpc::RowRecord* mutable_row_record_array(int index); - ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >* + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >* mutable_row_record_array(); const ::milvus::grpc::RowRecord& row_record_array(int index) const; ::milvus::grpc::RowRecord* add_row_record_array(); - const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >& + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >& row_record_array() const; // string table_name = 1; void clear_table_name(); static const int kTableNameFieldNumber = 1; - const ::std::string& table_name() const; - void set_table_name(const ::std::string& value); - #if LANG_CXX11 - void set_table_name(::std::string&& value); - #endif + const std::string& table_name() const; + void set_table_name(const std::string& value); + void set_table_name(std::string&& value); void set_table_name(const char* value); void set_table_name(const char* value, size_t size); - ::std::string* mutable_table_name(); - ::std::string* release_table_name(); - void set_allocated_table_name(::std::string* table_name); + std::string* mutable_table_name(); + std::string* release_table_name(); + void set_allocated_table_name(std::string* table_name); // @@protoc_insertion_point(class_scope:milvus.grpc.InsertInfos) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord > row_record_array_; - ::google::protobuf::internal::ArenaStringPtr table_name_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord > row_record_array_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr table_name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // ------------------------------------------------------------------- -class VectorIds final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.VectorIds) */ { +class VectorIds : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.VectorIds) */ { public: VectorIds(); virtual ~VectorIds(); VectorIds(const VectorIds& from); - - inline VectorIds& operator=(const VectorIds& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 VectorIds(VectorIds&& from) noexcept : VectorIds() { *this = ::std::move(from); } + inline VectorIds& operator=(const VectorIds& from) { + CopyFrom(from); + return *this; + } inline VectorIds& operator=(VectorIds&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -801,9 +865,15 @@ class VectorIds final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 VectorIds& default_instance(); @@ -826,11 +896,11 @@ class VectorIds final : return CreateMaybeMessage(nullptr); } - VectorIds* New(::google::protobuf::Arena* arena) const final { + VectorIds* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const VectorIds& from); void MergeFrom(const VectorIds& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -838,25 +908,28 @@ class VectorIds final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(VectorIds* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.VectorIds"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -864,7 +937,14 @@ class VectorIds final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -874,12 +954,12 @@ class VectorIds final : int vector_id_array_size() const; void clear_vector_id_array(); static const int kVectorIdArrayFieldNumber = 2; - ::google::protobuf::int64 vector_id_array(int index) const; - void set_vector_id_array(int index, ::google::protobuf::int64 value); - void add_vector_id_array(::google::protobuf::int64 value); - const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& + ::PROTOBUF_NAMESPACE_ID::int64 vector_id_array(int index) const; + void set_vector_id_array(int index, ::PROTOBUF_NAMESPACE_ID::int64 value); + void add_vector_id_array(::PROTOBUF_NAMESPACE_ID::int64 value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >& vector_id_array() const; - ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >* mutable_vector_id_array(); // .milvus.grpc.Status status = 1; @@ -895,33 +975,31 @@ class VectorIds final : private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedField< ::google::protobuf::int64 > vector_id_array_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 > vector_id_array_; mutable std::atomic _vector_id_array_cached_byte_size_; ::milvus::grpc::Status* status_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // ------------------------------------------------------------------- -class SearchVectorInfos final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.SearchVectorInfos) */ { +class SearchVectorInfos : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.SearchVectorInfos) */ { public: SearchVectorInfos(); virtual ~SearchVectorInfos(); SearchVectorInfos(const SearchVectorInfos& from); - - inline SearchVectorInfos& operator=(const SearchVectorInfos& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 SearchVectorInfos(SearchVectorInfos&& from) noexcept : SearchVectorInfos() { *this = ::std::move(from); } + inline SearchVectorInfos& operator=(const SearchVectorInfos& from) { + CopyFrom(from); + return *this; + } inline SearchVectorInfos& operator=(SearchVectorInfos&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -930,9 +1008,15 @@ class SearchVectorInfos final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 SearchVectorInfos& default_instance(); @@ -955,11 +1039,11 @@ class SearchVectorInfos final : return CreateMaybeMessage(nullptr); } - SearchVectorInfos* New(::google::protobuf::Arena* arena) const final { + SearchVectorInfos* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const SearchVectorInfos& from); void MergeFrom(const SearchVectorInfos& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -967,25 +1051,28 @@ class SearchVectorInfos final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(SearchVectorInfos* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.SearchVectorInfos"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -993,7 +1080,14 @@ class SearchVectorInfos final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -1004,11 +1098,11 @@ class SearchVectorInfos final : void clear_query_record_array(); static const int kQueryRecordArrayFieldNumber = 2; ::milvus::grpc::RowRecord* mutable_query_record_array(int index); - ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >* + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >* mutable_query_record_array(); const ::milvus::grpc::RowRecord& query_record_array(int index) const; ::milvus::grpc::RowRecord* add_query_record_array(); - const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >& + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >& query_record_array() const; // repeated .milvus.grpc.Range query_range_array = 3; @@ -1016,65 +1110,61 @@ class SearchVectorInfos final : void clear_query_range_array(); static const int kQueryRangeArrayFieldNumber = 3; ::milvus::grpc::Range* mutable_query_range_array(int index); - ::google::protobuf::RepeatedPtrField< ::milvus::grpc::Range >* + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::Range >* mutable_query_range_array(); const ::milvus::grpc::Range& query_range_array(int index) const; ::milvus::grpc::Range* add_query_range_array(); - const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::Range >& + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::Range >& query_range_array() const; // string table_name = 1; void clear_table_name(); static const int kTableNameFieldNumber = 1; - const ::std::string& table_name() const; - void set_table_name(const ::std::string& value); - #if LANG_CXX11 - void set_table_name(::std::string&& value); - #endif + const std::string& table_name() const; + void set_table_name(const std::string& value); + void set_table_name(std::string&& value); void set_table_name(const char* value); void set_table_name(const char* value, size_t size); - ::std::string* mutable_table_name(); - ::std::string* release_table_name(); - void set_allocated_table_name(::std::string* table_name); + std::string* mutable_table_name(); + std::string* release_table_name(); + void set_allocated_table_name(std::string* table_name); // int64 topk = 4; void clear_topk(); static const int kTopkFieldNumber = 4; - ::google::protobuf::int64 topk() const; - void set_topk(::google::protobuf::int64 value); + ::PROTOBUF_NAMESPACE_ID::int64 topk() const; + void set_topk(::PROTOBUF_NAMESPACE_ID::int64 value); // @@protoc_insertion_point(class_scope:milvus.grpc.SearchVectorInfos) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord > query_record_array_; - ::google::protobuf::RepeatedPtrField< ::milvus::grpc::Range > query_range_array_; - ::google::protobuf::internal::ArenaStringPtr table_name_; - ::google::protobuf::int64 topk_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord > query_record_array_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::Range > query_range_array_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr table_name_; + ::PROTOBUF_NAMESPACE_ID::int64 topk_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // ------------------------------------------------------------------- -class SearchVectorInFilesInfos final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.SearchVectorInFilesInfos) */ { +class SearchVectorInFilesInfos : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.SearchVectorInFilesInfos) */ { public: SearchVectorInFilesInfos(); virtual ~SearchVectorInFilesInfos(); SearchVectorInFilesInfos(const SearchVectorInFilesInfos& from); - - inline SearchVectorInFilesInfos& operator=(const SearchVectorInFilesInfos& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 SearchVectorInFilesInfos(SearchVectorInFilesInfos&& from) noexcept : SearchVectorInFilesInfos() { *this = ::std::move(from); } + inline SearchVectorInFilesInfos& operator=(const SearchVectorInFilesInfos& from) { + CopyFrom(from); + return *this; + } inline SearchVectorInFilesInfos& operator=(SearchVectorInFilesInfos&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1083,9 +1173,15 @@ class SearchVectorInFilesInfos final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 SearchVectorInFilesInfos& default_instance(); @@ -1108,11 +1204,11 @@ class SearchVectorInFilesInfos final : return CreateMaybeMessage(nullptr); } - SearchVectorInFilesInfos* New(::google::protobuf::Arena* arena) const final { + SearchVectorInFilesInfos* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const SearchVectorInFilesInfos& from); void MergeFrom(const SearchVectorInFilesInfos& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -1120,25 +1216,28 @@ class SearchVectorInFilesInfos final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(SearchVectorInFilesInfos* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.SearchVectorInFilesInfos"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1146,7 +1245,14 @@ class SearchVectorInFilesInfos final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -1156,23 +1262,19 @@ class SearchVectorInFilesInfos final : int file_id_array_size() const; void clear_file_id_array(); static const int kFileIdArrayFieldNumber = 1; - const ::std::string& file_id_array(int index) const; - ::std::string* mutable_file_id_array(int index); - void set_file_id_array(int index, const ::std::string& value); - #if LANG_CXX11 - void set_file_id_array(int index, ::std::string&& value); - #endif + const std::string& file_id_array(int index) const; + std::string* mutable_file_id_array(int index); + void set_file_id_array(int index, const std::string& value); + void set_file_id_array(int index, std::string&& value); void set_file_id_array(int index, const char* value); void set_file_id_array(int index, const char* value, size_t size); - ::std::string* add_file_id_array(); - void add_file_id_array(const ::std::string& value); - #if LANG_CXX11 - void add_file_id_array(::std::string&& value); - #endif + std::string* add_file_id_array(); + void add_file_id_array(const std::string& value); + void add_file_id_array(std::string&& value); void add_file_id_array(const char* value); void add_file_id_array(const char* value, size_t size); - const ::google::protobuf::RepeatedPtrField<::std::string>& file_id_array() const; - ::google::protobuf::RepeatedPtrField<::std::string>* mutable_file_id_array(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& file_id_array() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_file_id_array(); // .milvus.grpc.SearchVectorInfos search_vector_infos = 2; bool has_search_vector_infos() const; @@ -1187,32 +1289,30 @@ class SearchVectorInFilesInfos final : private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField<::std::string> file_id_array_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField file_id_array_; ::milvus::grpc::SearchVectorInfos* search_vector_infos_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // ------------------------------------------------------------------- -class QueryResult final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.QueryResult) */ { +class QueryResult : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.QueryResult) */ { public: QueryResult(); virtual ~QueryResult(); QueryResult(const QueryResult& from); - - inline QueryResult& operator=(const QueryResult& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 QueryResult(QueryResult&& from) noexcept : QueryResult() { *this = ::std::move(from); } + inline QueryResult& operator=(const QueryResult& from) { + CopyFrom(from); + return *this; + } inline QueryResult& operator=(QueryResult&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1221,9 +1321,15 @@ class QueryResult final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 QueryResult& default_instance(); @@ -1246,11 +1352,11 @@ class QueryResult final : return CreateMaybeMessage(nullptr); } - QueryResult* New(::google::protobuf::Arena* arena) const final { + QueryResult* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const QueryResult& from); void MergeFrom(const QueryResult& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -1258,25 +1364,28 @@ class QueryResult final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(QueryResult* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.QueryResult"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1284,7 +1393,14 @@ class QueryResult final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -1293,8 +1409,8 @@ class QueryResult final : // int64 id = 1; void clear_id(); static const int kIdFieldNumber = 1; - ::google::protobuf::int64 id() const; - void set_id(::google::protobuf::int64 value); + ::PROTOBUF_NAMESPACE_ID::int64 id() const; + void set_id(::PROTOBUF_NAMESPACE_ID::int64 value); // double distance = 2; void clear_distance(); @@ -1306,32 +1422,30 @@ class QueryResult final : private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::int64 id_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::int64 id_; double distance_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // ------------------------------------------------------------------- -class TopKQueryResult final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TopKQueryResult) */ { +class TopKQueryResult : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TopKQueryResult) */ { public: TopKQueryResult(); virtual ~TopKQueryResult(); TopKQueryResult(const TopKQueryResult& from); - - inline TopKQueryResult& operator=(const TopKQueryResult& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 TopKQueryResult(TopKQueryResult&& from) noexcept : TopKQueryResult() { *this = ::std::move(from); } + inline TopKQueryResult& operator=(const TopKQueryResult& from) { + CopyFrom(from); + return *this; + } inline TopKQueryResult& operator=(TopKQueryResult&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1340,9 +1454,15 @@ class TopKQueryResult final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 TopKQueryResult& default_instance(); @@ -1365,11 +1485,11 @@ class TopKQueryResult final : return CreateMaybeMessage(nullptr); } - TopKQueryResult* New(::google::protobuf::Arena* arena) const final { + TopKQueryResult* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const TopKQueryResult& from); void MergeFrom(const TopKQueryResult& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -1377,25 +1497,28 @@ class TopKQueryResult final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(TopKQueryResult* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.TopKQueryResult"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1403,7 +1526,14 @@ class TopKQueryResult final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -1414,11 +1544,11 @@ class TopKQueryResult final : void clear_query_result_arrays(); static const int kQueryResultArraysFieldNumber = 2; ::milvus::grpc::QueryResult* mutable_query_result_arrays(int index); - ::google::protobuf::RepeatedPtrField< ::milvus::grpc::QueryResult >* + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::QueryResult >* mutable_query_result_arrays(); const ::milvus::grpc::QueryResult& query_result_arrays(int index) const; ::milvus::grpc::QueryResult* add_query_result_arrays(); - const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::QueryResult >& + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::QueryResult >& query_result_arrays() const; // .milvus.grpc.Status status = 1; @@ -1434,32 +1564,30 @@ class TopKQueryResult final : private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::milvus::grpc::QueryResult > query_result_arrays_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::QueryResult > query_result_arrays_; ::milvus::grpc::Status* status_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // ------------------------------------------------------------------- -class StringReply final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.StringReply) */ { +class StringReply : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.StringReply) */ { public: StringReply(); virtual ~StringReply(); StringReply(const StringReply& from); - - inline StringReply& operator=(const StringReply& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 StringReply(StringReply&& from) noexcept : StringReply() { *this = ::std::move(from); } + inline StringReply& operator=(const StringReply& from) { + CopyFrom(from); + return *this; + } inline StringReply& operator=(StringReply&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1468,9 +1596,15 @@ class StringReply final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 StringReply& default_instance(); @@ -1493,11 +1627,11 @@ class StringReply final : return CreateMaybeMessage(nullptr); } - StringReply* New(::google::protobuf::Arena* arena) const final { + StringReply* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const StringReply& from); void MergeFrom(const StringReply& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -1505,25 +1639,28 @@ class StringReply final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(StringReply* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.StringReply"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1531,7 +1668,14 @@ class StringReply final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -1540,16 +1684,14 @@ class StringReply final : // string string_reply = 2; void clear_string_reply(); static const int kStringReplyFieldNumber = 2; - const ::std::string& string_reply() const; - void set_string_reply(const ::std::string& value); - #if LANG_CXX11 - void set_string_reply(::std::string&& value); - #endif + const std::string& string_reply() const; + void set_string_reply(const std::string& value); + void set_string_reply(std::string&& value); void set_string_reply(const char* value); void set_string_reply(const char* value, size_t size); - ::std::string* mutable_string_reply(); - ::std::string* release_string_reply(); - void set_allocated_string_reply(::std::string* string_reply); + std::string* mutable_string_reply(); + std::string* release_string_reply(); + void set_allocated_string_reply(std::string* string_reply); // .milvus.grpc.Status status = 1; bool has_status() const; @@ -1564,32 +1706,30 @@ class StringReply final : private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr string_reply_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_reply_; ::milvus::grpc::Status* status_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // ------------------------------------------------------------------- -class BoolReply final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.BoolReply) */ { +class BoolReply : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.BoolReply) */ { public: BoolReply(); virtual ~BoolReply(); BoolReply(const BoolReply& from); - - inline BoolReply& operator=(const BoolReply& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 BoolReply(BoolReply&& from) noexcept : BoolReply() { *this = ::std::move(from); } + inline BoolReply& operator=(const BoolReply& from) { + CopyFrom(from); + return *this; + } inline BoolReply& operator=(BoolReply&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1598,9 +1738,15 @@ class BoolReply final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 BoolReply& default_instance(); @@ -1623,11 +1769,11 @@ class BoolReply final : return CreateMaybeMessage(nullptr); } - BoolReply* New(::google::protobuf::Arena* arena) const final { + BoolReply* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const BoolReply& from); void MergeFrom(const BoolReply& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -1635,25 +1781,28 @@ class BoolReply final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(BoolReply* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.BoolReply"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1661,7 +1810,14 @@ class BoolReply final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -1686,32 +1842,30 @@ class BoolReply final : private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; ::milvus::grpc::Status* status_; bool bool_reply_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // ------------------------------------------------------------------- -class TableRowCount final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TableRowCount) */ { +class TableRowCount : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TableRowCount) */ { public: TableRowCount(); virtual ~TableRowCount(); TableRowCount(const TableRowCount& from); - - inline TableRowCount& operator=(const TableRowCount& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 TableRowCount(TableRowCount&& from) noexcept : TableRowCount() { *this = ::std::move(from); } + inline TableRowCount& operator=(const TableRowCount& from) { + CopyFrom(from); + return *this; + } inline TableRowCount& operator=(TableRowCount&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1720,9 +1874,15 @@ class TableRowCount final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 TableRowCount& default_instance(); @@ -1745,11 +1905,11 @@ class TableRowCount final : return CreateMaybeMessage(nullptr); } - TableRowCount* New(::google::protobuf::Arena* arena) const final { + TableRowCount* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const TableRowCount& from); void MergeFrom(const TableRowCount& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -1757,25 +1917,28 @@ class TableRowCount final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(TableRowCount* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.TableRowCount"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1783,7 +1946,14 @@ class TableRowCount final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -1801,39 +1971,37 @@ class TableRowCount final : // int64 table_row_count = 2; void clear_table_row_count(); static const int kTableRowCountFieldNumber = 2; - ::google::protobuf::int64 table_row_count() const; - void set_table_row_count(::google::protobuf::int64 value); + ::PROTOBUF_NAMESPACE_ID::int64 table_row_count() const; + void set_table_row_count(::PROTOBUF_NAMESPACE_ID::int64 value); // @@protoc_insertion_point(class_scope:milvus.grpc.TableRowCount) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; ::milvus::grpc::Status* status_; - ::google::protobuf::int64 table_row_count_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::int64 table_row_count_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // ------------------------------------------------------------------- -class Command final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.Command) */ { +class Command : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.Command) */ { public: Command(); virtual ~Command(); Command(const Command& from); - - inline Command& operator=(const Command& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Command(Command&& from) noexcept : Command() { *this = ::std::move(from); } + inline Command& operator=(const Command& from) { + CopyFrom(from); + return *this; + } inline Command& operator=(Command&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1842,9 +2010,15 @@ class Command final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 Command& default_instance(); @@ -1867,11 +2041,11 @@ class Command final : return CreateMaybeMessage(nullptr); } - Command* New(::google::protobuf::Arena* arena) const final { + Command* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Command& from); void MergeFrom(const Command& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -1879,25 +2053,28 @@ class Command final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Command* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.Command"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1905,7 +2082,14 @@ class Command final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -1914,46 +2098,42 @@ class Command final : // string cmd = 1; void clear_cmd(); static const int kCmdFieldNumber = 1; - const ::std::string& cmd() const; - void set_cmd(const ::std::string& value); - #if LANG_CXX11 - void set_cmd(::std::string&& value); - #endif + const std::string& cmd() const; + void set_cmd(const std::string& value); + void set_cmd(std::string&& value); void set_cmd(const char* value); void set_cmd(const char* value, size_t size); - ::std::string* mutable_cmd(); - ::std::string* release_cmd(); - void set_allocated_cmd(::std::string* cmd); + std::string* mutable_cmd(); + std::string* release_cmd(); + void set_allocated_cmd(std::string* cmd); // @@protoc_insertion_point(class_scope:milvus.grpc.Command) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr cmd_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cmd_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // ------------------------------------------------------------------- -class ServerStatus final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.ServerStatus) */ { +class ServerStatus : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.ServerStatus) */ { public: ServerStatus(); virtual ~ServerStatus(); ServerStatus(const ServerStatus& from); - - inline ServerStatus& operator=(const ServerStatus& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 ServerStatus(ServerStatus&& from) noexcept : ServerStatus() { *this = ::std::move(from); } + inline ServerStatus& operator=(const ServerStatus& from) { + CopyFrom(from); + return *this; + } inline ServerStatus& operator=(ServerStatus&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1962,9 +2142,15 @@ class ServerStatus final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 ServerStatus& default_instance(); @@ -1987,11 +2173,11 @@ class ServerStatus final : return CreateMaybeMessage(nullptr); } - ServerStatus* New(::google::protobuf::Arena* arena) const final { + ServerStatus* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const ServerStatus& from); void MergeFrom(const ServerStatus& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -1999,25 +2185,28 @@ class ServerStatus final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ServerStatus* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.ServerStatus"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -2025,7 +2214,14 @@ class ServerStatus final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -2034,16 +2230,14 @@ class ServerStatus final : // string info = 2; void clear_info(); static const int kInfoFieldNumber = 2; - const ::std::string& info() const; - void set_info(const ::std::string& value); - #if LANG_CXX11 - void set_info(::std::string&& value); - #endif + const std::string& info() const; + void set_info(const std::string& value); + void set_info(std::string&& value); void set_info(const char* value); void set_info(const char* value, size_t size); - ::std::string* mutable_info(); - ::std::string* release_info(); - void set_allocated_info(::std::string* info); + std::string* mutable_info(); + std::string* release_info(); + void set_allocated_info(std::string* info); // .milvus.grpc.Status status = 1; bool has_status() const; @@ -2058,10 +2252,10 @@ class ServerStatus final : private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr info_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr info_; ::milvus::grpc::Status* status_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; // =================================================================== @@ -2102,14 +2296,14 @@ inline ::milvus::grpc::Status* TableName::mutable_status() { return status_; } inline void TableName::set_allocated_status(::milvus::grpc::Status* status) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { - delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_); } if (status) { - ::google::protobuf::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; if (message_arena != submessage_arena) { - status = ::google::protobuf::internal::GetOwnedMessage( + status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, status, submessage_arena); } @@ -2122,54 +2316,52 @@ inline void TableName::set_allocated_status(::milvus::grpc::Status* status) { // string table_name = 2; inline void TableName::clear_table_name() { - table_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + table_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& TableName::table_name() const { +inline const std::string& TableName::table_name() const { // @@protoc_insertion_point(field_get:milvus.grpc.TableName.table_name) return table_name_.GetNoArena(); } -inline void TableName::set_table_name(const ::std::string& value) { +inline void TableName::set_table_name(const std::string& value) { - table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:milvus.grpc.TableName.table_name) } -#if LANG_CXX11 -inline void TableName::set_table_name(::std::string&& value) { +inline void TableName::set_table_name(std::string&& value) { table_name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.TableName.table_name) } -#endif inline void TableName::set_table_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:milvus.grpc.TableName.table_name) } inline void TableName::set_table_name(const char* value, size_t size) { - table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:milvus.grpc.TableName.table_name) } -inline ::std::string* TableName::mutable_table_name() { +inline std::string* TableName::mutable_table_name() { // @@protoc_insertion_point(field_mutable:milvus.grpc.TableName.table_name) - return table_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return table_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* TableName::release_table_name() { +inline std::string* TableName::release_table_name() { // @@protoc_insertion_point(field_release:milvus.grpc.TableName.table_name) - return table_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return table_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void TableName::set_allocated_table_name(::std::string* table_name) { +inline void TableName::set_allocated_table_name(std::string* table_name) { if (table_name != nullptr) { } else { } - table_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), table_name); + table_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), table_name); // @@protoc_insertion_point(field_set_allocated:milvus.grpc.TableName.table_name) } @@ -2210,14 +2402,14 @@ inline ::milvus::grpc::TableName* TableSchema::mutable_table_name() { return table_name_; } inline void TableSchema::set_allocated_table_name(::milvus::grpc::TableName* table_name) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete table_name_; } if (table_name) { - ::google::protobuf::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; if (message_arena != submessage_arena) { - table_name = ::google::protobuf::internal::GetOwnedMessage( + table_name = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, table_name, submessage_arena); } @@ -2232,11 +2424,11 @@ inline void TableSchema::set_allocated_table_name(::milvus::grpc::TableName* tab inline void TableSchema::clear_index_type() { index_type_ = 0; } -inline ::google::protobuf::int32 TableSchema::index_type() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 TableSchema::index_type() const { // @@protoc_insertion_point(field_get:milvus.grpc.TableSchema.index_type) return index_type_; } -inline void TableSchema::set_index_type(::google::protobuf::int32 value) { +inline void TableSchema::set_index_type(::PROTOBUF_NAMESPACE_ID::int32 value) { index_type_ = value; // @@protoc_insertion_point(field_set:milvus.grpc.TableSchema.index_type) @@ -2246,11 +2438,11 @@ inline void TableSchema::set_index_type(::google::protobuf::int32 value) { inline void TableSchema::clear_dimension() { dimension_ = PROTOBUF_LONGLONG(0); } -inline ::google::protobuf::int64 TableSchema::dimension() const { +inline ::PROTOBUF_NAMESPACE_ID::int64 TableSchema::dimension() const { // @@protoc_insertion_point(field_get:milvus.grpc.TableSchema.dimension) return dimension_; } -inline void TableSchema::set_dimension(::google::protobuf::int64 value) { +inline void TableSchema::set_dimension(::PROTOBUF_NAMESPACE_ID::int64 value) { dimension_ = value; // @@protoc_insertion_point(field_set:milvus.grpc.TableSchema.dimension) @@ -2276,107 +2468,103 @@ inline void TableSchema::set_store_raw_vector(bool value) { // string start_value = 1; inline void Range::clear_start_value() { - start_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + start_value_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Range::start_value() const { +inline const std::string& Range::start_value() const { // @@protoc_insertion_point(field_get:milvus.grpc.Range.start_value) return start_value_.GetNoArena(); } -inline void Range::set_start_value(const ::std::string& value) { +inline void Range::set_start_value(const std::string& value) { - start_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + start_value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:milvus.grpc.Range.start_value) } -#if LANG_CXX11 -inline void Range::set_start_value(::std::string&& value) { +inline void Range::set_start_value(std::string&& value) { start_value_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.Range.start_value) } -#endif inline void Range::set_start_value(const char* value) { GOOGLE_DCHECK(value != nullptr); - start_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + start_value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:milvus.grpc.Range.start_value) } inline void Range::set_start_value(const char* value, size_t size) { - start_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + start_value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:milvus.grpc.Range.start_value) } -inline ::std::string* Range::mutable_start_value() { +inline std::string* Range::mutable_start_value() { // @@protoc_insertion_point(field_mutable:milvus.grpc.Range.start_value) - return start_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return start_value_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Range::release_start_value() { +inline std::string* Range::release_start_value() { // @@protoc_insertion_point(field_release:milvus.grpc.Range.start_value) - return start_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return start_value_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Range::set_allocated_start_value(::std::string* start_value) { +inline void Range::set_allocated_start_value(std::string* start_value) { if (start_value != nullptr) { } else { } - start_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), start_value); + start_value_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), start_value); // @@protoc_insertion_point(field_set_allocated:milvus.grpc.Range.start_value) } // string end_value = 2; inline void Range::clear_end_value() { - end_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + end_value_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Range::end_value() const { +inline const std::string& Range::end_value() const { // @@protoc_insertion_point(field_get:milvus.grpc.Range.end_value) return end_value_.GetNoArena(); } -inline void Range::set_end_value(const ::std::string& value) { +inline void Range::set_end_value(const std::string& value) { - end_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + end_value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:milvus.grpc.Range.end_value) } -#if LANG_CXX11 -inline void Range::set_end_value(::std::string&& value) { +inline void Range::set_end_value(std::string&& value) { end_value_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.Range.end_value) } -#endif inline void Range::set_end_value(const char* value) { GOOGLE_DCHECK(value != nullptr); - end_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + end_value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:milvus.grpc.Range.end_value) } inline void Range::set_end_value(const char* value, size_t size) { - end_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + end_value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:milvus.grpc.Range.end_value) } -inline ::std::string* Range::mutable_end_value() { +inline std::string* Range::mutable_end_value() { // @@protoc_insertion_point(field_mutable:milvus.grpc.Range.end_value) - return end_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return end_value_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Range::release_end_value() { +inline std::string* Range::release_end_value() { // @@protoc_insertion_point(field_release:milvus.grpc.Range.end_value) - return end_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return end_value_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Range::set_allocated_end_value(::std::string* end_value) { +inline void Range::set_allocated_end_value(std::string* end_value) { if (end_value != nullptr) { } else { } - end_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), end_value); + end_value_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), end_value); // @@protoc_insertion_point(field_set_allocated:milvus.grpc.Range.end_value) } @@ -2403,12 +2591,12 @@ inline void RowRecord::add_vector_data(float value) { vector_data_.Add(value); // @@protoc_insertion_point(field_add:milvus.grpc.RowRecord.vector_data) } -inline const ::google::protobuf::RepeatedField< float >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& RowRecord::vector_data() const { // @@protoc_insertion_point(field_list:milvus.grpc.RowRecord.vector_data) return vector_data_; } -inline ::google::protobuf::RepeatedField< float >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* RowRecord::mutable_vector_data() { // @@protoc_insertion_point(field_mutable_list:milvus.grpc.RowRecord.vector_data) return &vector_data_; @@ -2420,54 +2608,52 @@ RowRecord::mutable_vector_data() { // string table_name = 1; inline void InsertInfos::clear_table_name() { - table_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + table_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& InsertInfos::table_name() const { +inline const std::string& InsertInfos::table_name() const { // @@protoc_insertion_point(field_get:milvus.grpc.InsertInfos.table_name) return table_name_.GetNoArena(); } -inline void InsertInfos::set_table_name(const ::std::string& value) { +inline void InsertInfos::set_table_name(const std::string& value) { - table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:milvus.grpc.InsertInfos.table_name) } -#if LANG_CXX11 -inline void InsertInfos::set_table_name(::std::string&& value) { +inline void InsertInfos::set_table_name(std::string&& value) { table_name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.InsertInfos.table_name) } -#endif inline void InsertInfos::set_table_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:milvus.grpc.InsertInfos.table_name) } inline void InsertInfos::set_table_name(const char* value, size_t size) { - table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:milvus.grpc.InsertInfos.table_name) } -inline ::std::string* InsertInfos::mutable_table_name() { +inline std::string* InsertInfos::mutable_table_name() { // @@protoc_insertion_point(field_mutable:milvus.grpc.InsertInfos.table_name) - return table_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return table_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* InsertInfos::release_table_name() { +inline std::string* InsertInfos::release_table_name() { // @@protoc_insertion_point(field_release:milvus.grpc.InsertInfos.table_name) - return table_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return table_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void InsertInfos::set_allocated_table_name(::std::string* table_name) { +inline void InsertInfos::set_allocated_table_name(std::string* table_name) { if (table_name != nullptr) { } else { } - table_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), table_name); + table_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), table_name); // @@protoc_insertion_point(field_set_allocated:milvus.grpc.InsertInfos.table_name) } @@ -2482,7 +2668,7 @@ inline ::milvus::grpc::RowRecord* InsertInfos::mutable_row_record_array(int inde // @@protoc_insertion_point(field_mutable:milvus.grpc.InsertInfos.row_record_array) return row_record_array_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >* InsertInfos::mutable_row_record_array() { // @@protoc_insertion_point(field_mutable_list:milvus.grpc.InsertInfos.row_record_array) return &row_record_array_; @@ -2495,7 +2681,7 @@ inline ::milvus::grpc::RowRecord* InsertInfos::add_row_record_array() { // @@protoc_insertion_point(field_add:milvus.grpc.InsertInfos.row_record_array) return row_record_array_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >& InsertInfos::row_record_array() const { // @@protoc_insertion_point(field_list:milvus.grpc.InsertInfos.row_record_array) return row_record_array_; @@ -2532,14 +2718,14 @@ inline ::milvus::grpc::Status* VectorIds::mutable_status() { return status_; } inline void VectorIds::set_allocated_status(::milvus::grpc::Status* status) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { - delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_); } if (status) { - ::google::protobuf::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; if (message_arena != submessage_arena) { - status = ::google::protobuf::internal::GetOwnedMessage( + status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, status, submessage_arena); } @@ -2557,24 +2743,24 @@ inline int VectorIds::vector_id_array_size() const { inline void VectorIds::clear_vector_id_array() { vector_id_array_.Clear(); } -inline ::google::protobuf::int64 VectorIds::vector_id_array(int index) const { +inline ::PROTOBUF_NAMESPACE_ID::int64 VectorIds::vector_id_array(int index) const { // @@protoc_insertion_point(field_get:milvus.grpc.VectorIds.vector_id_array) return vector_id_array_.Get(index); } -inline void VectorIds::set_vector_id_array(int index, ::google::protobuf::int64 value) { +inline void VectorIds::set_vector_id_array(int index, ::PROTOBUF_NAMESPACE_ID::int64 value) { vector_id_array_.Set(index, value); // @@protoc_insertion_point(field_set:milvus.grpc.VectorIds.vector_id_array) } -inline void VectorIds::add_vector_id_array(::google::protobuf::int64 value) { +inline void VectorIds::add_vector_id_array(::PROTOBUF_NAMESPACE_ID::int64 value) { vector_id_array_.Add(value); // @@protoc_insertion_point(field_add:milvus.grpc.VectorIds.vector_id_array) } -inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >& VectorIds::vector_id_array() const { // @@protoc_insertion_point(field_list:milvus.grpc.VectorIds.vector_id_array) return vector_id_array_; } -inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >* VectorIds::mutable_vector_id_array() { // @@protoc_insertion_point(field_mutable_list:milvus.grpc.VectorIds.vector_id_array) return &vector_id_array_; @@ -2586,54 +2772,52 @@ VectorIds::mutable_vector_id_array() { // string table_name = 1; inline void SearchVectorInfos::clear_table_name() { - table_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + table_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& SearchVectorInfos::table_name() const { +inline const std::string& SearchVectorInfos::table_name() const { // @@protoc_insertion_point(field_get:milvus.grpc.SearchVectorInfos.table_name) return table_name_.GetNoArena(); } -inline void SearchVectorInfos::set_table_name(const ::std::string& value) { +inline void SearchVectorInfos::set_table_name(const std::string& value) { - table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:milvus.grpc.SearchVectorInfos.table_name) } -#if LANG_CXX11 -inline void SearchVectorInfos::set_table_name(::std::string&& value) { +inline void SearchVectorInfos::set_table_name(std::string&& value) { table_name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.SearchVectorInfos.table_name) } -#endif inline void SearchVectorInfos::set_table_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:milvus.grpc.SearchVectorInfos.table_name) } inline void SearchVectorInfos::set_table_name(const char* value, size_t size) { - table_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:milvus.grpc.SearchVectorInfos.table_name) } -inline ::std::string* SearchVectorInfos::mutable_table_name() { +inline std::string* SearchVectorInfos::mutable_table_name() { // @@protoc_insertion_point(field_mutable:milvus.grpc.SearchVectorInfos.table_name) - return table_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return table_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* SearchVectorInfos::release_table_name() { +inline std::string* SearchVectorInfos::release_table_name() { // @@protoc_insertion_point(field_release:milvus.grpc.SearchVectorInfos.table_name) - return table_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return table_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void SearchVectorInfos::set_allocated_table_name(::std::string* table_name) { +inline void SearchVectorInfos::set_allocated_table_name(std::string* table_name) { if (table_name != nullptr) { } else { } - table_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), table_name); + table_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), table_name); // @@protoc_insertion_point(field_set_allocated:milvus.grpc.SearchVectorInfos.table_name) } @@ -2648,7 +2832,7 @@ inline ::milvus::grpc::RowRecord* SearchVectorInfos::mutable_query_record_array( // @@protoc_insertion_point(field_mutable:milvus.grpc.SearchVectorInfos.query_record_array) return query_record_array_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >* SearchVectorInfos::mutable_query_record_array() { // @@protoc_insertion_point(field_mutable_list:milvus.grpc.SearchVectorInfos.query_record_array) return &query_record_array_; @@ -2661,7 +2845,7 @@ inline ::milvus::grpc::RowRecord* SearchVectorInfos::add_query_record_array() { // @@protoc_insertion_point(field_add:milvus.grpc.SearchVectorInfos.query_record_array) return query_record_array_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::RowRecord >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >& SearchVectorInfos::query_record_array() const { // @@protoc_insertion_point(field_list:milvus.grpc.SearchVectorInfos.query_record_array) return query_record_array_; @@ -2678,7 +2862,7 @@ inline ::milvus::grpc::Range* SearchVectorInfos::mutable_query_range_array(int i // @@protoc_insertion_point(field_mutable:milvus.grpc.SearchVectorInfos.query_range_array) return query_range_array_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::milvus::grpc::Range >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::Range >* SearchVectorInfos::mutable_query_range_array() { // @@protoc_insertion_point(field_mutable_list:milvus.grpc.SearchVectorInfos.query_range_array) return &query_range_array_; @@ -2691,7 +2875,7 @@ inline ::milvus::grpc::Range* SearchVectorInfos::add_query_range_array() { // @@protoc_insertion_point(field_add:milvus.grpc.SearchVectorInfos.query_range_array) return query_range_array_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::Range >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::Range >& SearchVectorInfos::query_range_array() const { // @@protoc_insertion_point(field_list:milvus.grpc.SearchVectorInfos.query_range_array) return query_range_array_; @@ -2701,11 +2885,11 @@ SearchVectorInfos::query_range_array() const { inline void SearchVectorInfos::clear_topk() { topk_ = PROTOBUF_LONGLONG(0); } -inline ::google::protobuf::int64 SearchVectorInfos::topk() const { +inline ::PROTOBUF_NAMESPACE_ID::int64 SearchVectorInfos::topk() const { // @@protoc_insertion_point(field_get:milvus.grpc.SearchVectorInfos.topk) return topk_; } -inline void SearchVectorInfos::set_topk(::google::protobuf::int64 value) { +inline void SearchVectorInfos::set_topk(::PROTOBUF_NAMESPACE_ID::int64 value) { topk_ = value; // @@protoc_insertion_point(field_set:milvus.grpc.SearchVectorInfos.topk) @@ -2722,24 +2906,22 @@ inline int SearchVectorInFilesInfos::file_id_array_size() const { inline void SearchVectorInFilesInfos::clear_file_id_array() { file_id_array_.Clear(); } -inline const ::std::string& SearchVectorInFilesInfos::file_id_array(int index) const { +inline const std::string& SearchVectorInFilesInfos::file_id_array(int index) const { // @@protoc_insertion_point(field_get:milvus.grpc.SearchVectorInFilesInfos.file_id_array) return file_id_array_.Get(index); } -inline ::std::string* SearchVectorInFilesInfos::mutable_file_id_array(int index) { +inline std::string* SearchVectorInFilesInfos::mutable_file_id_array(int index) { // @@protoc_insertion_point(field_mutable:milvus.grpc.SearchVectorInFilesInfos.file_id_array) return file_id_array_.Mutable(index); } -inline void SearchVectorInFilesInfos::set_file_id_array(int index, const ::std::string& value) { +inline void SearchVectorInFilesInfos::set_file_id_array(int index, const std::string& value) { // @@protoc_insertion_point(field_set:milvus.grpc.SearchVectorInFilesInfos.file_id_array) file_id_array_.Mutable(index)->assign(value); } -#if LANG_CXX11 -inline void SearchVectorInFilesInfos::set_file_id_array(int index, ::std::string&& value) { +inline void SearchVectorInFilesInfos::set_file_id_array(int index, std::string&& value) { // @@protoc_insertion_point(field_set:milvus.grpc.SearchVectorInFilesInfos.file_id_array) file_id_array_.Mutable(index)->assign(std::move(value)); } -#endif inline void SearchVectorInFilesInfos::set_file_id_array(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); file_id_array_.Mutable(index)->assign(value); @@ -2750,20 +2932,18 @@ inline void SearchVectorInFilesInfos::set_file_id_array(int index, const char* v reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:milvus.grpc.SearchVectorInFilesInfos.file_id_array) } -inline ::std::string* SearchVectorInFilesInfos::add_file_id_array() { +inline std::string* SearchVectorInFilesInfos::add_file_id_array() { // @@protoc_insertion_point(field_add_mutable:milvus.grpc.SearchVectorInFilesInfos.file_id_array) return file_id_array_.Add(); } -inline void SearchVectorInFilesInfos::add_file_id_array(const ::std::string& value) { +inline void SearchVectorInFilesInfos::add_file_id_array(const std::string& value) { file_id_array_.Add()->assign(value); // @@protoc_insertion_point(field_add:milvus.grpc.SearchVectorInFilesInfos.file_id_array) } -#if LANG_CXX11 -inline void SearchVectorInFilesInfos::add_file_id_array(::std::string&& value) { +inline void SearchVectorInFilesInfos::add_file_id_array(std::string&& value) { file_id_array_.Add(std::move(value)); // @@protoc_insertion_point(field_add:milvus.grpc.SearchVectorInFilesInfos.file_id_array) } -#endif inline void SearchVectorInFilesInfos::add_file_id_array(const char* value) { GOOGLE_DCHECK(value != nullptr); file_id_array_.Add()->assign(value); @@ -2773,12 +2953,12 @@ inline void SearchVectorInFilesInfos::add_file_id_array(const char* value, size_ file_id_array_.Add()->assign(reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:milvus.grpc.SearchVectorInFilesInfos.file_id_array) } -inline const ::google::protobuf::RepeatedPtrField<::std::string>& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& SearchVectorInFilesInfos::file_id_array() const { // @@protoc_insertion_point(field_list:milvus.grpc.SearchVectorInFilesInfos.file_id_array) return file_id_array_; } -inline ::google::protobuf::RepeatedPtrField<::std::string>* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* SearchVectorInFilesInfos::mutable_file_id_array() { // @@protoc_insertion_point(field_mutable_list:milvus.grpc.SearchVectorInFilesInfos.file_id_array) return &file_id_array_; @@ -2817,14 +2997,14 @@ inline ::milvus::grpc::SearchVectorInfos* SearchVectorInFilesInfos::mutable_sear return search_vector_infos_; } inline void SearchVectorInFilesInfos::set_allocated_search_vector_infos(::milvus::grpc::SearchVectorInfos* search_vector_infos) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete search_vector_infos_; } if (search_vector_infos) { - ::google::protobuf::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; if (message_arena != submessage_arena) { - search_vector_infos = ::google::protobuf::internal::GetOwnedMessage( + search_vector_infos = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, search_vector_infos, submessage_arena); } @@ -2843,11 +3023,11 @@ inline void SearchVectorInFilesInfos::set_allocated_search_vector_infos(::milvus inline void QueryResult::clear_id() { id_ = PROTOBUF_LONGLONG(0); } -inline ::google::protobuf::int64 QueryResult::id() const { +inline ::PROTOBUF_NAMESPACE_ID::int64 QueryResult::id() const { // @@protoc_insertion_point(field_get:milvus.grpc.QueryResult.id) return id_; } -inline void QueryResult::set_id(::google::protobuf::int64 value) { +inline void QueryResult::set_id(::PROTOBUF_NAMESPACE_ID::int64 value) { id_ = value; // @@protoc_insertion_point(field_set:milvus.grpc.QueryResult.id) @@ -2898,14 +3078,14 @@ inline ::milvus::grpc::Status* TopKQueryResult::mutable_status() { return status_; } inline void TopKQueryResult::set_allocated_status(::milvus::grpc::Status* status) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { - delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_); } if (status) { - ::google::protobuf::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; if (message_arena != submessage_arena) { - status = ::google::protobuf::internal::GetOwnedMessage( + status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, status, submessage_arena); } @@ -2927,7 +3107,7 @@ inline ::milvus::grpc::QueryResult* TopKQueryResult::mutable_query_result_arrays // @@protoc_insertion_point(field_mutable:milvus.grpc.TopKQueryResult.query_result_arrays) return query_result_arrays_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::milvus::grpc::QueryResult >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::QueryResult >* TopKQueryResult::mutable_query_result_arrays() { // @@protoc_insertion_point(field_mutable_list:milvus.grpc.TopKQueryResult.query_result_arrays) return &query_result_arrays_; @@ -2940,7 +3120,7 @@ inline ::milvus::grpc::QueryResult* TopKQueryResult::add_query_result_arrays() { // @@protoc_insertion_point(field_add:milvus.grpc.TopKQueryResult.query_result_arrays) return query_result_arrays_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::milvus::grpc::QueryResult >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::QueryResult >& TopKQueryResult::query_result_arrays() const { // @@protoc_insertion_point(field_list:milvus.grpc.TopKQueryResult.query_result_arrays) return query_result_arrays_; @@ -2977,14 +3157,14 @@ inline ::milvus::grpc::Status* StringReply::mutable_status() { return status_; } inline void StringReply::set_allocated_status(::milvus::grpc::Status* status) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { - delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_); } if (status) { - ::google::protobuf::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; if (message_arena != submessage_arena) { - status = ::google::protobuf::internal::GetOwnedMessage( + status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, status, submessage_arena); } @@ -2997,54 +3177,52 @@ inline void StringReply::set_allocated_status(::milvus::grpc::Status* status) { // string string_reply = 2; inline void StringReply::clear_string_reply() { - string_reply_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + string_reply_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& StringReply::string_reply() const { +inline const std::string& StringReply::string_reply() const { // @@protoc_insertion_point(field_get:milvus.grpc.StringReply.string_reply) return string_reply_.GetNoArena(); } -inline void StringReply::set_string_reply(const ::std::string& value) { +inline void StringReply::set_string_reply(const std::string& value) { - string_reply_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + string_reply_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:milvus.grpc.StringReply.string_reply) } -#if LANG_CXX11 -inline void StringReply::set_string_reply(::std::string&& value) { +inline void StringReply::set_string_reply(std::string&& value) { string_reply_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.StringReply.string_reply) } -#endif inline void StringReply::set_string_reply(const char* value) { GOOGLE_DCHECK(value != nullptr); - string_reply_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + string_reply_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:milvus.grpc.StringReply.string_reply) } inline void StringReply::set_string_reply(const char* value, size_t size) { - string_reply_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + string_reply_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:milvus.grpc.StringReply.string_reply) } -inline ::std::string* StringReply::mutable_string_reply() { +inline std::string* StringReply::mutable_string_reply() { // @@protoc_insertion_point(field_mutable:milvus.grpc.StringReply.string_reply) - return string_reply_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return string_reply_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* StringReply::release_string_reply() { +inline std::string* StringReply::release_string_reply() { // @@protoc_insertion_point(field_release:milvus.grpc.StringReply.string_reply) - return string_reply_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return string_reply_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void StringReply::set_allocated_string_reply(::std::string* string_reply) { +inline void StringReply::set_allocated_string_reply(std::string* string_reply) { if (string_reply != nullptr) { } else { } - string_reply_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_reply); + string_reply_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), string_reply); // @@protoc_insertion_point(field_set_allocated:milvus.grpc.StringReply.string_reply) } @@ -3079,14 +3257,14 @@ inline ::milvus::grpc::Status* BoolReply::mutable_status() { return status_; } inline void BoolReply::set_allocated_status(::milvus::grpc::Status* status) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { - delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_); } if (status) { - ::google::protobuf::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; if (message_arena != submessage_arena) { - status = ::google::protobuf::internal::GetOwnedMessage( + status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, status, submessage_arena); } @@ -3142,14 +3320,14 @@ inline ::milvus::grpc::Status* TableRowCount::mutable_status() { return status_; } inline void TableRowCount::set_allocated_status(::milvus::grpc::Status* status) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { - delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_); } if (status) { - ::google::protobuf::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; if (message_arena != submessage_arena) { - status = ::google::protobuf::internal::GetOwnedMessage( + status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, status, submessage_arena); } @@ -3164,11 +3342,11 @@ inline void TableRowCount::set_allocated_status(::milvus::grpc::Status* status) inline void TableRowCount::clear_table_row_count() { table_row_count_ = PROTOBUF_LONGLONG(0); } -inline ::google::protobuf::int64 TableRowCount::table_row_count() const { +inline ::PROTOBUF_NAMESPACE_ID::int64 TableRowCount::table_row_count() const { // @@protoc_insertion_point(field_get:milvus.grpc.TableRowCount.table_row_count) return table_row_count_; } -inline void TableRowCount::set_table_row_count(::google::protobuf::int64 value) { +inline void TableRowCount::set_table_row_count(::PROTOBUF_NAMESPACE_ID::int64 value) { table_row_count_ = value; // @@protoc_insertion_point(field_set:milvus.grpc.TableRowCount.table_row_count) @@ -3180,54 +3358,52 @@ inline void TableRowCount::set_table_row_count(::google::protobuf::int64 value) // string cmd = 1; inline void Command::clear_cmd() { - cmd_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + cmd_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Command::cmd() const { +inline const std::string& Command::cmd() const { // @@protoc_insertion_point(field_get:milvus.grpc.Command.cmd) return cmd_.GetNoArena(); } -inline void Command::set_cmd(const ::std::string& value) { +inline void Command::set_cmd(const std::string& value) { - cmd_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + cmd_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:milvus.grpc.Command.cmd) } -#if LANG_CXX11 -inline void Command::set_cmd(::std::string&& value) { +inline void Command::set_cmd(std::string&& value) { cmd_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.Command.cmd) } -#endif inline void Command::set_cmd(const char* value) { GOOGLE_DCHECK(value != nullptr); - cmd_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + cmd_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:milvus.grpc.Command.cmd) } inline void Command::set_cmd(const char* value, size_t size) { - cmd_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + cmd_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:milvus.grpc.Command.cmd) } -inline ::std::string* Command::mutable_cmd() { +inline std::string* Command::mutable_cmd() { // @@protoc_insertion_point(field_mutable:milvus.grpc.Command.cmd) - return cmd_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return cmd_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Command::release_cmd() { +inline std::string* Command::release_cmd() { // @@protoc_insertion_point(field_release:milvus.grpc.Command.cmd) - return cmd_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return cmd_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Command::set_allocated_cmd(::std::string* cmd) { +inline void Command::set_allocated_cmd(std::string* cmd) { if (cmd != nullptr) { } else { } - cmd_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), cmd); + cmd_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), cmd); // @@protoc_insertion_point(field_set_allocated:milvus.grpc.Command.cmd) } @@ -3262,14 +3438,14 @@ inline ::milvus::grpc::Status* ServerStatus::mutable_status() { return status_; } inline void ServerStatus::set_allocated_status(::milvus::grpc::Status* status) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { - delete reinterpret_cast< ::google::protobuf::MessageLite*>(status_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_); } if (status) { - ::google::protobuf::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; if (message_arena != submessage_arena) { - status = ::google::protobuf::internal::GetOwnedMessage( + status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, status, submessage_arena); } @@ -3282,54 +3458,52 @@ inline void ServerStatus::set_allocated_status(::milvus::grpc::Status* status) { // string info = 2; inline void ServerStatus::clear_info() { - info_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + info_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& ServerStatus::info() const { +inline const std::string& ServerStatus::info() const { // @@protoc_insertion_point(field_get:milvus.grpc.ServerStatus.info) return info_.GetNoArena(); } -inline void ServerStatus::set_info(const ::std::string& value) { +inline void ServerStatus::set_info(const std::string& value) { - info_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + info_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:milvus.grpc.ServerStatus.info) } -#if LANG_CXX11 -inline void ServerStatus::set_info(::std::string&& value) { +inline void ServerStatus::set_info(std::string&& value) { info_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.ServerStatus.info) } -#endif inline void ServerStatus::set_info(const char* value) { GOOGLE_DCHECK(value != nullptr); - info_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + info_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:milvus.grpc.ServerStatus.info) } inline void ServerStatus::set_info(const char* value, size_t size) { - info_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + info_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:milvus.grpc.ServerStatus.info) } -inline ::std::string* ServerStatus::mutable_info() { +inline std::string* ServerStatus::mutable_info() { // @@protoc_insertion_point(field_mutable:milvus.grpc.ServerStatus.info) - return info_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return info_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* ServerStatus::release_info() { +inline std::string* ServerStatus::release_info() { // @@protoc_insertion_point(field_release:milvus.grpc.ServerStatus.info) - return info_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return info_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void ServerStatus::set_allocated_info(::std::string* info) { +inline void ServerStatus::set_allocated_info(std::string* info) { if (info != nullptr) { } else { } - info_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), info); + info_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), info); // @@protoc_insertion_point(field_set_allocated:milvus.grpc.ServerStatus.info) } @@ -3373,4 +3547,4 @@ inline void ServerStatus::set_allocated_info(::std::string* info) { // @@protoc_insertion_point(global_scope) #include -#endif // PROTOBUF_INCLUDED_milvus_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_milvus_2eproto diff --git a/cpp/src/grpc/gen-status/status.grpc.pb.h b/cpp/src/grpc/gen-status/status.grpc.pb.h index c645a1e473..5e3d4888ef 100644 --- a/cpp/src/grpc/gen-status/status.grpc.pb.h +++ b/cpp/src/grpc/gen-status/status.grpc.pb.h @@ -11,20 +11,28 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include #include -namespace grpc { +namespace grpc_impl { class CompletionQueue; -class Channel; class ServerCompletionQueue; class ServerContext; +} // namespace grpc_impl + +namespace grpc { +namespace experimental { +template +class MessageAllocator; +} // namespace experimental } // namespace grpc namespace milvus { diff --git a/cpp/src/grpc/gen-status/status.pb.cc b/cpp/src/grpc/gen-status/status.pb.cc index 96d5345328..35a41482b1 100644 --- a/cpp/src/grpc/gen-status/status.pb.cc +++ b/cpp/src/grpc/gen-status/status.pb.cc @@ -8,45 +8,40 @@ #include #include #include -#include +#include #include #include #include #include // @@protoc_insertion_point(includes) #include - namespace milvus { namespace grpc { class StatusDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Status_default_instance_; } // namespace grpc } // namespace milvus -static void InitDefaultsStatus_status_2eproto() { +static void InitDefaultsscc_info_Status_status_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::milvus::grpc::_Status_default_instance_; new (ptr) ::milvus::grpc::Status(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } ::milvus::grpc::Status::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_Status_status_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsStatus_status_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Status_status_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Status_status_2eproto}, {}}; -void InitDefaults_status_2eproto() { - ::google::protobuf::internal::InitSCC(&scc_info_Status_status_2eproto.base); -} +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_status_2eproto[1]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_status_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_status_2eproto = nullptr; -::google::protobuf::Metadata file_level_metadata_status_2eproto[1]; -const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors_status_2eproto[1]; -constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_status_2eproto = nullptr; - -const ::google::protobuf::uint32 TableStruct_status_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_status_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::grpc::Status, _internal_metadata_), ~0u, // no _extensions_ @@ -55,18 +50,12 @@ const ::google::protobuf::uint32 TableStruct_status_2eproto::offsets[] PROTOBUF_ PROTOBUF_FIELD_OFFSET(::milvus::grpc::Status, error_code_), PROTOBUF_FIELD_OFFSET(::milvus::grpc::Status, reason_), }; -static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(::milvus::grpc::Status)}, }; -static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::milvus::grpc::_Status_default_instance_), -}; - -::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_status_2eproto = { - {}, AddDescriptors_status_2eproto, "status.proto", schemas, - file_default_instances, TableStruct_status_2eproto::offsets, - file_level_metadata_status_2eproto, 1, file_level_enum_descriptors_status_2eproto, file_level_service_descriptors_status_2eproto, +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::milvus::grpc::_Status_default_instance_), }; const char descriptor_table_protodef_status_2eproto[] = @@ -86,25 +75,26 @@ const char descriptor_table_protodef_status_2eproto[] = "\030\n\024CANNOT_DELETE_FOLDER\020\023\022\026\n\022CANNOT_DELE" "TE_FILE\020\024\022\025\n\021BUILD_INDEX_ERROR\020\025b\006proto3" ; -::google::protobuf::internal::DescriptorTable descriptor_table_status_2eproto = { - false, InitDefaults_status_2eproto, - descriptor_table_protodef_status_2eproto, - "status.proto", &assign_descriptors_table_status_2eproto, 600, +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_status_2eproto_deps[1] = { +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_status_2eproto_sccs[1] = { + &scc_info_Status_status_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_status_2eproto_once; +static bool descriptor_table_status_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_status_2eproto = { + &descriptor_table_status_2eproto_initialized, descriptor_table_protodef_status_2eproto, "status.proto", 600, + &descriptor_table_status_2eproto_once, descriptor_table_status_2eproto_sccs, descriptor_table_status_2eproto_deps, 1, 0, + schemas, file_default_instances, TableStruct_status_2eproto::offsets, + file_level_metadata_status_2eproto, 1, file_level_enum_descriptors_status_2eproto, file_level_service_descriptors_status_2eproto, }; -void AddDescriptors_status_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[1] = - { - }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_status_2eproto, deps, 0); -} - // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_status_2eproto = []() { AddDescriptors_status_2eproto(); return true; }(); +static bool dynamic_init_dummy_status_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_status_2eproto), true); namespace milvus { namespace grpc { -const ::google::protobuf::EnumDescriptor* ErrorCode_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_status_2eproto); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ErrorCode_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_status_2eproto); return file_level_enum_descriptors_status_2eproto[0]; } bool ErrorCode_IsValid(int value) { @@ -152,26 +142,25 @@ const int Status::kReasonFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Status::Status() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:milvus.grpc.Status) } Status::Status(const Status& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - reason_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + reason_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.reason().size() > 0) { - reason_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reason_); + reason_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.reason_); } error_code_ = from.error_code_; // @@protoc_insertion_point(copy_constructor:milvus.grpc.Status) } void Status::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_Status_status_2eproto.base); - reason_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Status_status_2eproto.base); + reason_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); error_code_ = 0; } @@ -181,106 +170,88 @@ Status::~Status() { } void Status::SharedDtor() { - reason_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + reason_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void Status::SetCachedSize(int size) const { _cached_size_.Set(size); } const Status& Status::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Status_status_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Status_status_2eproto.base); return *internal_default_instance(); } void Status::Clear() { // @@protoc_insertion_point(message_clear_start:milvus.grpc.Status) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - reason_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + reason_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); error_code_ = 0; _internal_metadata_.Clear(); } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Status::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* Status::_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) { // .milvus.grpc.ErrorCode error_code = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); - msg->set_error_code(static_cast<::milvus::grpc::ErrorCode>(val)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + set_error_code(static_cast<::milvus::grpc::ErrorCode>(val)); + } else goto handle_unusual; + continue; // string reason = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("milvus.grpc.Status.reason"); - object = msg->mutable_reason(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_reason(), ptr, ctx, "milvus.grpc.Status.reason"); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); +failure: + ptr = nullptr; + goto success; +#undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool Status::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:milvus.grpc.Status) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .milvus.grpc.ErrorCode error_code = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( input, &value))); set_error_code(static_cast< ::milvus::grpc::ErrorCode >(value)); } else { @@ -291,12 +262,12 @@ bool Status::MergePartialFromCodedStream( // string reason = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_reason())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->reason().data(), static_cast(this->reason().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.grpc.Status.reason")); } else { goto handle_unusual; @@ -309,7 +280,7 @@ bool Status::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -326,59 +297,59 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Status::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:milvus.grpc.Status) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.ErrorCode error_code = 1; if (this->error_code() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( 1, this->error_code(), output); } // string reason = 2; if (this->reason().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->reason().data(), static_cast(this->reason().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.Status.reason"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->reason(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:milvus.grpc.Status) } -::google::protobuf::uint8* Status::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Status::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.Status) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .milvus.grpc.ErrorCode error_code = 1; if (this->error_code() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 1, this->error_code(), target); } // string reason = 2; if (this->reason().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->reason().data(), static_cast(this->reason().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.grpc.Status.reason"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 2, this->reason(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.Status) @@ -391,40 +362,40 @@ size_t Status::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string reason = 2; if (this->reason().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->reason()); } // .milvus.grpc.ErrorCode error_code = 1; if (this->error_code() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->error_code()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->error_code()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Status::MergeFrom(const ::google::protobuf::Message& from) { +void Status::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.Status) GOOGLE_DCHECK_NE(&from, this); const Status* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.Status) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.Status) MergeFrom(*source); @@ -435,19 +406,19 @@ void Status::MergeFrom(const Status& from) { // @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.Status) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.reason().size() > 0) { - reason_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reason_); + reason_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.reason_); } if (from.error_code() != 0) { set_error_code(from.error_code()); } } -void Status::CopyFrom(const ::google::protobuf::Message& from) { +void Status::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.Status) if (&from == this) return; Clear(); @@ -472,27 +443,24 @@ void Status::Swap(Status* other) { void Status::InternalSwap(Status* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - reason_.Swap(&other->reason_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + reason_.Swap(&other->reason_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(error_code_, other->error_code_); } -::google::protobuf::Metadata Status::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_status_2eproto); - return ::file_level_metadata_status_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata Status::GetMetadata() const { + return GetMetadataStatic(); } // @@protoc_insertion_point(namespace_scope) } // namespace grpc } // namespace milvus -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN template<> PROTOBUF_NOINLINE ::milvus::grpc::Status* Arena::CreateMaybeMessage< ::milvus::grpc::Status >(Arena* arena) { return Arena::CreateInternal< ::milvus::grpc::Status >(arena); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include diff --git a/cpp/src/grpc/gen-status/status.pb.h b/cpp/src/grpc/gen-status/status.pb.h index ce6ddcd87c..996814b6d1 100644 --- a/cpp/src/grpc/gen-status/status.pb.h +++ b/cpp/src/grpc/gen-status/status.pb.h @@ -1,19 +1,19 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: status.proto -#ifndef PROTOBUF_INCLUDED_status_2eproto -#define PROTOBUF_INCLUDED_status_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_status_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_status_2eproto #include #include #include -#if PROTOBUF_VERSION < 3007000 +#if PROTOBUF_VERSION < 3008000 #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 3007000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3008000 < 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. @@ -27,6 +27,7 @@ #include #include #include +#include #include #include // IWYU pragma: export #include // IWYU pragma: export @@ -35,20 +36,25 @@ // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_status_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct TableStruct_status_2eproto { - static const ::google::protobuf::internal::ParseTableField entries[] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[1] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::FieldMetadata field_metadata[]; - static const ::google::protobuf::internal::SerializationTable serialization_table[]; - static const ::google::protobuf::uint32 offsets[]; + 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[]; }; -void AddDescriptors_status_2eproto(); +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_status_2eproto; namespace milvus { namespace grpc { class Status; @@ -56,15 +62,13 @@ class StatusDefaultTypeInternal; extern StatusDefaultTypeInternal _Status_default_instance_; } // namespace grpc } // namespace milvus -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN template<> ::milvus::grpc::Status* Arena::CreateMaybeMessage<::milvus::grpc::Status>(Arena*); -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE namespace milvus { namespace grpc { -enum ErrorCode { +enum ErrorCode : int { SUCCESS = 0, UNEXPECTED_ERROR = 1, CONNECT_FAILED = 2, @@ -87,44 +91,46 @@ enum ErrorCode { CANNOT_DELETE_FOLDER = 19, CANNOT_DELETE_FILE = 20, BUILD_INDEX_ERROR = 21, - ErrorCode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::min(), - ErrorCode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::max() + ErrorCode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + ErrorCode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() }; bool ErrorCode_IsValid(int value); -const ErrorCode ErrorCode_MIN = SUCCESS; -const ErrorCode ErrorCode_MAX = BUILD_INDEX_ERROR; -const int ErrorCode_ARRAYSIZE = ErrorCode_MAX + 1; +constexpr ErrorCode ErrorCode_MIN = SUCCESS; +constexpr ErrorCode ErrorCode_MAX = BUILD_INDEX_ERROR; +constexpr int ErrorCode_ARRAYSIZE = ErrorCode_MAX + 1; -const ::google::protobuf::EnumDescriptor* ErrorCode_descriptor(); -inline const ::std::string& ErrorCode_Name(ErrorCode value) { - return ::google::protobuf::internal::NameOfEnum( - ErrorCode_descriptor(), value); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ErrorCode_descriptor(); +template +inline const std::string& ErrorCode_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ErrorCode_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + ErrorCode_descriptor(), enum_t_value); } inline bool ErrorCode_Parse( - const ::std::string& name, ErrorCode* value) { - return ::google::protobuf::internal::ParseNamedEnum( + const std::string& name, ErrorCode* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( ErrorCode_descriptor(), name, value); } // =================================================================== -class Status final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.Status) */ { +class Status : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.Status) */ { public: Status(); virtual ~Status(); Status(const Status& from); - - inline Status& operator=(const Status& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Status(Status&& from) noexcept : Status() { *this = ::std::move(from); } + inline Status& operator=(const Status& from) { + CopyFrom(from); + return *this; + } inline Status& operator=(Status&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -133,9 +139,15 @@ class Status final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + 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 Status& default_instance(); @@ -158,11 +170,11 @@ class Status final : return CreateMaybeMessage(nullptr); } - Status* New(::google::protobuf::Arena* arena) const final { + Status* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Status& from); void MergeFrom(const Status& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -170,25 +182,28 @@ class Status final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::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: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Status* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.Status"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -196,7 +211,14 @@ class Status final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_status_2eproto); + return ::descriptor_table_status_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -205,16 +227,14 @@ class Status final : // string reason = 2; void clear_reason(); static const int kReasonFieldNumber = 2; - const ::std::string& reason() const; - void set_reason(const ::std::string& value); - #if LANG_CXX11 - void set_reason(::std::string&& value); - #endif + const std::string& reason() const; + void set_reason(const std::string& value); + void set_reason(std::string&& value); void set_reason(const char* value); void set_reason(const char* value, size_t size); - ::std::string* mutable_reason(); - ::std::string* release_reason(); - void set_allocated_reason(::std::string* reason); + std::string* mutable_reason(); + std::string* release_reason(); + void set_allocated_reason(std::string* reason); // .milvus.grpc.ErrorCode error_code = 1; void clear_error_code(); @@ -226,10 +246,10 @@ class Status final : private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr reason_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr reason_; int error_code_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_status_2eproto; }; // =================================================================== @@ -259,54 +279,52 @@ inline void Status::set_error_code(::milvus::grpc::ErrorCode value) { // string reason = 2; inline void Status::clear_reason() { - reason_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + reason_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Status::reason() const { +inline const std::string& Status::reason() const { // @@protoc_insertion_point(field_get:milvus.grpc.Status.reason) return reason_.GetNoArena(); } -inline void Status::set_reason(const ::std::string& value) { +inline void Status::set_reason(const std::string& value) { - reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:milvus.grpc.Status.reason) } -#if LANG_CXX11 -inline void Status::set_reason(::std::string&& value) { +inline void Status::set_reason(std::string&& value) { reason_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.Status.reason) } -#endif inline void Status::set_reason(const char* value) { GOOGLE_DCHECK(value != nullptr); - reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:milvus.grpc.Status.reason) } inline void Status::set_reason(const char* value, size_t size) { - reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:milvus.grpc.Status.reason) } -inline ::std::string* Status::mutable_reason() { +inline std::string* Status::mutable_reason() { // @@protoc_insertion_point(field_mutable:milvus.grpc.Status.reason) - return reason_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return reason_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Status::release_reason() { +inline std::string* Status::release_reason() { // @@protoc_insertion_point(field_release:milvus.grpc.Status.reason) - return reason_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return reason_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Status::set_allocated_reason(::std::string* reason) { +inline void Status::set_allocated_reason(std::string* reason) { if (reason != nullptr) { } else { } - reason_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), reason); + reason_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), reason); // @@protoc_insertion_point(field_set_allocated:milvus.grpc.Status.reason) } @@ -319,8 +337,7 @@ inline void Status::set_allocated_reason(::std::string* reason) { } // namespace grpc } // namespace milvus -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN template <> struct is_proto_enum< ::milvus::grpc::ErrorCode> : ::std::true_type {}; template <> @@ -328,10 +345,9 @@ inline const EnumDescriptor* GetEnumDescriptor< ::milvus::grpc::ErrorCode>() { return ::milvus::grpc::ErrorCode_descriptor(); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // PROTOBUF_INCLUDED_status_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_status_2eproto diff --git a/cpp/src/sdk/CMakeLists.txt b/cpp/src/sdk/CMakeLists.txt index 09930934a1..5ad472100c 100644 --- a/cpp/src/sdk/CMakeLists.txt +++ b/cpp/src/sdk/CMakeLists.txt @@ -33,6 +33,7 @@ if (MILVUS_ENABLE_THRIFT STREQUAL "ON") target_link_libraries(milvus_thrift_sdk ${third_party_libs} ) + install(TARGETS milvus_thrift_sdk DESTINATION lib) else() aux_source_directory(grpc grpc_client_files) @@ -56,12 +57,6 @@ else() target_link_libraries(milvus_grpc_sdk ${third_party_libs} ) - -endif() - -if (MILVUS_ENABLE_THRIFT STREQUAL "ON") - install(TARGETS milvus_thrift_sdk DESTINATION lib) -else() install(TARGETS milvus_grpc_sdk DESTINATION lib) endif() diff --git a/cpp/src/sdk/examples/CMakeLists.txt b/cpp/src/sdk/examples/CMakeLists.txt index 2205a77869..8a13f2b5d6 100644 --- a/cpp/src/sdk/examples/CMakeLists.txt +++ b/cpp/src/sdk/examples/CMakeLists.txt @@ -4,5 +4,8 @@ # Proprietary and confidential. #------------------------------------------------------------------------------- -add_subdirectory(thriftsimple) -add_subdirectory(grpcsimple) \ No newline at end of file +if (MILVUS_ENABLE_THRIFT STREQUAL "ON") + add_subdirectory(thriftsimple) +else() + add_subdirectory(grpcsimple) +endif() \ No newline at end of file diff --git a/cpp/src/sdk/examples/grpcsimple/src/ClientTest.cpp b/cpp/src/sdk/examples/grpcsimple/src/ClientTest.cpp index d75b21a06f..ca8feeef80 100644 --- a/cpp/src/sdk/examples/grpcsimple/src/ClientTest.cpp +++ b/cpp/src/sdk/examples/grpcsimple/src/ClientTest.cpp @@ -17,14 +17,14 @@ using namespace milvus; namespace { std::string GetTableName(); - static const std::string TABLE_NAME = GetTableName(); - static constexpr int64_t TABLE_DIMENSION = 512; - static constexpr int64_t BATCH_ROW_COUNT = 100000; - static constexpr int64_t NQ = 10; - static constexpr int64_t TOP_K = 10; - static constexpr int64_t SEARCH_TARGET = 5000; //change this value, result is different - static constexpr int64_t ADD_VECTOR_LOOP = 5; - static constexpr int64_t SECONDS_EACH_HOUR = 3600; + const std::string TABLE_NAME = GetTableName(); + constexpr int64_t TABLE_DIMENSION = 512; + constexpr int64_t BATCH_ROW_COUNT = 100000; + constexpr int64_t NQ = 10; + constexpr int64_t TOP_K = 10; + constexpr int64_t SEARCH_TARGET = 5000; //change this value, result is different + constexpr int64_t ADD_VECTOR_LOOP = 5; + constexpr int64_t SECONDS_EACH_HOUR = 3600; #define BLOCK_SPLITER std::cout << "===========================================" << std::endl; @@ -124,7 +124,7 @@ namespace { class TimeRecorder { public: - TimeRecorder(const std::string& title) + explicit TimeRecorder(const std::string& title) : title_(title) { start_ = std::chrono::system_clock::now(); } diff --git a/cpp/src/sdk/examples/thriftsimple/src/ClientTest.cpp b/cpp/src/sdk/examples/thriftsimple/src/ClientTest.cpp index 2fb36ea181..8af900d786 100644 --- a/cpp/src/sdk/examples/thriftsimple/src/ClientTest.cpp +++ b/cpp/src/sdk/examples/thriftsimple/src/ClientTest.cpp @@ -17,13 +17,13 @@ namespace { std::string GetTableName(); static const std::string TABLE_NAME = GetTableName(); - static constexpr int64_t TABLE_DIMENSION = 512; - static constexpr int64_t BATCH_ROW_COUNT = 100000; - static constexpr int64_t NQ = 10; - static constexpr int64_t TOP_K = 10; - static constexpr int64_t SEARCH_TARGET = 5000; //change this value, result is different - static constexpr int64_t ADD_VECTOR_LOOP = 10; - static constexpr int64_t SECONDS_EACH_HOUR = 3600; + constexpr int64_t TABLE_DIMENSION = 512; + constexpr int64_t BATCH_ROW_COUNT = 100000; + constexpr int64_t NQ = 10; + constexpr int64_t TOP_K = 10; + constexpr int64_t SEARCH_TARGET = 5000; //change this value, result is different + constexpr int64_t ADD_VECTOR_LOOP = 10; + constexpr int64_t SECONDS_EACH_HOUR = 3600; #define BLOCK_SPLITER std::cout << "===========================================" << std::endl; diff --git a/cpp/src/sdk/thrift/ThriftClient.h b/cpp/src/sdk/thrift/ThriftClient.h index 1b97dc73a0..ed77179b96 100644 --- a/cpp/src/sdk/thrift/ThriftClient.h +++ b/cpp/src/sdk/thrift/ThriftClient.h @@ -14,9 +14,9 @@ namespace milvus { using ServiceClientPtr = std::shared_ptr<::milvus::thrift::MilvusServiceClient>; -static const std::string THRIFT_PROTOCOL_JSON = "json"; -static const std::string THRIFT_PROTOCOL_BINARY = "binary"; -static const std::string THRIFT_PROTOCOL_COMPACT = "compact"; +static const char* THRIFT_PROTOCOL_JSON = "json"; +static const char* THRIFT_PROTOCOL_BINARY = "binary"; +static const char* THRIFT_PROTOCOL_COMPACT = "compact"; class ThriftClient { public: diff --git a/cpp/src/server/ServerConfig.h b/cpp/src/server/ServerConfig.h index bb7d5d3669..5bb416f725 100644 --- a/cpp/src/server/ServerConfig.h +++ b/cpp/src/server/ServerConfig.h @@ -14,45 +14,45 @@ namespace zilliz { namespace milvus { namespace server { -static const std::string CONFIG_SERVER = "server_config"; -static const std::string CONFIG_SERVER_ADDRESS = "address"; -static const std::string CONFIG_SERVER_PORT = "port"; -static const std::string CONFIG_SERVER_PROTOCOL = "transfer_protocol"; -static const std::string CONFIG_CLUSTER_MODE = "mode"; -static const std::string CONFIG_GPU_INDEX = "gpu_index"; +static const char* CONFIG_SERVER = "server_config"; +static const char* CONFIG_SERVER_ADDRESS = "address"; +static const char* CONFIG_SERVER_PORT = "port"; +static const char* CONFIG_SERVER_PROTOCOL = "transfer_protocol"; +static const char* CONFIG_CLUSTER_MODE = "mode"; +static const char* CONFIG_GPU_INDEX = "gpu_index"; -static const std::string CONFIG_DB = "db_config"; -static const std::string CONFIG_DB_URL = "db_backend_url"; -static const std::string CONFIG_DB_PATH = "db_path"; -static const std::string CONFIG_DB_SLAVE_PATH = "db_slave_path"; -static const std::string CONFIG_DB_INDEX_TRIGGER_SIZE = "index_building_threshold"; -static const std::string CONFIG_DB_ARCHIVE_DISK = "archive_disk_threshold"; -static const std::string CONFIG_DB_ARCHIVE_DAYS = "archive_days_threshold"; -static const std::string CONFIG_DB_INSERT_BUFFER_SIZE = "insert_buffer_size"; -static const std::string CONFIG_DB_PARALLEL_REDUCE = "parallel_reduce"; +static const char* CONFIG_DB = "db_config"; +static const char* CONFIG_DB_URL = "db_backend_url"; +static const char* CONFIG_DB_PATH = "db_path"; +static const char* CONFIG_DB_SLAVE_PATH = "db_slave_path"; +static const char* CONFIG_DB_INDEX_TRIGGER_SIZE = "index_building_threshold"; +static const char* CONFIG_DB_ARCHIVE_DISK = "archive_disk_threshold"; +static const char* CONFIG_DB_ARCHIVE_DAYS = "archive_days_threshold"; +static const char* CONFIG_DB_INSERT_BUFFER_SIZE = "insert_buffer_size"; +static const char* CONFIG_DB_PARALLEL_REDUCE = "parallel_reduce"; -static const std::string CONFIG_LOG = "log_config"; +static const char* CONFIG_LOG = "log_config"; -static const std::string CONFIG_CACHE = "cache_config"; -static const std::string CONFIG_CPU_CACHE_CAPACITY = "cpu_cache_capacity"; -static const std::string CONFIG_GPU_CACHE_CAPACITY = "gpu_cache_capacity"; -static const std::string CACHE_FREE_PERCENT = "cache_free_percent"; -static const std::string CONFIG_INSERT_CACHE_IMMEDIATELY = "insert_cache_immediately"; +static const char* CONFIG_CACHE = "cache_config"; +static const char* CONFIG_CPU_CACHE_CAPACITY = "cpu_cache_capacity"; +static const char* CONFIG_GPU_CACHE_CAPACITY = "gpu_cache_capacity"; +static const char* CACHE_FREE_PERCENT = "cache_free_percent"; +static const char* CONFIG_INSERT_CACHE_IMMEDIATELY = "insert_cache_immediately"; -static const std::string CONFIG_LICENSE = "license_config"; -static const std::string CONFIG_LICENSE_PATH = "license_path"; +static const char* CONFIG_LICENSE = "license_config"; +static const char* CONFIG_LICENSE_PATH = "license_path"; -static const std::string CONFIG_METRIC = "metric_config"; -static const std::string CONFIG_METRIC_IS_STARTUP = "is_startup"; -static const std::string CONFIG_METRIC_COLLECTOR = "collector"; -static const std::string CONFIG_PROMETHEUS = "prometheus_config"; -static const std::string CONFIG_METRIC_PROMETHEUS_PORT = "port"; +static const char* CONFIG_METRIC = "metric_config"; +static const char* CONFIG_METRIC_IS_STARTUP = "is_startup"; +static const char* CONFIG_METRIC_COLLECTOR = "collector"; +static const char* CONFIG_PROMETHEUS = "prometheus_config"; +static const char* CONFIG_METRIC_PROMETHEUS_PORT = "port"; -static const std::string CONFIG_ENGINE = "engine_config"; -static const std::string CONFIG_NPROBE = "nprobe"; -static const std::string CONFIG_NLIST = "nlist"; -static const std::string CONFIG_DCBT = "use_blas_threshold"; -static const std::string CONFIG_METRICTYPE = "metric_type"; +static const char* CONFIG_ENGINE = "engine_config"; +static const char* CONFIG_NPROBE = "nprobe"; +static const char* CONFIG_NLIST = "nlist"; +static const char* CONFIG_DCBT = "use_blas_threshold"; +static const char* CONFIG_METRICTYPE = "metric_type"; class ServerConfig { public: diff --git a/cpp/src/server/thrift_impl/RequestTask.cpp b/cpp/src/server/thrift_impl/RequestTask.cpp index be94e00261..1d20f55bc6 100644 --- a/cpp/src/server/thrift_impl/RequestTask.cpp +++ b/cpp/src/server/thrift_impl/RequestTask.cpp @@ -22,9 +22,9 @@ namespace server { using namespace ::milvus; -static const std::string DQL_TASK_GROUP = "dql"; -static const std::string DDL_DML_TASK_GROUP = "ddl_dml"; -static const std::string PING_TASK_GROUP = "ping"; +static const char* DQL_TASK_GROUP = "dql"; +static const char* DDL_DML_TASK_GROUP = "ddl_dml"; +static const char* PING_TASK_GROUP = "ping"; using DB_META = zilliz::milvus::engine::meta::Meta; using DB_DATE = zilliz::milvus::engine::meta::DateT; diff --git a/cpp/unittest/db/db_tests.cpp b/cpp/unittest/db/db_tests.cpp index 0d17ecbb16..bf6319ab90 100644 --- a/cpp/unittest/db/db_tests.cpp +++ b/cpp/unittest/db/db_tests.cpp @@ -21,7 +21,7 @@ using namespace zilliz::milvus; namespace { - static const std::string TABLE_NAME = "test_group"; + static const char* TABLE_NAME = "test_group"; static constexpr int64_t TABLE_DIM = 256; static constexpr int64_t VECTOR_COUNT = 250000; static constexpr int64_t INSERT_LOOP = 10000; diff --git a/cpp/unittest/db/mem_test.cpp b/cpp/unittest/db/mem_test.cpp index 17d87030cd..a0a686d948 100644 --- a/cpp/unittest/db/mem_test.cpp +++ b/cpp/unittest/db/mem_test.cpp @@ -21,7 +21,7 @@ using namespace zilliz::milvus; namespace { -static const std::string TABLE_NAME = "test_group"; +static const char* TABLE_NAME = "test_group"; static constexpr int64_t TABLE_DIM = 256; static constexpr int64_t VECTOR_COUNT = 250000; static constexpr int64_t INSERT_LOOP = 10000; diff --git a/cpp/unittest/db/mysql_db_test.cpp b/cpp/unittest/db/mysql_db_test.cpp index 9bf4e6d19a..7209f68f89 100644 --- a/cpp/unittest/db/mysql_db_test.cpp +++ b/cpp/unittest/db/mysql_db_test.cpp @@ -20,7 +20,7 @@ using namespace zilliz::milvus; namespace { - static const std::string TABLE_NAME = "test_group"; + static const char* TABLE_NAME = "test_group"; static constexpr int64_t TABLE_DIM = 256; static constexpr int64_t VECTOR_COUNT = 250000; static constexpr int64_t INSERT_LOOP = 10000; diff --git a/cpp/unittest/metrics/metrics_test.cpp b/cpp/unittest/metrics/metrics_test.cpp index 883e63ed03..9768a5a1f4 100644 --- a/cpp/unittest/metrics/metrics_test.cpp +++ b/cpp/unittest/metrics/metrics_test.cpp @@ -35,7 +35,7 @@ TEST_F(MetricTest, Metric_Tes) { zilliz::milvus::cache::CpuCacheMgr::GetInstance()->SetCapacity(1UL*1024*1024*1024); std::cout<CacheCapacity()<