Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
af094c3b
milvus
项目概览
BaiXuePrincess
/
milvus
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
af094c3b
编写于
6月 27, 2019
作者:
S
starlord
提交者:
jinhai
7月 13, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MS-124 HasTable interface
Former-commit-id: 0edfe9be5b105d4423eaa7d0186307d90a16dfc9
上级
0fea89ba
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
707 addition
and
13 deletion
+707
-13
cpp/CHANGELOG.md
cpp/CHANGELOG.md
+1
-0
cpp/src/sdk/examples/simple/src/ClientTest.cpp
cpp/src/sdk/examples/simple/src/ClientTest.cpp
+5
-0
cpp/src/sdk/include/MilvusApi.h
cpp/src/sdk/include/MilvusApi.h
+12
-0
cpp/src/sdk/src/client/ClientProxy.cpp
cpp/src/sdk/src/client/ClientProxy.cpp
+9
-0
cpp/src/sdk/src/client/ClientProxy.h
cpp/src/sdk/src/client/ClientProxy.h
+2
-0
cpp/src/sdk/src/interface/ConnectionImpl.cpp
cpp/src/sdk/src/interface/ConnectionImpl.cpp
+5
-0
cpp/src/sdk/src/interface/ConnectionImpl.h
cpp/src/sdk/src/interface/ConnectionImpl.h
+2
-0
cpp/src/server/RequestHandler.cpp
cpp/src/server/RequestHandler.cpp
+9
-0
cpp/src/server/RequestHandler.h
cpp/src/server/RequestHandler.h
+22
-10
cpp/src/server/RequestTask.cpp
cpp/src/server/RequestTask.cpp
+41
-3
cpp/src/server/RequestTask.h
cpp/src/server/RequestTask.h
+16
-0
cpp/src/thrift/gen-cpp/MilvusService.cpp
cpp/src/thrift/gen-cpp/MilvusService.cpp
+413
-0
cpp/src/thrift/gen-cpp/MilvusService.h
cpp/src/thrift/gen-cpp/MilvusService.h
+145
-0
cpp/src/thrift/gen-cpp/MilvusService_server.skeleton.cpp
cpp/src/thrift/gen-cpp/MilvusService_server.skeleton.cpp
+15
-0
cpp/src/thrift/milvus.thrift
cpp/src/thrift/milvus.thrift
+10
-0
未找到文件。
cpp/CHANGELOG.md
浏览文件 @
af094c3b
...
@@ -22,6 +22,7 @@ Please mark all change in change log and use the ticket from JIRA.
...
@@ -22,6 +22,7 @@ Please mark all change in change log and use the ticket from JIRA.
-
MS-98 - Install all unit test to installation directory
-
MS-98 - Install all unit test to installation directory
-
MS-115 - Change is_startup of metric_config switch from true to on
-
MS-115 - Change is_startup of metric_config switch from true to on
-
MS-122 - Archive criteria config
-
MS-122 - Archive criteria config
-
MS-124 - HasTable interface
## New Feature
## New Feature
...
...
cpp/src/sdk/examples/simple/src/ClientTest.cpp
浏览文件 @
af094c3b
...
@@ -165,6 +165,11 @@ ClientTest::Test(const std::string& address, const std::string& port) {
...
@@ -165,6 +165,11 @@ ClientTest::Test(const std::string& address, const std::string& port) {
Status
stat
=
conn
->
CreateTable
(
tb_schema
);
Status
stat
=
conn
->
CreateTable
(
tb_schema
);
std
::
cout
<<
"CreateTable function call status: "
<<
stat
.
ToString
()
<<
std
::
endl
;
std
::
cout
<<
"CreateTable function call status: "
<<
stat
.
ToString
()
<<
std
::
endl
;
PrintTableSchema
(
tb_schema
);
PrintTableSchema
(
tb_schema
);
bool
has_table
=
conn
->
HasTable
(
tb_schema
.
table_name
);
if
(
has_table
)
{
std
::
cout
<<
"Table is created"
<<
std
::
endl
;
}
}
}
{
//describe table
{
//describe table
...
...
cpp/src/sdk/include/MilvusApi.h
浏览文件 @
af094c3b
...
@@ -156,6 +156,18 @@ public:
...
@@ -156,6 +156,18 @@ public:
virtual
Status
CreateTable
(
const
TableSchema
&
param
)
=
0
;
virtual
Status
CreateTable
(
const
TableSchema
&
param
)
=
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 Delete table method
* @brief Delete table method
*
*
...
...
cpp/src/sdk/src/client/ClientProxy.cpp
浏览文件 @
af094c3b
...
@@ -102,6 +102,15 @@ ClientProxy::CreateTable(const TableSchema ¶m) {
...
@@ -102,6 +102,15 @@ ClientProxy::CreateTable(const TableSchema ¶m) {
return
Status
::
OK
();
return
Status
::
OK
();
}
}
bool
ClientProxy
::
HasTable
(
const
std
::
string
&
table_name
)
{
if
(
!
IsConnected
())
{
return
false
;
}
return
ClientPtr
()
->
interface
()
->
HasTable
(
table_name
);
}
Status
Status
ClientProxy
::
DeleteTable
(
const
std
::
string
&
table_name
)
{
ClientProxy
::
DeleteTable
(
const
std
::
string
&
table_name
)
{
if
(
!
IsConnected
())
{
if
(
!
IsConnected
())
{
...
...
cpp/src/sdk/src/client/ClientProxy.h
浏览文件 @
af094c3b
...
@@ -23,6 +23,8 @@ public:
...
@@ -23,6 +23,8 @@ public:
virtual
Status
CreateTable
(
const
TableSchema
&
param
)
override
;
virtual
Status
CreateTable
(
const
TableSchema
&
param
)
override
;
virtual
bool
HasTable
(
const
std
::
string
&
table_name
)
override
;
virtual
Status
DeleteTable
(
const
std
::
string
&
table_name
)
override
;
virtual
Status
DeleteTable
(
const
std
::
string
&
table_name
)
override
;
virtual
Status
AddVector
(
const
std
::
string
&
table_name
,
virtual
Status
AddVector
(
const
std
::
string
&
table_name
,
...
...
cpp/src/sdk/src/interface/ConnectionImpl.cpp
浏览文件 @
af094c3b
...
@@ -56,6 +56,11 @@ ConnectionImpl::CreateTable(const TableSchema ¶m) {
...
@@ -56,6 +56,11 @@ ConnectionImpl::CreateTable(const TableSchema ¶m) {
return
client_proxy_
->
CreateTable
(
param
);
return
client_proxy_
->
CreateTable
(
param
);
}
}
bool
ConnectionImpl
::
HasTable
(
const
std
::
string
&
table_name
)
{
return
client_proxy_
->
HasTable
(
table_name
);
}
Status
Status
ConnectionImpl
::
DeleteTable
(
const
std
::
string
&
table_name
)
{
ConnectionImpl
::
DeleteTable
(
const
std
::
string
&
table_name
)
{
return
client_proxy_
->
DeleteTable
(
table_name
);
return
client_proxy_
->
DeleteTable
(
table_name
);
...
...
cpp/src/sdk/src/interface/ConnectionImpl.h
浏览文件 @
af094c3b
...
@@ -25,6 +25,8 @@ public:
...
@@ -25,6 +25,8 @@ public:
virtual
Status
CreateTable
(
const
TableSchema
&
param
)
override
;
virtual
Status
CreateTable
(
const
TableSchema
&
param
)
override
;
virtual
bool
HasTable
(
const
std
::
string
&
table_name
)
override
;
virtual
Status
DeleteTable
(
const
std
::
string
&
table_name
)
override
;
virtual
Status
DeleteTable
(
const
std
::
string
&
table_name
)
override
;
virtual
Status
AddVector
(
const
std
::
string
&
table_name
,
virtual
Status
AddVector
(
const
std
::
string
&
table_name
,
...
...
cpp/src/server/RequestHandler.cpp
浏览文件 @
af094c3b
...
@@ -24,6 +24,15 @@ RequestHandler::CreateTable(const thrift::TableSchema ¶m) {
...
@@ -24,6 +24,15 @@ RequestHandler::CreateTable(const thrift::TableSchema ¶m) {
RequestScheduler
::
ExecTask
(
task_ptr
);
RequestScheduler
::
ExecTask
(
task_ptr
);
}
}
bool
RequestHandler
::
HasTable
(
const
std
::
string
&
table_name
)
{
bool
has_table
=
false
;
BaseTaskPtr
task_ptr
=
HasTableTask
::
Create
(
table_name
,
has_table
);
RequestScheduler
::
ExecTask
(
task_ptr
);
return
has_table
;
}
void
void
RequestHandler
::
DeleteTable
(
const
std
::
string
&
table_name
)
{
RequestHandler
::
DeleteTable
(
const
std
::
string
&
table_name
)
{
BaseTaskPtr
task_ptr
=
DeleteTableTask
::
Create
(
table_name
);
BaseTaskPtr
task_ptr
=
DeleteTableTask
::
Create
(
table_name
);
...
...
cpp/src/server/RequestHandler.h
浏览文件 @
af094c3b
...
@@ -19,16 +19,28 @@ public:
...
@@ -19,16 +19,28 @@ public:
RequestHandler
();
RequestHandler
();
/**
/**
* @brief Create table method
* @brief Create table method
*
*
* This method is used to create table
* This method is used to create table
*
*
* @param param, use to provide table information to be created.
* @param param, use to provide table information to be created.
*
*
*
*
* @param param
* @param param
*/
*/
void
CreateTable
(
const
::
milvus
::
thrift
::
TableSchema
&
param
);
void
CreateTable
(
const
::
milvus
::
thrift
::
TableSchema
&
param
);
/**
* @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
*/
bool
HasTable
(
const
std
::
string
&
table_name
);
/**
/**
* @brief Delete table method
* @brief Delete table method
...
...
cpp/src/server/RequestTask.cpp
浏览文件 @
af094c3b
...
@@ -70,7 +70,7 @@ namespace {
...
@@ -70,7 +70,7 @@ namespace {
uint64_t
vec_dim
=
record
.
vector_data
.
size
()
/
sizeof
(
double
);
//how many double value?
uint64_t
vec_dim
=
record
.
vector_data
.
size
()
/
sizeof
(
double
);
//how many double value?
if
(
vec_dim
!=
dimension
)
{
if
(
vec_dim
!=
dimension
)
{
SERVER_LOG_ERROR
<<
"Invalid vector dimension: "
<<
vec_dim
SERVER_LOG_ERROR
<<
"Invalid vector dimension: "
<<
vec_dim
<<
" vs.
group
dimension:"
<<
dimension
;
<<
" vs.
table
dimension:"
<<
dimension
;
error_code
=
SERVER_INVALID_VECTOR_DIMENSION
;
error_code
=
SERVER_INVALID_VECTOR_DIMENSION
;
return
error_code
;
return
error_code
;
}
}
...
@@ -235,6 +235,44 @@ ServerError DescribeTableTask::OnExecute() {
...
@@ -235,6 +235,44 @@ ServerError DescribeTableTask::OnExecute() {
return
SERVER_SUCCESS
;
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
<
BaseTask
>
(
new
HasTableTask
(
table_name
,
has_table
));
}
ServerError
HasTableTask
::
OnExecute
()
{
try
{
TimeRecorder
rc
(
"HasTableTask"
);
//step 1: check arguments
if
(
table_name_
.
empty
())
{
error_code_
=
SERVER_INVALID_ARGUMENT
;
error_msg_
=
"Table name cannot be empty"
;
SERVER_LOG_ERROR
<<
error_msg_
;
return
error_code_
;
}
//step 2: check table existence
engine
::
Status
stat
=
DBWrapper
::
DB
()
->
HasTable
(
table_name_
,
has_table_
);
rc
.
Elapse
(
"totally cost"
);
}
catch
(
std
::
exception
&
ex
)
{
error_code_
=
SERVER_UNEXPECTED_ERROR
;
error_msg_
=
ex
.
what
();
SERVER_LOG_ERROR
<<
error_msg_
;
return
error_code_
;
}
return
SERVER_SUCCESS
;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DeleteTableTask
::
DeleteTableTask
(
const
std
::
string
&
table_name
)
DeleteTableTask
::
DeleteTableTask
(
const
std
::
string
&
table_name
)
:
BaseTask
(
DDL_DML_TASK_GROUP
),
:
BaseTask
(
DDL_DML_TASK_GROUP
),
...
@@ -242,8 +280,8 @@ DeleteTableTask::DeleteTableTask(const std::string& table_name)
...
@@ -242,8 +280,8 @@ DeleteTableTask::DeleteTableTask(const std::string& table_name)
}
}
BaseTaskPtr
DeleteTableTask
::
Create
(
const
std
::
string
&
group_id
)
{
BaseTaskPtr
DeleteTableTask
::
Create
(
const
std
::
string
&
table_name
)
{
return
std
::
shared_ptr
<
BaseTask
>
(
new
DeleteTableTask
(
group_id
));
return
std
::
shared_ptr
<
BaseTask
>
(
new
DeleteTableTask
(
table_name
));
}
}
ServerError
DeleteTableTask
::
OnExecute
()
{
ServerError
DeleteTableTask
::
OnExecute
()
{
...
...
cpp/src/server/RequestTask.h
浏览文件 @
af094c3b
...
@@ -33,6 +33,22 @@ private:
...
@@ -33,6 +33,22 @@ private:
const
::
milvus
::
thrift
::
TableSchema
&
schema_
;
const
::
milvus
::
thrift
::
TableSchema
&
schema_
;
};
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class
HasTableTask
:
public
BaseTask
{
public:
static
BaseTaskPtr
Create
(
const
std
::
string
&
table_name
,
bool
&
has_table
);
protected:
HasTableTask
(
const
std
::
string
&
table_name
,
bool
&
has_table
);
ServerError
OnExecute
()
override
;
private:
std
::
string
table_name_
;
bool
&
has_table_
;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class
DescribeTableTask
:
public
BaseTask
{
class
DescribeTableTask
:
public
BaseTask
{
public:
public:
...
...
cpp/src/thrift/gen-cpp/MilvusService.cpp
浏览文件 @
af094c3b
...
@@ -196,6 +196,213 @@ uint32_t MilvusService_CreateTable_presult::read(::apache::thrift::protocol::TPr
...
@@ -196,6 +196,213 @@ uint32_t MilvusService_CreateTable_presult::read(::apache::thrift::protocol::TPr
}
}
MilvusService_HasTable_args
::~
MilvusService_HasTable_args
()
throw
()
{
}
uint32_t
MilvusService_HasTable_args
::
read
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
)
{
::
apache
::
thrift
::
protocol
::
TInputRecursionTracker
tracker
(
*
iprot
);
uint32_t
xfer
=
0
;
std
::
string
fname
;
::
apache
::
thrift
::
protocol
::
TType
ftype
;
int16_t
fid
;
xfer
+=
iprot
->
readStructBegin
(
fname
);
using
::
apache
::
thrift
::
protocol
::
TProtocolException
;
while
(
true
)
{
xfer
+=
iprot
->
readFieldBegin
(
fname
,
ftype
,
fid
);
if
(
ftype
==
::
apache
::
thrift
::
protocol
::
T_STOP
)
{
break
;
}
switch
(
fid
)
{
case
2
:
if
(
ftype
==
::
apache
::
thrift
::
protocol
::
T_STRING
)
{
xfer
+=
iprot
->
readString
(
this
->
table_name
);
this
->
__isset
.
table_name
=
true
;
}
else
{
xfer
+=
iprot
->
skip
(
ftype
);
}
break
;
default:
xfer
+=
iprot
->
skip
(
ftype
);
break
;
}
xfer
+=
iprot
->
readFieldEnd
();
}
xfer
+=
iprot
->
readStructEnd
();
return
xfer
;
}
uint32_t
MilvusService_HasTable_args
::
write
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
)
const
{
uint32_t
xfer
=
0
;
::
apache
::
thrift
::
protocol
::
TOutputRecursionTracker
tracker
(
*
oprot
);
xfer
+=
oprot
->
writeStructBegin
(
"MilvusService_HasTable_args"
);
xfer
+=
oprot
->
writeFieldBegin
(
"table_name"
,
::
apache
::
thrift
::
protocol
::
T_STRING
,
2
);
xfer
+=
oprot
->
writeString
(
this
->
table_name
);
xfer
+=
oprot
->
writeFieldEnd
();
xfer
+=
oprot
->
writeFieldStop
();
xfer
+=
oprot
->
writeStructEnd
();
return
xfer
;
}
MilvusService_HasTable_pargs
::~
MilvusService_HasTable_pargs
()
throw
()
{
}
uint32_t
MilvusService_HasTable_pargs
::
write
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
)
const
{
uint32_t
xfer
=
0
;
::
apache
::
thrift
::
protocol
::
TOutputRecursionTracker
tracker
(
*
oprot
);
xfer
+=
oprot
->
writeStructBegin
(
"MilvusService_HasTable_pargs"
);
xfer
+=
oprot
->
writeFieldBegin
(
"table_name"
,
::
apache
::
thrift
::
protocol
::
T_STRING
,
2
);
xfer
+=
oprot
->
writeString
((
*
(
this
->
table_name
)));
xfer
+=
oprot
->
writeFieldEnd
();
xfer
+=
oprot
->
writeFieldStop
();
xfer
+=
oprot
->
writeStructEnd
();
return
xfer
;
}
MilvusService_HasTable_result
::~
MilvusService_HasTable_result
()
throw
()
{
}
uint32_t
MilvusService_HasTable_result
::
read
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
)
{
::
apache
::
thrift
::
protocol
::
TInputRecursionTracker
tracker
(
*
iprot
);
uint32_t
xfer
=
0
;
std
::
string
fname
;
::
apache
::
thrift
::
protocol
::
TType
ftype
;
int16_t
fid
;
xfer
+=
iprot
->
readStructBegin
(
fname
);
using
::
apache
::
thrift
::
protocol
::
TProtocolException
;
while
(
true
)
{
xfer
+=
iprot
->
readFieldBegin
(
fname
,
ftype
,
fid
);
if
(
ftype
==
::
apache
::
thrift
::
protocol
::
T_STOP
)
{
break
;
}
switch
(
fid
)
{
case
0
:
if
(
ftype
==
::
apache
::
thrift
::
protocol
::
T_BOOL
)
{
xfer
+=
iprot
->
readBool
(
this
->
success
);
this
->
__isset
.
success
=
true
;
}
else
{
xfer
+=
iprot
->
skip
(
ftype
);
}
break
;
case
1
:
if
(
ftype
==
::
apache
::
thrift
::
protocol
::
T_STRUCT
)
{
xfer
+=
this
->
e
.
read
(
iprot
);
this
->
__isset
.
e
=
true
;
}
else
{
xfer
+=
iprot
->
skip
(
ftype
);
}
break
;
default:
xfer
+=
iprot
->
skip
(
ftype
);
break
;
}
xfer
+=
iprot
->
readFieldEnd
();
}
xfer
+=
iprot
->
readStructEnd
();
return
xfer
;
}
uint32_t
MilvusService_HasTable_result
::
write
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
)
const
{
uint32_t
xfer
=
0
;
xfer
+=
oprot
->
writeStructBegin
(
"MilvusService_HasTable_result"
);
if
(
this
->
__isset
.
success
)
{
xfer
+=
oprot
->
writeFieldBegin
(
"success"
,
::
apache
::
thrift
::
protocol
::
T_BOOL
,
0
);
xfer
+=
oprot
->
writeBool
(
this
->
success
);
xfer
+=
oprot
->
writeFieldEnd
();
}
else
if
(
this
->
__isset
.
e
)
{
xfer
+=
oprot
->
writeFieldBegin
(
"e"
,
::
apache
::
thrift
::
protocol
::
T_STRUCT
,
1
);
xfer
+=
this
->
e
.
write
(
oprot
);
xfer
+=
oprot
->
writeFieldEnd
();
}
xfer
+=
oprot
->
writeFieldStop
();
xfer
+=
oprot
->
writeStructEnd
();
return
xfer
;
}
MilvusService_HasTable_presult
::~
MilvusService_HasTable_presult
()
throw
()
{
}
uint32_t
MilvusService_HasTable_presult
::
read
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
)
{
::
apache
::
thrift
::
protocol
::
TInputRecursionTracker
tracker
(
*
iprot
);
uint32_t
xfer
=
0
;
std
::
string
fname
;
::
apache
::
thrift
::
protocol
::
TType
ftype
;
int16_t
fid
;
xfer
+=
iprot
->
readStructBegin
(
fname
);
using
::
apache
::
thrift
::
protocol
::
TProtocolException
;
while
(
true
)
{
xfer
+=
iprot
->
readFieldBegin
(
fname
,
ftype
,
fid
);
if
(
ftype
==
::
apache
::
thrift
::
protocol
::
T_STOP
)
{
break
;
}
switch
(
fid
)
{
case
0
:
if
(
ftype
==
::
apache
::
thrift
::
protocol
::
T_BOOL
)
{
xfer
+=
iprot
->
readBool
((
*
(
this
->
success
)));
this
->
__isset
.
success
=
true
;
}
else
{
xfer
+=
iprot
->
skip
(
ftype
);
}
break
;
case
1
:
if
(
ftype
==
::
apache
::
thrift
::
protocol
::
T_STRUCT
)
{
xfer
+=
this
->
e
.
read
(
iprot
);
this
->
__isset
.
e
=
true
;
}
else
{
xfer
+=
iprot
->
skip
(
ftype
);
}
break
;
default:
xfer
+=
iprot
->
skip
(
ftype
);
break
;
}
xfer
+=
iprot
->
readFieldEnd
();
}
xfer
+=
iprot
->
readStructEnd
();
return
xfer
;
}
MilvusService_DeleteTable_args
::~
MilvusService_DeleteTable_args
()
throw
()
{
MilvusService_DeleteTable_args
::~
MilvusService_DeleteTable_args
()
throw
()
{
}
}
...
@@ -2290,6 +2497,67 @@ void MilvusServiceClient::recv_CreateTable()
...
@@ -2290,6 +2497,67 @@ void MilvusServiceClient::recv_CreateTable()
return
;
return
;
}
}
bool
MilvusServiceClient
::
HasTable
(
const
std
::
string
&
table_name
)
{
send_HasTable
(
table_name
);
return
recv_HasTable
();
}
void
MilvusServiceClient
::
send_HasTable
(
const
std
::
string
&
table_name
)
{
int32_t
cseqid
=
0
;
oprot_
->
writeMessageBegin
(
"HasTable"
,
::
apache
::
thrift
::
protocol
::
T_CALL
,
cseqid
);
MilvusService_HasTable_pargs
args
;
args
.
table_name
=
&
table_name
;
args
.
write
(
oprot_
);
oprot_
->
writeMessageEnd
();
oprot_
->
getTransport
()
->
writeEnd
();
oprot_
->
getTransport
()
->
flush
();
}
bool
MilvusServiceClient
::
recv_HasTable
()
{
int32_t
rseqid
=
0
;
std
::
string
fname
;
::
apache
::
thrift
::
protocol
::
TMessageType
mtype
;
iprot_
->
readMessageBegin
(
fname
,
mtype
,
rseqid
);
if
(
mtype
==
::
apache
::
thrift
::
protocol
::
T_EXCEPTION
)
{
::
apache
::
thrift
::
TApplicationException
x
;
x
.
read
(
iprot_
);
iprot_
->
readMessageEnd
();
iprot_
->
getTransport
()
->
readEnd
();
throw
x
;
}
if
(
mtype
!=
::
apache
::
thrift
::
protocol
::
T_REPLY
)
{
iprot_
->
skip
(
::
apache
::
thrift
::
protocol
::
T_STRUCT
);
iprot_
->
readMessageEnd
();
iprot_
->
getTransport
()
->
readEnd
();
}
if
(
fname
.
compare
(
"HasTable"
)
!=
0
)
{
iprot_
->
skip
(
::
apache
::
thrift
::
protocol
::
T_STRUCT
);
iprot_
->
readMessageEnd
();
iprot_
->
getTransport
()
->
readEnd
();
}
bool
_return
;
MilvusService_HasTable_presult
result
;
result
.
success
=
&
_return
;
result
.
read
(
iprot_
);
iprot_
->
readMessageEnd
();
iprot_
->
getTransport
()
->
readEnd
();
if
(
result
.
__isset
.
success
)
{
return
_return
;
}
if
(
result
.
__isset
.
e
)
{
throw
result
.
e
;
}
throw
::
apache
::
thrift
::
TApplicationException
(
::
apache
::
thrift
::
TApplicationException
::
MISSING_RESULT
,
"HasTable failed: unknown result"
);
}
void
MilvusServiceClient
::
DeleteTable
(
const
std
::
string
&
table_name
)
void
MilvusServiceClient
::
DeleteTable
(
const
std
::
string
&
table_name
)
{
{
send_DeleteTable
(
table_name
);
send_DeleteTable
(
table_name
);
...
@@ -2855,6 +3123,63 @@ void MilvusServiceProcessor::process_CreateTable(int32_t seqid, ::apache::thrift
...
@@ -2855,6 +3123,63 @@ void MilvusServiceProcessor::process_CreateTable(int32_t seqid, ::apache::thrift
}
}
}
}
void
MilvusServiceProcessor
::
process_HasTable
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
)
{
void
*
ctx
=
NULL
;
if
(
this
->
eventHandler_
.
get
()
!=
NULL
)
{
ctx
=
this
->
eventHandler_
->
getContext
(
"MilvusService.HasTable"
,
callContext
);
}
::
apache
::
thrift
::
TProcessorContextFreer
freer
(
this
->
eventHandler_
.
get
(),
ctx
,
"MilvusService.HasTable"
);
if
(
this
->
eventHandler_
.
get
()
!=
NULL
)
{
this
->
eventHandler_
->
preRead
(
ctx
,
"MilvusService.HasTable"
);
}
MilvusService_HasTable_args
args
;
args
.
read
(
iprot
);
iprot
->
readMessageEnd
();
uint32_t
bytes
=
iprot
->
getTransport
()
->
readEnd
();
if
(
this
->
eventHandler_
.
get
()
!=
NULL
)
{
this
->
eventHandler_
->
postRead
(
ctx
,
"MilvusService.HasTable"
,
bytes
);
}
MilvusService_HasTable_result
result
;
try
{
result
.
success
=
iface_
->
HasTable
(
args
.
table_name
);
result
.
__isset
.
success
=
true
;
}
catch
(
Exception
&
e
)
{
result
.
e
=
e
;
result
.
__isset
.
e
=
true
;
}
catch
(
const
std
::
exception
&
e
)
{
if
(
this
->
eventHandler_
.
get
()
!=
NULL
)
{
this
->
eventHandler_
->
handlerError
(
ctx
,
"MilvusService.HasTable"
);
}
::
apache
::
thrift
::
TApplicationException
x
(
e
.
what
());
oprot
->
writeMessageBegin
(
"HasTable"
,
::
apache
::
thrift
::
protocol
::
T_EXCEPTION
,
seqid
);
x
.
write
(
oprot
);
oprot
->
writeMessageEnd
();
oprot
->
getTransport
()
->
writeEnd
();
oprot
->
getTransport
()
->
flush
();
return
;
}
if
(
this
->
eventHandler_
.
get
()
!=
NULL
)
{
this
->
eventHandler_
->
preWrite
(
ctx
,
"MilvusService.HasTable"
);
}
oprot
->
writeMessageBegin
(
"HasTable"
,
::
apache
::
thrift
::
protocol
::
T_REPLY
,
seqid
);
result
.
write
(
oprot
);
oprot
->
writeMessageEnd
();
bytes
=
oprot
->
getTransport
()
->
writeEnd
();
oprot
->
getTransport
()
->
flush
();
if
(
this
->
eventHandler_
.
get
()
!=
NULL
)
{
this
->
eventHandler_
->
postWrite
(
ctx
,
"MilvusService.HasTable"
,
bytes
);
}
}
void
MilvusServiceProcessor
::
process_DeleteTable
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
)
void
MilvusServiceProcessor
::
process_DeleteTable
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
)
{
{
void
*
ctx
=
NULL
;
void
*
ctx
=
NULL
;
...
@@ -3399,6 +3724,94 @@ void MilvusServiceConcurrentClient::recv_CreateTable(const int32_t seqid)
...
@@ -3399,6 +3724,94 @@ void MilvusServiceConcurrentClient::recv_CreateTable(const int32_t seqid)
}
// end while(true)
}
// end while(true)
}
}
bool
MilvusServiceConcurrentClient
::
HasTable
(
const
std
::
string
&
table_name
)
{
int32_t
seqid
=
send_HasTable
(
table_name
);
return
recv_HasTable
(
seqid
);
}
int32_t
MilvusServiceConcurrentClient
::
send_HasTable
(
const
std
::
string
&
table_name
)
{
int32_t
cseqid
=
this
->
sync_
.
generateSeqId
();
::
apache
::
thrift
::
async
::
TConcurrentSendSentry
sentry
(
&
this
->
sync_
);
oprot_
->
writeMessageBegin
(
"HasTable"
,
::
apache
::
thrift
::
protocol
::
T_CALL
,
cseqid
);
MilvusService_HasTable_pargs
args
;
args
.
table_name
=
&
table_name
;
args
.
write
(
oprot_
);
oprot_
->
writeMessageEnd
();
oprot_
->
getTransport
()
->
writeEnd
();
oprot_
->
getTransport
()
->
flush
();
sentry
.
commit
();
return
cseqid
;
}
bool
MilvusServiceConcurrentClient
::
recv_HasTable
(
const
int32_t
seqid
)
{
int32_t
rseqid
=
0
;
std
::
string
fname
;
::
apache
::
thrift
::
protocol
::
TMessageType
mtype
;
// the read mutex gets dropped and reacquired as part of waitForWork()
// The destructor of this sentry wakes up other clients
::
apache
::
thrift
::
async
::
TConcurrentRecvSentry
sentry
(
&
this
->
sync_
,
seqid
);
while
(
true
)
{
if
(
!
this
->
sync_
.
getPending
(
fname
,
mtype
,
rseqid
))
{
iprot_
->
readMessageBegin
(
fname
,
mtype
,
rseqid
);
}
if
(
seqid
==
rseqid
)
{
if
(
mtype
==
::
apache
::
thrift
::
protocol
::
T_EXCEPTION
)
{
::
apache
::
thrift
::
TApplicationException
x
;
x
.
read
(
iprot_
);
iprot_
->
readMessageEnd
();
iprot_
->
getTransport
()
->
readEnd
();
sentry
.
commit
();
throw
x
;
}
if
(
mtype
!=
::
apache
::
thrift
::
protocol
::
T_REPLY
)
{
iprot_
->
skip
(
::
apache
::
thrift
::
protocol
::
T_STRUCT
);
iprot_
->
readMessageEnd
();
iprot_
->
getTransport
()
->
readEnd
();
}
if
(
fname
.
compare
(
"HasTable"
)
!=
0
)
{
iprot_
->
skip
(
::
apache
::
thrift
::
protocol
::
T_STRUCT
);
iprot_
->
readMessageEnd
();
iprot_
->
getTransport
()
->
readEnd
();
// in a bad state, don't commit
using
::
apache
::
thrift
::
protocol
::
TProtocolException
;
throw
TProtocolException
(
TProtocolException
::
INVALID_DATA
);
}
bool
_return
;
MilvusService_HasTable_presult
result
;
result
.
success
=
&
_return
;
result
.
read
(
iprot_
);
iprot_
->
readMessageEnd
();
iprot_
->
getTransport
()
->
readEnd
();
if
(
result
.
__isset
.
success
)
{
sentry
.
commit
();
return
_return
;
}
if
(
result
.
__isset
.
e
)
{
sentry
.
commit
();
throw
result
.
e
;
}
// in a bad state, don't commit
throw
::
apache
::
thrift
::
TApplicationException
(
::
apache
::
thrift
::
TApplicationException
::
MISSING_RESULT
,
"HasTable failed: unknown result"
);
}
// seqid != rseqid
this
->
sync_
.
updatePending
(
fname
,
mtype
,
rseqid
);
// this will temporarily unlock the readMutex, and let other clients get work done
this
->
sync_
.
waitForWork
(
seqid
);
}
// end while(true)
}
void
MilvusServiceConcurrentClient
::
DeleteTable
(
const
std
::
string
&
table_name
)
void
MilvusServiceConcurrentClient
::
DeleteTable
(
const
std
::
string
&
table_name
)
{
{
int32_t
seqid
=
send_DeleteTable
(
table_name
);
int32_t
seqid
=
send_DeleteTable
(
table_name
);
...
...
cpp/src/thrift/gen-cpp/MilvusService.h
浏览文件 @
af094c3b
...
@@ -34,6 +34,18 @@ class MilvusServiceIf {
...
@@ -34,6 +34,18 @@ class MilvusServiceIf {
*/
*/
virtual
void
CreateTable
(
const
TableSchema
&
param
)
=
0
;
virtual
void
CreateTable
(
const
TableSchema
&
param
)
=
0
;
/**
* @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
*/
virtual
bool
HasTable
(
const
std
::
string
&
table_name
)
=
0
;
/**
/**
* @brief Delete table method
* @brief Delete table method
*
*
...
@@ -178,6 +190,10 @@ class MilvusServiceNull : virtual public MilvusServiceIf {
...
@@ -178,6 +190,10 @@ class MilvusServiceNull : virtual public MilvusServiceIf {
void
CreateTable
(
const
TableSchema
&
/* param */
)
{
void
CreateTable
(
const
TableSchema
&
/* param */
)
{
return
;
return
;
}
}
bool
HasTable
(
const
std
::
string
&
/* table_name */
)
{
bool
_return
=
false
;
return
_return
;
}
void
DeleteTable
(
const
std
::
string
&
/* table_name */
)
{
void
DeleteTable
(
const
std
::
string
&
/* table_name */
)
{
return
;
return
;
}
}
...
@@ -309,6 +325,118 @@ class MilvusService_CreateTable_presult {
...
@@ -309,6 +325,118 @@ class MilvusService_CreateTable_presult {
};
};
typedef
struct
_MilvusService_HasTable_args__isset
{
_MilvusService_HasTable_args__isset
()
:
table_name
(
false
)
{}
bool
table_name
:
1
;
}
_MilvusService_HasTable_args__isset
;
class
MilvusService_HasTable_args
{
public:
MilvusService_HasTable_args
(
const
MilvusService_HasTable_args
&
);
MilvusService_HasTable_args
&
operator
=
(
const
MilvusService_HasTable_args
&
);
MilvusService_HasTable_args
()
:
table_name
()
{
}
virtual
~
MilvusService_HasTable_args
()
throw
();
std
::
string
table_name
;
_MilvusService_HasTable_args__isset
__isset
;
void
__set_table_name
(
const
std
::
string
&
val
);
bool
operator
==
(
const
MilvusService_HasTable_args
&
rhs
)
const
{
if
(
!
(
table_name
==
rhs
.
table_name
))
return
false
;
return
true
;
}
bool
operator
!=
(
const
MilvusService_HasTable_args
&
rhs
)
const
{
return
!
(
*
this
==
rhs
);
}
bool
operator
<
(
const
MilvusService_HasTable_args
&
)
const
;
uint32_t
read
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
);
uint32_t
write
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
)
const
;
};
class
MilvusService_HasTable_pargs
{
public:
virtual
~
MilvusService_HasTable_pargs
()
throw
();
const
std
::
string
*
table_name
;
uint32_t
write
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
)
const
;
};
typedef
struct
_MilvusService_HasTable_result__isset
{
_MilvusService_HasTable_result__isset
()
:
success
(
false
),
e
(
false
)
{}
bool
success
:
1
;
bool
e
:
1
;
}
_MilvusService_HasTable_result__isset
;
class
MilvusService_HasTable_result
{
public:
MilvusService_HasTable_result
(
const
MilvusService_HasTable_result
&
);
MilvusService_HasTable_result
&
operator
=
(
const
MilvusService_HasTable_result
&
);
MilvusService_HasTable_result
()
:
success
(
0
)
{
}
virtual
~
MilvusService_HasTable_result
()
throw
();
bool
success
;
Exception
e
;
_MilvusService_HasTable_result__isset
__isset
;
void
__set_success
(
const
bool
val
);
void
__set_e
(
const
Exception
&
val
);
bool
operator
==
(
const
MilvusService_HasTable_result
&
rhs
)
const
{
if
(
!
(
success
==
rhs
.
success
))
return
false
;
if
(
!
(
e
==
rhs
.
e
))
return
false
;
return
true
;
}
bool
operator
!=
(
const
MilvusService_HasTable_result
&
rhs
)
const
{
return
!
(
*
this
==
rhs
);
}
bool
operator
<
(
const
MilvusService_HasTable_result
&
)
const
;
uint32_t
read
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
);
uint32_t
write
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
)
const
;
};
typedef
struct
_MilvusService_HasTable_presult__isset
{
_MilvusService_HasTable_presult__isset
()
:
success
(
false
),
e
(
false
)
{}
bool
success
:
1
;
bool
e
:
1
;
}
_MilvusService_HasTable_presult__isset
;
class
MilvusService_HasTable_presult
{
public:
virtual
~
MilvusService_HasTable_presult
()
throw
();
bool
*
success
;
Exception
e
;
_MilvusService_HasTable_presult__isset
__isset
;
uint32_t
read
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
);
};
typedef
struct
_MilvusService_DeleteTable_args__isset
{
typedef
struct
_MilvusService_DeleteTable_args__isset
{
_MilvusService_DeleteTable_args__isset
()
:
table_name
(
false
)
{}
_MilvusService_DeleteTable_args__isset
()
:
table_name
(
false
)
{}
bool
table_name
:
1
;
bool
table_name
:
1
;
...
@@ -1269,6 +1397,9 @@ class MilvusServiceClient : virtual public MilvusServiceIf {
...
@@ -1269,6 +1397,9 @@ class MilvusServiceClient : virtual public MilvusServiceIf {
void
CreateTable
(
const
TableSchema
&
param
);
void
CreateTable
(
const
TableSchema
&
param
);
void
send_CreateTable
(
const
TableSchema
&
param
);
void
send_CreateTable
(
const
TableSchema
&
param
);
void
recv_CreateTable
();
void
recv_CreateTable
();
bool
HasTable
(
const
std
::
string
&
table_name
);
void
send_HasTable
(
const
std
::
string
&
table_name
);
bool
recv_HasTable
();
void
DeleteTable
(
const
std
::
string
&
table_name
);
void
DeleteTable
(
const
std
::
string
&
table_name
);
void
send_DeleteTable
(
const
std
::
string
&
table_name
);
void
send_DeleteTable
(
const
std
::
string
&
table_name
);
void
recv_DeleteTable
();
void
recv_DeleteTable
();
...
@@ -1309,6 +1440,7 @@ class MilvusServiceProcessor : public ::apache::thrift::TDispatchProcessor {
...
@@ -1309,6 +1440,7 @@ class MilvusServiceProcessor : public ::apache::thrift::TDispatchProcessor {
typedef
std
::
map
<
std
::
string
,
ProcessFunction
>
ProcessMap
;
typedef
std
::
map
<
std
::
string
,
ProcessFunction
>
ProcessMap
;
ProcessMap
processMap_
;
ProcessMap
processMap_
;
void
process_CreateTable
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
);
void
process_CreateTable
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
);
void
process_HasTable
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
);
void
process_DeleteTable
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
);
void
process_DeleteTable
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
);
void
process_AddVector
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
);
void
process_AddVector
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
);
void
process_SearchVector
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
);
void
process_SearchVector
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
);
...
@@ -1321,6 +1453,7 @@ class MilvusServiceProcessor : public ::apache::thrift::TDispatchProcessor {
...
@@ -1321,6 +1453,7 @@ class MilvusServiceProcessor : public ::apache::thrift::TDispatchProcessor {
MilvusServiceProcessor
(
::
apache
::
thrift
::
stdcxx
::
shared_ptr
<
MilvusServiceIf
>
iface
)
:
MilvusServiceProcessor
(
::
apache
::
thrift
::
stdcxx
::
shared_ptr
<
MilvusServiceIf
>
iface
)
:
iface_
(
iface
)
{
iface_
(
iface
)
{
processMap_
[
"CreateTable"
]
=
&
MilvusServiceProcessor
::
process_CreateTable
;
processMap_
[
"CreateTable"
]
=
&
MilvusServiceProcessor
::
process_CreateTable
;
processMap_
[
"HasTable"
]
=
&
MilvusServiceProcessor
::
process_HasTable
;
processMap_
[
"DeleteTable"
]
=
&
MilvusServiceProcessor
::
process_DeleteTable
;
processMap_
[
"DeleteTable"
]
=
&
MilvusServiceProcessor
::
process_DeleteTable
;
processMap_
[
"AddVector"
]
=
&
MilvusServiceProcessor
::
process_AddVector
;
processMap_
[
"AddVector"
]
=
&
MilvusServiceProcessor
::
process_AddVector
;
processMap_
[
"SearchVector"
]
=
&
MilvusServiceProcessor
::
process_SearchVector
;
processMap_
[
"SearchVector"
]
=
&
MilvusServiceProcessor
::
process_SearchVector
;
...
@@ -1366,6 +1499,15 @@ class MilvusServiceMultiface : virtual public MilvusServiceIf {
...
@@ -1366,6 +1499,15 @@ class MilvusServiceMultiface : virtual public MilvusServiceIf {
ifaces_
[
i
]
->
CreateTable
(
param
);
ifaces_
[
i
]
->
CreateTable
(
param
);
}
}
bool
HasTable
(
const
std
::
string
&
table_name
)
{
size_t
sz
=
ifaces_
.
size
();
size_t
i
=
0
;
for
(;
i
<
(
sz
-
1
);
++
i
)
{
ifaces_
[
i
]
->
HasTable
(
table_name
);
}
return
ifaces_
[
i
]
->
HasTable
(
table_name
);
}
void
DeleteTable
(
const
std
::
string
&
table_name
)
{
void
DeleteTable
(
const
std
::
string
&
table_name
)
{
size_t
sz
=
ifaces_
.
size
();
size_t
sz
=
ifaces_
.
size
();
size_t
i
=
0
;
size_t
i
=
0
;
...
@@ -1477,6 +1619,9 @@ class MilvusServiceConcurrentClient : virtual public MilvusServiceIf {
...
@@ -1477,6 +1619,9 @@ class MilvusServiceConcurrentClient : virtual public MilvusServiceIf {
void
CreateTable
(
const
TableSchema
&
param
);
void
CreateTable
(
const
TableSchema
&
param
);
int32_t
send_CreateTable
(
const
TableSchema
&
param
);
int32_t
send_CreateTable
(
const
TableSchema
&
param
);
void
recv_CreateTable
(
const
int32_t
seqid
);
void
recv_CreateTable
(
const
int32_t
seqid
);
bool
HasTable
(
const
std
::
string
&
table_name
);
int32_t
send_HasTable
(
const
std
::
string
&
table_name
);
bool
recv_HasTable
(
const
int32_t
seqid
);
void
DeleteTable
(
const
std
::
string
&
table_name
);
void
DeleteTable
(
const
std
::
string
&
table_name
);
int32_t
send_DeleteTable
(
const
std
::
string
&
table_name
);
int32_t
send_DeleteTable
(
const
std
::
string
&
table_name
);
void
recv_DeleteTable
(
const
int32_t
seqid
);
void
recv_DeleteTable
(
const
int32_t
seqid
);
...
...
cpp/src/thrift/gen-cpp/MilvusService_server.skeleton.cpp
浏览文件 @
af094c3b
...
@@ -35,6 +35,21 @@ class MilvusServiceHandler : virtual public MilvusServiceIf {
...
@@ -35,6 +35,21 @@ class MilvusServiceHandler : virtual public MilvusServiceIf {
printf
(
"CreateTable
\n
"
);
printf
(
"CreateTable
\n
"
);
}
}
/**
* @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
*/
bool
HasTable
(
const
std
::
string
&
table_name
)
{
// Your implementation goes here
printf
(
"HasTable
\n
"
);
}
/**
/**
* @brief Delete table method
* @brief Delete table method
*
*
...
...
cpp/src/thrift/milvus.thrift
浏览文件 @
af094c3b
...
@@ -80,6 +80,16 @@ service MilvusService {
...
@@ -80,6 +80,16 @@ service MilvusService {
*/
*/
void CreateTable(2: TableSchema param) throws(1: Exception e);
void CreateTable(2: TableSchema param) throws(1: Exception e);
/**
* @brief Test table existence method
*
* This method is used to test table existence.
*
* @param table_name, table name is going to be tested.
*
*/
bool HasTable(2: string table_name) throws(1: Exception e);
/**
/**
* @brief Delete table method
* @brief Delete table method
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录