MS-592 Change showtables stream transport to unary

Former-commit-id: c094aa407179fc9b5aea81fdda3fe849d7564bda
pull/191/head
Yu Kun 2019-09-26 11:43:45 +08:00
parent cf3798dd55
commit 786e9c5adc
15 changed files with 1366 additions and 567 deletions

View File

@ -153,6 +153,7 @@ Please mark all change in change log and use the ticket from JIRA.
- MS-546 - Add simple mode resource_config
- MS-570 - Add prometheus docker-compose file
- MS-576 - Scheduler refactor
- MS-592 - Change showtables stream transport to unary
## New Feature
- MS-343 - Implement ResourceMgr

View File

@ -53,7 +53,7 @@ MilvusService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& chan
, rpcmethod_SearchInFiles_(MilvusService_method_names[6], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_DescribeTable_(MilvusService_method_names[7], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_CountTable_(MilvusService_method_names[8], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_ShowTables_(MilvusService_method_names[9], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
, rpcmethod_ShowTables_(MilvusService_method_names[9], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_Cmd_(MilvusService_method_names[10], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_DeleteByRange_(MilvusService_method_names[11], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_PreloadTable_(MilvusService_method_names[12], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
@ -313,20 +313,32 @@ void MilvusService::Stub::experimental_async::CountTable(::grpc::ClientContext*
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TableRowCount>::Create(channel_.get(), cq, rpcmethod_CountTable_, context, request, false);
}
::grpc::ClientReader< ::milvus::grpc::TableName>* MilvusService::Stub::ShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request) {
return ::grpc_impl::internal::ClientReaderFactory< ::milvus::grpc::TableName>::Create(channel_.get(), rpcmethod_ShowTables_, context, request);
::grpc::Status MilvusService::Stub::ShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::milvus::grpc::TableNameList* response) {
return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_ShowTables_, context, request, response);
}
void MilvusService::Stub::experimental_async::ShowTables(::grpc::ClientContext* context, ::milvus::grpc::Command* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TableName>* reactor) {
::grpc_impl::internal::ClientCallbackReaderFactory< ::milvus::grpc::TableName>::Create(stub_->channel_.get(), stub_->rpcmethod_ShowTables_, context, request, reactor);
void MilvusService::Stub::experimental_async::ShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response, std::function<void(::grpc::Status)> f) {
::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ShowTables_, context, request, response, std::move(f));
}
::grpc::ClientAsyncReader< ::milvus::grpc::TableName>* MilvusService::Stub::AsyncShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq, void* tag) {
return ::grpc_impl::internal::ClientAsyncReaderFactory< ::milvus::grpc::TableName>::Create(channel_.get(), cq, rpcmethod_ShowTables_, context, request, true, tag);
void MilvusService::Stub::experimental_async::ShowTables(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableNameList* response, std::function<void(::grpc::Status)> f) {
::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ShowTables_, context, request, response, std::move(f));
}
::grpc::ClientAsyncReader< ::milvus::grpc::TableName>* MilvusService::Stub::PrepareAsyncShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) {
return ::grpc_impl::internal::ClientAsyncReaderFactory< ::milvus::grpc::TableName>::Create(channel_.get(), cq, rpcmethod_ShowTables_, context, request, false, nullptr);
void MilvusService::Stub::experimental_async::ShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ShowTables_, context, request, response, reactor);
}
void MilvusService::Stub::experimental_async::ShowTables(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableNameList* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ShowTables_, context, request, response, reactor);
}
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableNameList>* MilvusService::Stub::AsyncShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) {
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TableNameList>::Create(channel_.get(), cq, rpcmethod_ShowTables_, context, request, true);
}
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableNameList>* MilvusService::Stub::PrepareAsyncShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) {
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TableNameList>::Create(channel_.get(), cq, rpcmethod_ShowTables_, context, request, false);
}
::grpc::Status MilvusService::Stub::Cmd(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::milvus::grpc::StringReply* response) {
@ -517,8 +529,8 @@ MilvusService::Service::Service() {
std::mem_fn(&MilvusService::Service::CountTable), 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>(
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::Command, ::milvus::grpc::TableNameList>(
std::mem_fn(&MilvusService::Service::ShowTables), this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
MilvusService_method_names[10],
@ -613,10 +625,10 @@ MilvusService::Service::~Service() {
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) {
::grpc::Status MilvusService::Service::ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response) {
(void) context;
(void) request;
(void) writer;
(void) response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

View File

@ -192,14 +192,12 @@ class MilvusService final {
//
//
// @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));
virtual ::grpc::Status ShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::milvus::grpc::TableNameList* response) = 0;
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableNameList>> AsyncShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableNameList>>(AsyncShowTablesRaw(context, request, cq));
}
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));
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableNameList>> PrepareAsyncShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableNameList>>(PrepareAsyncShowTablesRaw(context, request, cq));
}
// *
// @brief Give the server status
@ -387,7 +385,10 @@ class MilvusService final {
//
//
// @return table names.
virtual void ShowTables(::grpc::ClientContext* context, ::milvus::grpc::Command* request, ::grpc::experimental::ClientReadReactor< ::milvus::grpc::TableName>* reactor) = 0;
virtual void ShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response, std::function<void(::grpc::Status)>) = 0;
virtual void ShowTables(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableNameList* response, std::function<void(::grpc::Status)>) = 0;
virtual void ShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
virtual void ShowTables(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableNameList* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
// *
// @brief Give the server status
//
@ -459,9 +460,8 @@ class MilvusService final {
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>* AsyncCountTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableRowCount>* PrepareAsyncCountTableRaw(::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::TableNameList>* AsyncShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TableNameList>* PrepareAsyncShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::StringReply>* AsyncCmdRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::StringReply>* PrepareAsyncCmdRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* AsyncDeleteByRangeRaw(::grpc::ClientContext* context, const ::milvus::grpc::DeleteByRangeParam& request, ::grpc::CompletionQueue* cq) = 0;
@ -539,14 +539,12 @@ class MilvusService final {
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableRowCount>> PrepareAsyncCountTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableRowCount>>(PrepareAsyncCountTableRaw(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));
::grpc::Status ShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::milvus::grpc::TableNameList* response) override;
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableNameList>> AsyncShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableNameList>>(AsyncShowTablesRaw(context, request, cq));
}
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));
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableNameList>> PrepareAsyncShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableNameList>>(PrepareAsyncShowTablesRaw(context, request, cq));
}
::grpc::Status Cmd(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::milvus::grpc::StringReply* response) override;
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::StringReply>> AsyncCmd(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) {
@ -622,7 +620,10 @@ class MilvusService final {
void CountTable(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableRowCount* response, std::function<void(::grpc::Status)>) override;
void CountTable(::grpc::ClientContext* context, const ::milvus::grpc::TableName* request, ::milvus::grpc::TableRowCount* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
void CountTable(::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 ShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response, std::function<void(::grpc::Status)>) override;
void ShowTables(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableNameList* response, std::function<void(::grpc::Status)>) override;
void ShowTables(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
void ShowTables(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TableNameList* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
void Cmd(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::StringReply* response, std::function<void(::grpc::Status)>) override;
void Cmd(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::StringReply* response, std::function<void(::grpc::Status)>) override;
void Cmd(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::StringReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
@ -672,9 +673,8 @@ class MilvusService final {
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableSchema>* PrepareAsyncDescribeTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableRowCount>* AsyncCountTableRaw(::grpc::ClientContext* context, const ::milvus::grpc::TableName& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableRowCount>* PrepareAsyncCountTableRaw(::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::TableNameList>* AsyncShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TableNameList>* PrepareAsyncShowTablesRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::StringReply>* AsyncCmdRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::StringReply>* PrepareAsyncCmdRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* AsyncDeleteByRangeRaw(::grpc::ClientContext* context, const ::milvus::grpc::DeleteByRangeParam& request, ::grpc::CompletionQueue* cq) override;
@ -798,7 +798,7 @@ class MilvusService final {
//
//
// @return table names.
virtual ::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::grpc::ServerWriter< ::milvus::grpc::TableName>* writer);
virtual ::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response);
// *
// @brief Give the server status
//
@ -1027,12 +1027,12 @@ class MilvusService final {
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 {
::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response) 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);
void RequestShowTables(::grpc::ServerContext* context, ::milvus::grpc::Command* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::TableNameList>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
@ -1422,20 +1422,29 @@ class MilvusService final {
public:
ExperimentalWithCallbackMethod_ShowTables() {
::grpc::Service::experimental().MarkMethodCallback(9,
new ::grpc_impl::internal::CallbackServerStreamingHandler< ::milvus::grpc::Command, ::milvus::grpc::TableName>(
[this] { return this->ShowTables(); }));
new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::Command, ::milvus::grpc::TableNameList>(
[this](::grpc::ServerContext* context,
const ::milvus::grpc::Command* request,
::milvus::grpc::TableNameList* response,
::grpc::experimental::ServerCallbackRpcController* controller) {
return this->ShowTables(context, request, response, controller);
}));
}
void SetMessageAllocatorFor_ShowTables(
::grpc::experimental::MessageAllocator< ::milvus::grpc::Command, ::milvus::grpc::TableNameList>* allocator) {
static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::Command, ::milvus::grpc::TableNameList>*>(
::grpc::Service::experimental().GetHandler(9))
->SetMessageAllocator(allocator);
}
~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 {
::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
virtual ::grpc::experimental::ServerWriteReactor< ::milvus::grpc::Command, ::milvus::grpc::TableName>* ShowTables() {
return new ::grpc_impl::internal::UnimplementedWriteReactor<
::milvus::grpc::Command, ::milvus::grpc::TableName>;}
virtual void ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
};
template <class BaseClass>
class ExperimentalWithCallbackMethod_Cmd : public BaseClass {
@ -1758,7 +1767,7 @@ class MilvusService final {
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 {
::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@ -2040,12 +2049,12 @@ class MilvusService final {
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 {
::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response) 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);
void RequestShowTables(::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(9, context, request, response, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
@ -2380,20 +2389,23 @@ class MilvusService final {
public:
ExperimentalWithRawCallbackMethod_ShowTables() {
::grpc::Service::experimental().MarkMethodRawCallback(9,
new ::grpc_impl::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
[this] { return this->ShowTables(); }));
new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
[this](::grpc::ServerContext* context,
const ::grpc::ByteBuffer* request,
::grpc::ByteBuffer* response,
::grpc::experimental::ServerCallbackRpcController* controller) {
this->ShowTables(context, request, response, controller);
}));
}
~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 {
::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* ShowTables() {
return new ::grpc_impl::internal::UnimplementedWriteReactor<
::grpc::ByteBuffer, ::grpc::ByteBuffer>;}
virtual void ShowTables(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
};
template <class BaseClass>
class ExperimentalWithRawCallbackMethod_Cmd : public BaseClass {
@ -2701,6 +2713,26 @@ class MilvusService final {
virtual ::grpc::Status StreamedCountTable(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::TableName,::milvus::grpc::TableRowCount>* server_unary_streamer) = 0;
};
template <class BaseClass>
class WithStreamedUnaryMethod_ShowTables : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithStreamedUnaryMethod_ShowTables() {
::grpc::Service::MarkMethodStreamed(9,
new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::Command, ::milvus::grpc::TableNameList>(std::bind(&WithStreamedUnaryMethod_ShowTables<BaseClass>::StreamedShowTables, this, std::placeholders::_1, std::placeholders::_2)));
}
~WithStreamedUnaryMethod_ShowTables() override {
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
::grpc::Status ShowTables(::grpc::ServerContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::TableNameList* response) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
// replace default version of method with streamed unary
virtual ::grpc::Status StreamedShowTables(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::Command,::milvus::grpc::TableNameList>* server_unary_streamer) = 0;
};
template <class BaseClass>
class WithStreamedUnaryMethod_Cmd : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
@ -2800,29 +2832,9 @@ class MilvusService final {
// replace default version of method with streamed unary
virtual ::grpc::Status StreamedDropIndex(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::TableName,::milvus::grpc::Status>* server_unary_streamer) = 0;
};
typedef WithStreamedUnaryMethod_CreateTable<WithStreamedUnaryMethod_HasTable<WithStreamedUnaryMethod_DropTable<WithStreamedUnaryMethod_CreateIndex<WithStreamedUnaryMethod_Insert<WithStreamedUnaryMethod_Search<WithStreamedUnaryMethod_SearchInFiles<WithStreamedUnaryMethod_DescribeTable<WithStreamedUnaryMethod_CountTable<WithStreamedUnaryMethod_Cmd<WithStreamedUnaryMethod_DeleteByRange<WithStreamedUnaryMethod_PreloadTable<WithStreamedUnaryMethod_DescribeIndex<WithStreamedUnaryMethod_DropIndex<Service > > > > > > > > > > > > > > StreamedUnaryService;
template <class BaseClass>
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<BaseClass>::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_ShowTables<Service > SplitStreamedService;
typedef WithStreamedUnaryMethod_CreateTable<WithStreamedUnaryMethod_HasTable<WithStreamedUnaryMethod_DropTable<WithStreamedUnaryMethod_CreateIndex<WithStreamedUnaryMethod_Insert<WithStreamedUnaryMethod_Search<WithStreamedUnaryMethod_SearchInFiles<WithStreamedUnaryMethod_DescribeTable<WithStreamedUnaryMethod_CountTable<WithSplitStreamingMethod_ShowTables<WithStreamedUnaryMethod_Cmd<WithStreamedUnaryMethod_DeleteByRange<WithStreamedUnaryMethod_PreloadTable<WithStreamedUnaryMethod_DescribeIndex<WithStreamedUnaryMethod_DropIndex<Service > > > > > > > > > > > > > > > StreamedService;
typedef WithStreamedUnaryMethod_CreateTable<WithStreamedUnaryMethod_HasTable<WithStreamedUnaryMethod_DropTable<WithStreamedUnaryMethod_CreateIndex<WithStreamedUnaryMethod_Insert<WithStreamedUnaryMethod_Search<WithStreamedUnaryMethod_SearchInFiles<WithStreamedUnaryMethod_DescribeTable<WithStreamedUnaryMethod_CountTable<WithStreamedUnaryMethod_ShowTables<WithStreamedUnaryMethod_Cmd<WithStreamedUnaryMethod_DeleteByRange<WithStreamedUnaryMethod_PreloadTable<WithStreamedUnaryMethod_DescribeIndex<WithStreamedUnaryMethod_DropIndex<Service > > > > > > > > > > > > > > > StreamedUnaryService;
typedef Service SplitStreamedService;
typedef WithStreamedUnaryMethod_CreateTable<WithStreamedUnaryMethod_HasTable<WithStreamedUnaryMethod_DropTable<WithStreamedUnaryMethod_CreateIndex<WithStreamedUnaryMethod_Insert<WithStreamedUnaryMethod_Search<WithStreamedUnaryMethod_SearchInFiles<WithStreamedUnaryMethod_DescribeTable<WithStreamedUnaryMethod_CountTable<WithStreamedUnaryMethod_ShowTables<WithStreamedUnaryMethod_Cmd<WithStreamedUnaryMethod_DeleteByRange<WithStreamedUnaryMethod_PreloadTable<WithStreamedUnaryMethod_DescribeIndex<WithStreamedUnaryMethod_DropIndex<Service > > > > > > > > > > > > > > > StreamedService;
};
} // namespace grpc

File diff suppressed because it is too large Load Diff

View File

@ -48,7 +48,7 @@ struct TableStruct_milvus_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[18]
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[19]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
@ -96,6 +96,9 @@ extern StringReplyDefaultTypeInternal _StringReply_default_instance_;
class TableName;
class TableNameDefaultTypeInternal;
extern TableNameDefaultTypeInternal _TableName_default_instance_;
class TableNameList;
class TableNameListDefaultTypeInternal;
extern TableNameListDefaultTypeInternal _TableNameList_default_instance_;
class TableRowCount;
class TableRowCountDefaultTypeInternal;
extern TableRowCountDefaultTypeInternal _TableRowCount_default_instance_;
@ -127,6 +130,7 @@ template<> ::milvus::grpc::SearchInFilesParam* Arena::CreateMaybeMessage<::milvu
template<> ::milvus::grpc::SearchParam* Arena::CreateMaybeMessage<::milvus::grpc::SearchParam>(Arena*);
template<> ::milvus::grpc::StringReply* Arena::CreateMaybeMessage<::milvus::grpc::StringReply>(Arena*);
template<> ::milvus::grpc::TableName* Arena::CreateMaybeMessage<::milvus::grpc::TableName>(Arena*);
template<> ::milvus::grpc::TableNameList* Arena::CreateMaybeMessage<::milvus::grpc::TableNameList>(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*);
@ -251,10 +255,9 @@ class TableName :
// accessors -------------------------------------------------------
enum : int {
kTableNameFieldNumber = 2,
kStatusFieldNumber = 1,
kTableNameFieldNumber = 1,
};
// string table_name = 2;
// string table_name = 1;
void clear_table_name();
const std::string& table_name() const;
void set_table_name(const std::string& value);
@ -265,6 +268,150 @@ class TableName :
std::string* release_table_name();
void set_allocated_table_name(std::string* table_name);
// @@protoc_insertion_point(class_scope:milvus.grpc.TableName)
private:
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr table_name_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_milvus_2eproto;
};
// -------------------------------------------------------------------
class TableNameList :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TableNameList) */ {
public:
TableNameList();
virtual ~TableNameList();
TableNameList(const TableNameList& from);
TableNameList(TableNameList&& from) noexcept
: TableNameList() {
*this = ::std::move(from);
}
inline TableNameList& operator=(const TableNameList& from) {
CopyFrom(from);
return *this;
}
inline TableNameList& operator=(TableNameList&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const TableNameList& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const TableNameList* internal_default_instance() {
return reinterpret_cast<const TableNameList*>(
&_TableNameList_default_instance_);
}
static constexpr int kIndexInFileMessages =
1;
friend void swap(TableNameList& a, TableNameList& b) {
a.Swap(&b);
}
inline void Swap(TableNameList* other) {
if (other == this) return;
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline TableNameList* New() const final {
return CreateMaybeMessage<TableNameList>(nullptr);
}
TableNameList* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<TableNameList>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const TableNameList& from);
void MergeFrom(const TableNameList& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
#else
bool MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(TableNameList* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "milvus.grpc.TableNameList";
}
private:
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
return nullptr;
}
inline void* MaybeArenaPtr() const {
return nullptr;
}
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto);
return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kTableNamesFieldNumber = 2,
kStatusFieldNumber = 1,
};
// repeated string table_names = 2;
int table_names_size() const;
void clear_table_names();
const std::string& table_names(int index) const;
std::string* mutable_table_names(int index);
void set_table_names(int index, const std::string& value);
void set_table_names(int index, std::string&& value);
void set_table_names(int index, const char* value);
void set_table_names(int index, const char* value, size_t size);
std::string* add_table_names();
void add_table_names(const std::string& value);
void add_table_names(std::string&& value);
void add_table_names(const char* value);
void add_table_names(const char* value, size_t size);
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& table_names() const;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_table_names();
// .milvus.grpc.Status status = 1;
bool has_status() const;
void clear_status();
@ -273,12 +420,12 @@ class TableName :
::milvus::grpc::Status* mutable_status();
void set_allocated_status(::milvus::grpc::Status* status);
// @@protoc_insertion_point(class_scope:milvus.grpc.TableName)
// @@protoc_insertion_point(class_scope:milvus.grpc.TableNameList)
private:
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr table_name_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> table_names_;
::milvus::grpc::Status* status_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_milvus_2eproto;
@ -327,7 +474,7 @@ class TableSchema :
&_TableSchema_default_instance_);
}
static constexpr int kIndexInFileMessages =
1;
2;
friend void swap(TableSchema& a, TableSchema& b) {
a.Swap(&b);
@ -398,30 +545,42 @@ class TableSchema :
// accessors -------------------------------------------------------
enum : int {
kTableNameFieldNumber = 1,
kDimensionFieldNumber = 2,
kIndexFileSizeFieldNumber = 3,
kMetricTypeFieldNumber = 4,
kTableNameFieldNumber = 2,
kStatusFieldNumber = 1,
kDimensionFieldNumber = 3,
kIndexFileSizeFieldNumber = 4,
kMetricTypeFieldNumber = 5,
};
// .milvus.grpc.TableName table_name = 1;
bool has_table_name() const;
// string table_name = 2;
void clear_table_name();
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);
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);
// int64 dimension = 2;
// .milvus.grpc.Status status = 1;
bool has_status() const;
void clear_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 dimension = 3;
void clear_dimension();
::PROTOBUF_NAMESPACE_ID::int64 dimension() const;
void set_dimension(::PROTOBUF_NAMESPACE_ID::int64 value);
// int64 index_file_size = 3;
// int64 index_file_size = 4;
void clear_index_file_size();
::PROTOBUF_NAMESPACE_ID::int64 index_file_size() const;
void set_index_file_size(::PROTOBUF_NAMESPACE_ID::int64 value);
// int32 metric_type = 4;
// int32 metric_type = 5;
void clear_metric_type();
::PROTOBUF_NAMESPACE_ID::int32 metric_type() const;
void set_metric_type(::PROTOBUF_NAMESPACE_ID::int32 value);
@ -431,7 +590,8 @@ class TableSchema :
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::milvus::grpc::TableName* table_name_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr table_name_;
::milvus::grpc::Status* status_;
::PROTOBUF_NAMESPACE_ID::int64 dimension_;
::PROTOBUF_NAMESPACE_ID::int64 index_file_size_;
::PROTOBUF_NAMESPACE_ID::int32 metric_type_;
@ -482,7 +642,7 @@ class Range :
&_Range_default_instance_);
}
static constexpr int kIndexInFileMessages =
2;
3;
friend void swap(Range& a, Range& b) {
a.Swap(&b);
@ -632,7 +792,7 @@ class RowRecord :
&_RowRecord_default_instance_);
}
static constexpr int kIndexInFileMessages =
3;
4;
friend void swap(RowRecord& a, RowRecord& b) {
a.Swap(&b);
@ -770,7 +930,7 @@ class InsertParam :
&_InsertParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
4;
5;
friend void swap(InsertParam& a, InsertParam& b) {
a.Swap(&b);
@ -934,7 +1094,7 @@ class VectorIds :
&_VectorIds_default_instance_);
}
static constexpr int kIndexInFileMessages =
5;
6;
friend void swap(VectorIds& a, VectorIds& b) {
a.Swap(&b);
@ -1082,7 +1242,7 @@ class SearchParam :
&_SearchParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
6;
7;
friend void swap(SearchParam& a, SearchParam& b) {
a.Swap(&b);
@ -1259,7 +1419,7 @@ class SearchInFilesParam :
&_SearchInFilesParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
7;
8;
friend void swap(SearchInFilesParam& a, SearchInFilesParam& b) {
a.Swap(&b);
@ -1412,7 +1572,7 @@ class QueryResult :
&_QueryResult_default_instance_);
}
static constexpr int kIndexInFileMessages =
8;
9;
friend void swap(QueryResult& a, QueryResult& b) {
a.Swap(&b);
@ -1550,7 +1710,7 @@ class TopKQueryResult :
&_TopKQueryResult_default_instance_);
}
static constexpr int kIndexInFileMessages =
9;
10;
friend void swap(TopKQueryResult& a, TopKQueryResult& b) {
a.Swap(&b);
@ -1687,7 +1847,7 @@ class TopKQueryResultList :
&_TopKQueryResultList_default_instance_);
}
static constexpr int kIndexInFileMessages =
10;
11;
friend void swap(TopKQueryResultList& a, TopKQueryResultList& b) {
a.Swap(&b);
@ -1834,7 +1994,7 @@ class StringReply :
&_StringReply_default_instance_);
}
static constexpr int kIndexInFileMessages =
11;
12;
friend void swap(StringReply& a, StringReply& b) {
a.Swap(&b);
@ -1981,7 +2141,7 @@ class BoolReply :
&_BoolReply_default_instance_);
}
static constexpr int kIndexInFileMessages =
12;
13;
friend void swap(BoolReply& a, BoolReply& b) {
a.Swap(&b);
@ -2122,7 +2282,7 @@ class TableRowCount :
&_TableRowCount_default_instance_);
}
static constexpr int kIndexInFileMessages =
13;
14;
friend void swap(TableRowCount& a, TableRowCount& b) {
a.Swap(&b);
@ -2263,7 +2423,7 @@ class Command :
&_Command_default_instance_);
}
static constexpr int kIndexInFileMessages =
14;
15;
friend void swap(Command& a, Command& b) {
a.Swap(&b);
@ -2400,7 +2560,7 @@ class Index :
&_Index_default_instance_);
}
static constexpr int kIndexInFileMessages =
15;
16;
friend void swap(Index& a, Index& b) {
a.Swap(&b);
@ -2538,7 +2698,7 @@ class IndexParam :
&_IndexParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
16;
17;
friend void swap(IndexParam& a, IndexParam& b) {
a.Swap(&b);
@ -2609,18 +2769,30 @@ class IndexParam :
// accessors -------------------------------------------------------
enum : int {
kTableNameFieldNumber = 1,
kIndexFieldNumber = 2,
kTableNameFieldNumber = 2,
kStatusFieldNumber = 1,
kIndexFieldNumber = 3,
};
// .milvus.grpc.TableName table_name = 1;
bool has_table_name() const;
// string table_name = 2;
void clear_table_name();
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);
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);
// .milvus.grpc.Index index = 2;
// .milvus.grpc.Status status = 1;
bool has_status() const;
void clear_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);
// .milvus.grpc.Index index = 3;
bool has_index() const;
void clear_index();
const ::milvus::grpc::Index& index() const;
@ -2633,7 +2805,8 @@ class IndexParam :
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::milvus::grpc::TableName* table_name_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr table_name_;
::milvus::grpc::Status* status_;
::milvus::grpc::Index* index_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_milvus_2eproto;
@ -2682,7 +2855,7 @@ class DeleteByRangeParam :
&_DeleteByRangeParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
17;
18;
friend void swap(DeleteByRangeParam& a, DeleteByRangeParam& b) {
a.Swap(&b);
@ -2796,52 +2969,7 @@ class DeleteByRangeParam :
#endif // __GNUC__
// TableName
// .milvus.grpc.Status status = 1;
inline bool TableName::has_status() const {
return this != internal_default_instance() && status_ != nullptr;
}
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<const ::milvus::grpc::Status*>(
&::milvus::grpc::_Status_default_instance_);
}
inline ::milvus::grpc::Status* TableName::release_status() {
// @@protoc_insertion_point(field_release:milvus.grpc.TableName.status)
::milvus::grpc::Status* temp = status_;
status_ = nullptr;
return temp;
}
inline ::milvus::grpc::Status* TableName::mutable_status() {
if (status_ == nullptr) {
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::grpc::Status* status) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
}
if (status) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
if (message_arena != submessage_arena) {
status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, status, submessage_arena);
}
} else {
}
status_ = status;
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.TableName.status)
}
// string table_name = 2;
// string table_name = 1;
inline void TableName::clear_table_name() {
table_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
@ -2894,60 +3022,219 @@ inline void TableName::set_allocated_table_name(std::string* table_name) {
// -------------------------------------------------------------------
// TableSchema
// TableNameList
// .milvus.grpc.TableName table_name = 1;
inline bool TableSchema::has_table_name() const {
return this != internal_default_instance() && table_name_ != nullptr;
// .milvus.grpc.Status status = 1;
inline bool TableNameList::has_status() const {
return this != internal_default_instance() && status_ != nullptr;
}
inline void TableSchema::clear_table_name() {
if (GetArenaNoVirtual() == nullptr && table_name_ != nullptr) {
delete table_name_;
}
table_name_ = nullptr;
inline const ::milvus::grpc::Status& TableNameList::status() const {
const ::milvus::grpc::Status* p = status_;
// @@protoc_insertion_point(field_get:milvus.grpc.TableNameList.status)
return p != nullptr ? *p : *reinterpret_cast<const ::milvus::grpc::Status*>(
&::milvus::grpc::_Status_default_instance_);
}
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<const ::milvus::grpc::TableName*>(
&::milvus::grpc::_TableName_default_instance_);
}
inline ::milvus::grpc::TableName* TableSchema::release_table_name() {
// @@protoc_insertion_point(field_release:milvus.grpc.TableSchema.table_name)
inline ::milvus::grpc::Status* TableNameList::release_status() {
// @@protoc_insertion_point(field_release:milvus.grpc.TableNameList.status)
::milvus::grpc::TableName* temp = table_name_;
table_name_ = nullptr;
::milvus::grpc::Status* temp = status_;
status_ = nullptr;
return temp;
}
inline ::milvus::grpc::TableName* TableSchema::mutable_table_name() {
inline ::milvus::grpc::Status* TableNameList::mutable_status() {
if (table_name_ == nullptr) {
auto* p = CreateMaybeMessage<::milvus::grpc::TableName>(GetArenaNoVirtual());
table_name_ = p;
if (status_ == nullptr) {
auto* p = CreateMaybeMessage<::milvus::grpc::Status>(GetArenaNoVirtual());
status_ = p;
}
// @@protoc_insertion_point(field_mutable:milvus.grpc.TableSchema.table_name)
return table_name_;
// @@protoc_insertion_point(field_mutable:milvus.grpc.TableNameList.status)
return status_;
}
inline void TableSchema::set_allocated_table_name(::milvus::grpc::TableName* table_name) {
inline void TableNameList::set_allocated_status(::milvus::grpc::Status* status) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == nullptr) {
delete table_name_;
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
}
if (table_name) {
if (status) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
if (message_arena != submessage_arena) {
table_name = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, table_name, submessage_arena);
status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, status, submessage_arena);
}
} else {
}
table_name_ = table_name;
status_ = status;
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.TableNameList.status)
}
// repeated string table_names = 2;
inline int TableNameList::table_names_size() const {
return table_names_.size();
}
inline void TableNameList::clear_table_names() {
table_names_.Clear();
}
inline const std::string& TableNameList::table_names(int index) const {
// @@protoc_insertion_point(field_get:milvus.grpc.TableNameList.table_names)
return table_names_.Get(index);
}
inline std::string* TableNameList::mutable_table_names(int index) {
// @@protoc_insertion_point(field_mutable:milvus.grpc.TableNameList.table_names)
return table_names_.Mutable(index);
}
inline void TableNameList::set_table_names(int index, const std::string& value) {
// @@protoc_insertion_point(field_set:milvus.grpc.TableNameList.table_names)
table_names_.Mutable(index)->assign(value);
}
inline void TableNameList::set_table_names(int index, std::string&& value) {
// @@protoc_insertion_point(field_set:milvus.grpc.TableNameList.table_names)
table_names_.Mutable(index)->assign(std::move(value));
}
inline void TableNameList::set_table_names(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
table_names_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:milvus.grpc.TableNameList.table_names)
}
inline void TableNameList::set_table_names(int index, const char* value, size_t size) {
table_names_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:milvus.grpc.TableNameList.table_names)
}
inline std::string* TableNameList::add_table_names() {
// @@protoc_insertion_point(field_add_mutable:milvus.grpc.TableNameList.table_names)
return table_names_.Add();
}
inline void TableNameList::add_table_names(const std::string& value) {
table_names_.Add()->assign(value);
// @@protoc_insertion_point(field_add:milvus.grpc.TableNameList.table_names)
}
inline void TableNameList::add_table_names(std::string&& value) {
table_names_.Add(std::move(value));
// @@protoc_insertion_point(field_add:milvus.grpc.TableNameList.table_names)
}
inline void TableNameList::add_table_names(const char* value) {
GOOGLE_DCHECK(value != nullptr);
table_names_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:milvus.grpc.TableNameList.table_names)
}
inline void TableNameList::add_table_names(const char* value, size_t size) {
table_names_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:milvus.grpc.TableNameList.table_names)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>&
TableNameList::table_names() const {
// @@protoc_insertion_point(field_list:milvus.grpc.TableNameList.table_names)
return table_names_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>*
TableNameList::mutable_table_names() {
// @@protoc_insertion_point(field_mutable_list:milvus.grpc.TableNameList.table_names)
return &table_names_;
}
// -------------------------------------------------------------------
// TableSchema
// .milvus.grpc.Status status = 1;
inline bool TableSchema::has_status() const {
return this != internal_default_instance() && status_ != nullptr;
}
inline const ::milvus::grpc::Status& TableSchema::status() const {
const ::milvus::grpc::Status* p = status_;
// @@protoc_insertion_point(field_get:milvus.grpc.TableSchema.status)
return p != nullptr ? *p : *reinterpret_cast<const ::milvus::grpc::Status*>(
&::milvus::grpc::_Status_default_instance_);
}
inline ::milvus::grpc::Status* TableSchema::release_status() {
// @@protoc_insertion_point(field_release:milvus.grpc.TableSchema.status)
::milvus::grpc::Status* temp = status_;
status_ = nullptr;
return temp;
}
inline ::milvus::grpc::Status* TableSchema::mutable_status() {
if (status_ == nullptr) {
auto* p = CreateMaybeMessage<::milvus::grpc::Status>(GetArenaNoVirtual());
status_ = p;
}
// @@protoc_insertion_point(field_mutable:milvus.grpc.TableSchema.status)
return status_;
}
inline void TableSchema::set_allocated_status(::milvus::grpc::Status* status) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
}
if (status) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
if (message_arena != submessage_arena) {
status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, status, submessage_arena);
}
} else {
}
status_ = status;
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.TableSchema.status)
}
// string table_name = 2;
inline void TableSchema::clear_table_name() {
table_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline const std::string& TableSchema::table_name() const {
// @@protoc_insertion_point(field_get:milvus.grpc.TableSchema.table_name)
return table_name_.GetNoArena();
}
inline void TableSchema::set_table_name(const std::string& value) {
table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:milvus.grpc.TableSchema.table_name)
}
inline void TableSchema::set_table_name(std::string&& value) {
table_name_.SetNoArena(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:milvus.grpc.TableSchema.table_name)
}
inline void TableSchema::set_table_name(const char* value) {
GOOGLE_DCHECK(value != nullptr);
table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:milvus.grpc.TableSchema.table_name)
}
inline void TableSchema::set_table_name(const char* value, size_t size) {
table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:milvus.grpc.TableSchema.table_name)
}
inline std::string* TableSchema::mutable_table_name() {
// @@protoc_insertion_point(field_mutable:milvus.grpc.TableSchema.table_name)
return table_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline std::string* TableSchema::release_table_name() {
// @@protoc_insertion_point(field_release:milvus.grpc.TableSchema.table_name)
return table_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline void TableSchema::set_allocated_table_name(std::string* table_name) {
if (table_name != nullptr) {
} else {
}
table_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), table_name);
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.TableSchema.table_name)
}
// int64 dimension = 2;
// int64 dimension = 3;
inline void TableSchema::clear_dimension() {
dimension_ = PROTOBUF_LONGLONG(0);
}
@ -2961,7 +3248,7 @@ inline void TableSchema::set_dimension(::PROTOBUF_NAMESPACE_ID::int64 value) {
// @@protoc_insertion_point(field_set:milvus.grpc.TableSchema.dimension)
}
// int64 index_file_size = 3;
// int64 index_file_size = 4;
inline void TableSchema::clear_index_file_size() {
index_file_size_ = PROTOBUF_LONGLONG(0);
}
@ -2975,7 +3262,7 @@ inline void TableSchema::set_index_file_size(::PROTOBUF_NAMESPACE_ID::int64 valu
// @@protoc_insertion_point(field_set:milvus.grpc.TableSchema.index_file_size)
}
// int32 metric_type = 4;
// int32 metric_type = 5;
inline void TableSchema::clear_metric_type() {
metric_type_ = 0;
}
@ -4048,58 +4335,103 @@ inline void Index::set_nlist(::PROTOBUF_NAMESPACE_ID::int32 value) {
// IndexParam
// .milvus.grpc.TableName table_name = 1;
inline bool IndexParam::has_table_name() const {
return this != internal_default_instance() && table_name_ != nullptr;
// .milvus.grpc.Status status = 1;
inline bool IndexParam::has_status() const {
return this != internal_default_instance() && status_ != nullptr;
}
inline void IndexParam::clear_table_name() {
if (GetArenaNoVirtual() == nullptr && table_name_ != nullptr) {
delete table_name_;
}
table_name_ = nullptr;
inline const ::milvus::grpc::Status& IndexParam::status() const {
const ::milvus::grpc::Status* p = status_;
// @@protoc_insertion_point(field_get:milvus.grpc.IndexParam.status)
return p != nullptr ? *p : *reinterpret_cast<const ::milvus::grpc::Status*>(
&::milvus::grpc::_Status_default_instance_);
}
inline const ::milvus::grpc::TableName& IndexParam::table_name() const {
const ::milvus::grpc::TableName* p = table_name_;
// @@protoc_insertion_point(field_get:milvus.grpc.IndexParam.table_name)
return p != nullptr ? *p : *reinterpret_cast<const ::milvus::grpc::TableName*>(
&::milvus::grpc::_TableName_default_instance_);
}
inline ::milvus::grpc::TableName* IndexParam::release_table_name() {
// @@protoc_insertion_point(field_release:milvus.grpc.IndexParam.table_name)
inline ::milvus::grpc::Status* IndexParam::release_status() {
// @@protoc_insertion_point(field_release:milvus.grpc.IndexParam.status)
::milvus::grpc::TableName* temp = table_name_;
table_name_ = nullptr;
::milvus::grpc::Status* temp = status_;
status_ = nullptr;
return temp;
}
inline ::milvus::grpc::TableName* IndexParam::mutable_table_name() {
inline ::milvus::grpc::Status* IndexParam::mutable_status() {
if (table_name_ == nullptr) {
auto* p = CreateMaybeMessage<::milvus::grpc::TableName>(GetArenaNoVirtual());
table_name_ = p;
if (status_ == nullptr) {
auto* p = CreateMaybeMessage<::milvus::grpc::Status>(GetArenaNoVirtual());
status_ = p;
}
// @@protoc_insertion_point(field_mutable:milvus.grpc.IndexParam.table_name)
return table_name_;
// @@protoc_insertion_point(field_mutable:milvus.grpc.IndexParam.status)
return status_;
}
inline void IndexParam::set_allocated_table_name(::milvus::grpc::TableName* table_name) {
inline void IndexParam::set_allocated_status(::milvus::grpc::Status* status) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == nullptr) {
delete table_name_;
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
}
if (table_name) {
if (status) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
if (message_arena != submessage_arena) {
table_name = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, table_name, submessage_arena);
status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, status, submessage_arena);
}
} else {
}
table_name_ = table_name;
status_ = status;
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.IndexParam.status)
}
// string table_name = 2;
inline void IndexParam::clear_table_name() {
table_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline const std::string& IndexParam::table_name() const {
// @@protoc_insertion_point(field_get:milvus.grpc.IndexParam.table_name)
return table_name_.GetNoArena();
}
inline void IndexParam::set_table_name(const std::string& value) {
table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:milvus.grpc.IndexParam.table_name)
}
inline void IndexParam::set_table_name(std::string&& value) {
table_name_.SetNoArena(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:milvus.grpc.IndexParam.table_name)
}
inline void IndexParam::set_table_name(const char* value) {
GOOGLE_DCHECK(value != nullptr);
table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:milvus.grpc.IndexParam.table_name)
}
inline void IndexParam::set_table_name(const char* value, size_t size) {
table_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:milvus.grpc.IndexParam.table_name)
}
inline std::string* IndexParam::mutable_table_name() {
// @@protoc_insertion_point(field_mutable:milvus.grpc.IndexParam.table_name)
return table_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline std::string* IndexParam::release_table_name() {
// @@protoc_insertion_point(field_release:milvus.grpc.IndexParam.table_name)
return table_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline void IndexParam::set_allocated_table_name(std::string* table_name) {
if (table_name != nullptr) {
} else {
}
table_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), table_name);
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.IndexParam.table_name)
}
// .milvus.grpc.Index index = 2;
// .milvus.grpc.Index index = 3;
inline bool IndexParam::has_index() const {
return this != internal_default_instance() && index_ != nullptr;
}
@ -4293,6 +4625,8 @@ inline void DeleteByRangeParam::set_allocated_table_name(std::string* table_name
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)

View File

@ -8,18 +8,26 @@ package milvus.grpc;
* @brief Table Name
*/
message TableName {
string table_name = 1;
}
/**
* @brief Table Name List
*/
message TableNameList {
Status status = 1;
string table_name = 2;
repeated string table_names = 2;
}
/**
* @brief Table Schema
*/
message TableSchema {
TableName table_name = 1;
int64 dimension = 2;
int64 index_file_size = 3;
int32 metric_type = 4;
Status status = 1;
string table_name = 2;
int64 dimension = 3;
int64 index_file_size = 4;
int32 metric_type = 5;
}
/**
@ -141,8 +149,9 @@ message Index {
* @brief Index params
*/
message IndexParam {
TableName table_name = 1;
Index index = 2;
Status status = 1;
string table_name = 2;
Index index = 3;
}
/**
@ -264,7 +273,7 @@ service MilvusService {
*
* @return table names.
*/
rpc ShowTables(Command) returns (stream TableName) {}
rpc ShowTables(Command) returns (TableNameList) {}
/**
* @brief Give the server status

View File

@ -227,9 +227,9 @@ ClientTest::Test(const std::string& address, const std::string& port) {
std::cout << "All tables: " << std::endl;
for(auto& table : tables) {
int64_t row_count = 0;
conn->DropTable(table);
// stat = conn->CountTable(table, row_count);
// std::cout << "\t" << table << "(" << row_count << " rows)" << std::endl;
// conn->DropTable(table);
stat = conn->CountTable(table, row_count);
std::cout << "\t" << table << "(" << row_count << " rows)" << std::endl;
}
}
@ -343,8 +343,8 @@ ClientTest::Test(const std::string& address, const std::string& port) {
}
{//delete table
Status stat = conn->DropTable(TABLE_NAME);
std::cout << "DeleteTable function call status: " << stat.message() << std::endl;
// Status stat = conn->DropTable(TABLE_NAME);
// std::cout << "DeleteTable function call status: " << stat.message() << std::endl;
}
{//server status

View File

@ -93,7 +93,7 @@ Status
ClientProxy::CreateTable(const TableSchema &param) {
try {
::milvus::grpc::TableSchema schema;
schema.mutable_table_name()->set_table_name(param.table_name);
schema.set_table_name(param.table_name);
schema.set_dimension(param.dimension);
schema.set_index_file_size(param.index_file_size);
schema.set_metric_type((int32_t)param.metric_type);
@ -129,7 +129,7 @@ ClientProxy::CreateIndex(const IndexParam &index_param) {
try {
//TODO:add index params
::milvus::grpc::IndexParam grpc_index_param;
grpc_index_param.mutable_table_name()->set_table_name(index_param.table_name);
grpc_index_param.set_table_name(index_param.table_name);
grpc_index_param.mutable_index()->set_index_type((int32_t)index_param.index_type);
grpc_index_param.mutable_index()->set_nlist(index_param.nlist);
return client_ptr_->CreateIndex(grpc_index_param);
@ -281,7 +281,7 @@ ClientProxy::DescribeTable(const std::string &table_name, TableSchema &table_sch
Status status = client_ptr_->DescribeTable(grpc_schema, table_name);
table_schema.table_name = grpc_schema.table_name().table_name();
table_schema.table_name = grpc_schema.table_name();
table_schema.dimension = grpc_schema.dimension();
table_schema.index_file_size = grpc_schema.index_file_size();
table_schema.metric_type = (MetricType)grpc_schema.metric_type();
@ -307,7 +307,15 @@ ClientProxy::CountTable(const std::string &table_name, int64_t &row_count) {
Status
ClientProxy::ShowTables(std::vector<std::string> &table_array) {
try {
return client_ptr_->ShowTables(table_array);
Status status;
milvus::grpc::TableNameList table_name_list;
status = client_ptr_->ShowTables(table_name_list);
table_array.resize(table_name_list.table_names_size());
for (uint64_t i = 0; i < table_name_list.table_names_size(); ++i) {
table_array[i] = table_name_list.table_names(i);
}
return status;
} catch (std::exception &ex) {
return Status(StatusCode::UnknownError, "fail to show tables: " + std::string(ex.what()));

View File

@ -167,10 +167,10 @@ GrpcClient::DescribeTable(::milvus::grpc::TableSchema& grpc_schema,
return Status(StatusCode::RPCFailed, grpc_status.error_message());
}
if (grpc_schema.table_name().status().error_code() != grpc::SUCCESS) {
std::cerr << grpc_schema.table_name().status().reason() << std::endl;
if (grpc_schema.status().error_code() != grpc::SUCCESS) {
std::cerr << grpc_schema.status().reason() << std::endl;
return Status(StatusCode::ServerFailed,
grpc_schema.table_name().status().reason());
grpc_schema.status().reason());
}
return Status::OK();
@ -201,17 +201,10 @@ GrpcClient::CountTable(const std::string& table_name, Status& status) {
}
Status
GrpcClient::ShowTables(std::vector<std::string> &table_array) {
GrpcClient::ShowTables(milvus::grpc::TableNameList &table_name_list) {
ClientContext context;
::milvus::grpc::Command command;
std::unique_ptr<ClientReader<::milvus::grpc::TableName> > 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 grpc_status = reader->Finish();
::grpc::Status grpc_status = stub_->ShowTables(&context, command, &table_name_list);
if (!grpc_status.ok()) {
std::cerr << "ShowTables gRPC failed!" << std::endl;
@ -219,10 +212,10 @@ GrpcClient::ShowTables(std::vector<std::string> &table_array) {
return Status(StatusCode::RPCFailed, grpc_status.error_message());
}
if (table_name.status().error_code() != grpc::SUCCESS) {
std::cerr << table_name.status().reason() << std::endl;
if (table_name_list.status().error_code() != grpc::SUCCESS) {
std::cerr << table_name_list.status().reason() << std::endl;
return Status(StatusCode::ServerFailed,
table_name.status().reason());
table_name_list.status().reason());
}
return Status::OK();
@ -302,9 +295,9 @@ GrpcClient::DescribeIndex(grpc::TableName &table_name, grpc::IndexParam &index_p
std::cerr << "DescribeIndex rpc failed!" << std::endl;
return Status(StatusCode::RPCFailed, grpc_status.error_message());
}
if (index_param.mutable_table_name()->status().error_code() != grpc::SUCCESS) {
std::cerr << index_param.mutable_table_name()->status().reason() << std::endl;
return Status(StatusCode::ServerFailed, index_param.mutable_table_name()->status().reason());
if (index_param.status().error_code() != grpc::SUCCESS) {
std::cerr << index_param.status().reason() << std::endl;
return Status(StatusCode::ServerFailed, index_param.status().reason());
}
return Status::OK();

View File

@ -73,7 +73,7 @@ public:
CountTable(const std::string& table_name, Status& status);
Status
ShowTables(std::vector<std::string> &table_array);
ShowTables(milvus::grpc::TableNameList &table_name_list);
Status
Cmd(std::string &result, const std::string& cmd);

View File

@ -122,8 +122,8 @@ GrpcRequestHandler::DescribeTable(::grpc::ServerContext *context,
BaseTaskPtr task_ptr = DescribeTableTask::Create(request->table_name(), response);
::milvus::grpc::Status grpc_status;
GrpcRequestScheduler::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());
response->mutable_status()->set_error_code(grpc_status.error_code());
response->mutable_status()->set_reason(grpc_status.reason());
return ::grpc::Status::OK;
}
@ -145,17 +145,14 @@ GrpcRequestHandler::CountTable(::grpc::ServerContext *context,
::grpc::Status
GrpcRequestHandler::ShowTables(::grpc::ServerContext *context,
const ::milvus::grpc::Command *request,
::grpc::ServerWriter<::milvus::grpc::TableName> *writer) {
::milvus::grpc::TableNameList *response) {
BaseTaskPtr task_ptr = ShowTablesTask::Create(writer);
BaseTaskPtr task_ptr = ShowTablesTask::Create(response);
::milvus::grpc::Status grpc_status;
GrpcRequestScheduler::ExecTask(task_ptr, &grpc_status);
if (grpc_status.error_code() != SERVER_SUCCESS) {
::grpc::Status status(::grpc::UNKNOWN, grpc_status.reason());
return status;
} else {
return ::grpc::Status::OK;
}
response->mutable_status()->set_error_code(grpc_status.error_code());
response->mutable_status()->set_reason(grpc_status.reason());
return ::grpc::Status::OK;
}
::grpc::Status
@ -204,8 +201,8 @@ GrpcRequestHandler::DescribeIndex(::grpc::ServerContext *context,
BaseTaskPtr task_ptr = DescribeIndexTask::Create(request->table_name(), response);
::milvus::grpc::Status grpc_status;
GrpcRequestScheduler::ExecTask(task_ptr, &grpc_status);
response->mutable_table_name()->mutable_status()->set_reason(grpc_status.reason());
response->mutable_table_name()->mutable_status()->set_error_code(grpc_status.error_code());
response->mutable_status()->set_reason(grpc_status.reason());
response->mutable_status()->set_error_code(grpc_status.error_code());
return ::grpc::Status::OK;
}

View File

@ -234,7 +234,7 @@ public:
::grpc::Status
ShowTables(::grpc::ServerContext *context,
const ::milvus::grpc::Command *request,
::grpc::ServerWriter<::milvus::grpc::TableName> *writer) override;
::milvus::grpc::TableNameList *table_name_list) override;
/**
* @brief Give the server status

View File

@ -137,7 +137,7 @@ CreateTableTask::OnExecute() {
try {
//step 1: check arguments
auto status = ValidationUtil::ValidateTableName(schema_->table_name().table_name());
auto status = ValidationUtil::ValidateTableName(schema_->table_name());
if (!status.ok()) {
return status;
}
@ -159,7 +159,7 @@ CreateTableTask::OnExecute() {
//step 2: construct table schema
engine::meta::TableSchema table_info;
table_info.table_id_ = schema_->table_name().table_name();
table_info.table_id_ = schema_->table_name();
table_info.dimension_ = (uint16_t) schema_->dimension();
table_info.index_file_size_ = schema_->index_file_size();
table_info.metric_type_ = schema_->metric_type();
@ -214,7 +214,7 @@ DescribeTableTask::OnExecute() {
return status;
}
schema_->mutable_table_name()->set_table_name(table_info.table_id_);
schema_->set_table_name(table_info.table_id_);
schema_->set_dimension(table_info.dimension_);
schema_->set_index_file_size(table_info.index_file_size_);
schema_->set_metric_type(table_info.metric_type_);
@ -249,7 +249,7 @@ CreateIndexTask::OnExecute() {
TimeRecorder rc("CreateIndexTask");
//step 1: check arguments
std::string table_name_ = index_param_->table_name().table_name();
std::string table_name_ = index_param_->table_name();
auto status = ValidationUtil::ValidateTableName(table_name_);
if (!status.ok()) {
return status;
@ -384,15 +384,15 @@ DropTableTask::OnExecute() {
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ShowTablesTask::ShowTablesTask(::grpc::ServerWriter<::milvus::grpc::TableName> *writer)
ShowTablesTask::ShowTablesTask(::milvus::grpc::TableNameList *table_name_list)
: GrpcBaseTask(DDL_DML_TASK_GROUP),
writer_(writer) {
table_name_list_(table_name_list) {
}
BaseTaskPtr
ShowTablesTask::Create(::grpc::ServerWriter<::milvus::grpc::TableName> *writer) {
return std::shared_ptr<GrpcBaseTask>(new ShowTablesTask(writer));
ShowTablesTask::Create(::milvus::grpc::TableNameList *table_name_list) {
return std::shared_ptr<GrpcBaseTask>(new ShowTablesTask(table_name_list));
}
Status
@ -404,11 +404,7 @@ ShowTablesTask::OnExecute() {
}
for (auto &schema : schema_array) {
::milvus::grpc::TableName tableName;
tableName.set_table_name(schema.table_id_);
if (!writer_->Write(tableName)) {
return Status(SERVER_WRITE_ERROR, "Write table name failed!");
}
table_name_list_->add_table_names(schema.table_id_);
}
return Status::OK();
}
@ -920,7 +916,7 @@ DescribeIndexTask::OnExecute() {
return status;
}
index_param_->mutable_table_name()->set_table_name(table_name_);
index_param_->set_table_name(table_name_);
index_param_->mutable_index()->set_index_type(index.engine_type_);
index_param_->mutable_index()->set_nlist(index.nlist_);

View File

@ -124,17 +124,17 @@ private:
class ShowTablesTask : public GrpcBaseTask {
public:
static BaseTaskPtr
Create(::grpc::ServerWriter<::milvus::grpc::TableName> *writer);
Create(::milvus::grpc::TableNameList *table_name_list);
protected:
explicit
ShowTablesTask(::grpc::ServerWriter<::milvus::grpc::TableName> *writer);
ShowTablesTask(::milvus::grpc::TableNameList *table_name_list);
Status
OnExecute() override;
private:
::grpc::ServerWriter<::milvus::grpc::TableName> *writer_;
::milvus::grpc::TableNameList *table_name_list_;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -72,7 +72,7 @@ set(unittest_files
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
set(helper_files
${MILVUS_ENGINE_SRC}/server/ServerConfig.cpp
# ${MILVUS_ENGINE_SRC}/server/ServerConfig.cpp
${MILVUS_ENGINE_SRC}/utils/CommonUtil.cpp
${MILVUS_ENGINE_SRC}/utils/TimeRecorder.cpp
${MILVUS_ENGINE_SRC}/utils/Status.cpp