Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
5082b10b
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,发现更多精彩内容 >>
提交
5082b10b
编写于
7月 09, 2019
作者:
P
peng.xu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(server): add build index api
Former-commit-id: 8615b6cc5574b90f69da8dc9c7c7df77a0421974
上级
3b909197
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
623 addition
and
9 deletion
+623
-9
cpp/src/server/RequestHandler.cpp
cpp/src/server/RequestHandler.cpp
+6
-0
cpp/src/server/RequestHandler.h
cpp/src/server/RequestHandler.h
+12
-0
cpp/src/server/RequestScheduler.cpp
cpp/src/server/RequestScheduler.cpp
+2
-1
cpp/src/server/RequestTask.cpp
cpp/src/server/RequestTask.cpp
+34
-1
cpp/src/server/RequestTask.h
cpp/src/server/RequestTask.h
+16
-1
cpp/src/thrift/gen-cpp/MilvusService.cpp
cpp/src/thrift/gen-cpp/MilvusService.cpp
+381
-0
cpp/src/thrift/gen-cpp/MilvusService.h
cpp/src/thrift/gen-cpp/MilvusService.h
+136
-0
cpp/src/thrift/gen-cpp/MilvusService_server.skeleton.cpp
cpp/src/thrift/gen-cpp/MilvusService_server.skeleton.cpp
+15
-0
cpp/src/thrift/gen-cpp/milvus_types.cpp
cpp/src/thrift/gen-cpp/milvus_types.cpp
+5
-3
cpp/src/thrift/gen-cpp/milvus_types.h
cpp/src/thrift/gen-cpp/milvus_types.h
+2
-1
cpp/src/thrift/milvus.thrift
cpp/src/thrift/milvus.thrift
+12
-1
cpp/src/utils/Error.h
cpp/src/utils/Error.h
+2
-1
未找到文件。
cpp/src/server/RequestHandler.cpp
浏览文件 @
5082b10b
...
@@ -39,6 +39,12 @@ RequestHandler::DeleteTable(const std::string &table_name) {
...
@@ -39,6 +39,12 @@ RequestHandler::DeleteTable(const std::string &table_name) {
RequestScheduler
::
ExecTask
(
task_ptr
);
RequestScheduler
::
ExecTask
(
task_ptr
);
}
}
void
RequestHandler
::
BuildIndex
(
const
std
::
string
&
table_name
)
{
BaseTaskPtr
task_ptr
=
BuildIndexTask
::
Create
(
table_name
);
RequestScheduler
::
ExecTask
(
task_ptr
);
}
void
void
RequestHandler
::
AddVector
(
std
::
vector
<
int64_t
>
&
_return
,
RequestHandler
::
AddVector
(
std
::
vector
<
int64_t
>
&
_return
,
const
std
::
string
&
table_name
,
const
std
::
string
&
table_name
,
...
...
cpp/src/server/RequestHandler.h
浏览文件 @
5082b10b
...
@@ -54,6 +54,18 @@ public:
...
@@ -54,6 +54,18 @@ public:
*/
*/
void
DeleteTable
(
const
std
::
string
&
table_name
);
void
DeleteTable
(
const
std
::
string
&
table_name
);
/**
* @brief build index by table method
*
* This method is used to build index by table in sync.
*
* @param table_name, table name is going to be built index.
*
*
* @param table_name
*/
void
BuildIndex
(
const
std
::
string
&
table_name
);
/**
/**
* @brief Add vector array to table
* @brief Add vector array to table
*
*
...
...
cpp/src/server/RequestScheduler.cpp
浏览文件 @
5082b10b
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
namespace
zilliz
{
namespace
zilliz
{
namespace
milvus
{
namespace
milvus
{
namespace
server
{
namespace
server
{
using
namespace
::
milvus
;
using
namespace
::
milvus
;
namespace
{
namespace
{
...
@@ -43,6 +43,7 @@ namespace {
...
@@ -43,6 +43,7 @@ namespace {
{
SERVER_ILLEGAL_SEARCH_RESULT
,
thrift
::
ErrorCode
::
ILLEGAL_SEARCH_RESULT
},
{
SERVER_ILLEGAL_SEARCH_RESULT
,
thrift
::
ErrorCode
::
ILLEGAL_SEARCH_RESULT
},
{
SERVER_CACHE_ERROR
,
thrift
::
ErrorCode
::
CACHE_FAILED
},
{
SERVER_CACHE_ERROR
,
thrift
::
ErrorCode
::
CACHE_FAILED
},
{
DB_META_TRANSACTION_FAILED
,
thrift
::
ErrorCode
::
META_FAILED
},
{
DB_META_TRANSACTION_FAILED
,
thrift
::
ErrorCode
::
META_FAILED
},
{
SERVER_BUILD_INDEX_ERROR
,
thrift
::
ErrorCode
::
BUILD_INDEX_ERROR
},
};
};
return
code_map
;
return
code_map
;
...
...
cpp/src/server/RequestTask.cpp
浏览文件 @
5082b10b
...
@@ -133,7 +133,7 @@ BaseTaskPtr CreateTableTask::Create(const thrift::TableSchema& schema) {
...
@@ -133,7 +133,7 @@ BaseTaskPtr CreateTableTask::Create(const thrift::TableSchema& schema) {
ServerError
CreateTableTask
::
OnExecute
()
{
ServerError
CreateTableTask
::
OnExecute
()
{
TimeRecorder
rc
(
"CreateTableTask"
);
TimeRecorder
rc
(
"CreateTableTask"
);
try
{
try
{
//step 1: check arguments
//step 1: check arguments
if
(
schema_
.
table_name
.
empty
())
{
if
(
schema_
.
table_name
.
empty
())
{
...
@@ -213,6 +213,39 @@ ServerError DescribeTableTask::OnExecute() {
...
@@ -213,6 +213,39 @@ ServerError DescribeTableTask::OnExecute() {
return
SERVER_SUCCESS
;
return
SERVER_SUCCESS
;
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
BuildIndexTask
::
BuildIndexTask
(
const
std
::
string
&
table_name
)
:
BaseTask
(
DDL_DML_TASK_GROUP
),
table_name_
(
table_name
)
{
}
BaseTaskPtr
BuildIndexTask
::
Create
(
const
std
::
string
&
table_name
)
{
return
std
::
shared_ptr
<
BaseTask
>
(
new
BuildIndexTask
(
table_name
));
}
ServerError
BuildIndexTask
::
OnExecute
()
{
try
{
TimeRecorder
rc
(
"BuildIndexTask"
);
//step 1: check arguments
if
(
table_name_
.
empty
())
{
return
SetError
(
SERVER_INVALID_TABLE_NAME
,
"Empty table name"
);
}
//step 2: check table existence
engine
::
Status
stat
=
DBWrapper
::
DB
()
->
BuildIndex
(
table_name_
);
if
(
!
stat
.
ok
())
{
return
SetError
(
SERVER_BUILD_INDEX_ERROR
,
"Engine failed: "
+
stat
.
ToString
());
}
rc
.
Elapse
(
"totally cost"
);
}
catch
(
std
::
exception
&
ex
)
{
return
SetError
(
SERVER_UNEXPECTED_ERROR
,
ex
.
what
());
}
return
SERVER_SUCCESS
;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
HasTableTask
::
HasTableTask
(
const
std
::
string
&
table_name
,
bool
&
has_table
)
HasTableTask
::
HasTableTask
(
const
std
::
string
&
table_name
,
bool
&
has_table
)
:
BaseTask
(
DDL_DML_TASK_GROUP
),
:
BaseTask
(
DDL_DML_TASK_GROUP
),
...
...
cpp/src/server/RequestTask.h
浏览文件 @
5082b10b
...
@@ -75,6 +75,21 @@ protected:
...
@@ -75,6 +75,21 @@ protected:
ServerError
OnExecute
()
override
;
ServerError
OnExecute
()
override
;
private:
std
::
string
table_name_
;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class
BuildIndexTask
:
public
BaseTask
{
public:
static
BaseTaskPtr
Create
(
const
std
::
string
&
table_name
);
protected:
BuildIndexTask
(
const
std
::
string
&
table_name
);
ServerError
OnExecute
()
override
;
private:
private:
std
::
string
table_name_
;
std
::
string
table_name_
;
};
};
...
@@ -174,4 +189,4 @@ private:
...
@@ -174,4 +189,4 @@ private:
}
}
}
}
}
}
\ No newline at end of file
cpp/src/thrift/gen-cpp/MilvusService.cpp
浏览文件 @
5082b10b
...
@@ -590,6 +590,193 @@ uint32_t MilvusService_DeleteTable_presult::read(::apache::thrift::protocol::TPr
...
@@ -590,6 +590,193 @@ uint32_t MilvusService_DeleteTable_presult::read(::apache::thrift::protocol::TPr
}
}
MilvusService_BuildIndex_args
::~
MilvusService_BuildIndex_args
()
throw
()
{
}
uint32_t
MilvusService_BuildIndex_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_BuildIndex_args
::
write
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
)
const
{
uint32_t
xfer
=
0
;
::
apache
::
thrift
::
protocol
::
TOutputRecursionTracker
tracker
(
*
oprot
);
xfer
+=
oprot
->
writeStructBegin
(
"MilvusService_BuildIndex_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_BuildIndex_pargs
::~
MilvusService_BuildIndex_pargs
()
throw
()
{
}
uint32_t
MilvusService_BuildIndex_pargs
::
write
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
)
const
{
uint32_t
xfer
=
0
;
::
apache
::
thrift
::
protocol
::
TOutputRecursionTracker
tracker
(
*
oprot
);
xfer
+=
oprot
->
writeStructBegin
(
"MilvusService_BuildIndex_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_BuildIndex_result
::~
MilvusService_BuildIndex_result
()
throw
()
{
}
uint32_t
MilvusService_BuildIndex_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
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_BuildIndex_result
::
write
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
)
const
{
uint32_t
xfer
=
0
;
xfer
+=
oprot
->
writeStructBegin
(
"MilvusService_BuildIndex_result"
);
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_BuildIndex_presult
::~
MilvusService_BuildIndex_presult
()
throw
()
{
}
uint32_t
MilvusService_BuildIndex_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
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_AddVector_args
::~
MilvusService_AddVector_args
()
throw
()
{
MilvusService_AddVector_args
::~
MilvusService_AddVector_args
()
throw
()
{
}
}
...
@@ -2614,6 +2801,62 @@ void MilvusServiceClient::recv_DeleteTable()
...
@@ -2614,6 +2801,62 @@ void MilvusServiceClient::recv_DeleteTable()
return
;
return
;
}
}
void
MilvusServiceClient
::
BuildIndex
(
const
std
::
string
&
table_name
)
{
send_BuildIndex
(
table_name
);
recv_BuildIndex
();
}
void
MilvusServiceClient
::
send_BuildIndex
(
const
std
::
string
&
table_name
)
{
int32_t
cseqid
=
0
;
oprot_
->
writeMessageBegin
(
"BuildIndex"
,
::
apache
::
thrift
::
protocol
::
T_CALL
,
cseqid
);
MilvusService_BuildIndex_pargs
args
;
args
.
table_name
=
&
table_name
;
args
.
write
(
oprot_
);
oprot_
->
writeMessageEnd
();
oprot_
->
getTransport
()
->
writeEnd
();
oprot_
->
getTransport
()
->
flush
();
}
void
MilvusServiceClient
::
recv_BuildIndex
()
{
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
(
"BuildIndex"
)
!=
0
)
{
iprot_
->
skip
(
::
apache
::
thrift
::
protocol
::
T_STRUCT
);
iprot_
->
readMessageEnd
();
iprot_
->
getTransport
()
->
readEnd
();
}
MilvusService_BuildIndex_presult
result
;
result
.
read
(
iprot_
);
iprot_
->
readMessageEnd
();
iprot_
->
getTransport
()
->
readEnd
();
if
(
result
.
__isset
.
e
)
{
throw
result
.
e
;
}
return
;
}
void
MilvusServiceClient
::
AddVector
(
std
::
vector
<
int64_t
>
&
_return
,
const
std
::
string
&
table_name
,
const
std
::
vector
<
RowRecord
>
&
record_array
)
void
MilvusServiceClient
::
AddVector
(
std
::
vector
<
int64_t
>
&
_return
,
const
std
::
string
&
table_name
,
const
std
::
vector
<
RowRecord
>
&
record_array
)
{
{
send_AddVector
(
table_name
,
record_array
);
send_AddVector
(
table_name
,
record_array
);
...
@@ -3236,6 +3479,62 @@ void MilvusServiceProcessor::process_DeleteTable(int32_t seqid, ::apache::thrift
...
@@ -3236,6 +3479,62 @@ void MilvusServiceProcessor::process_DeleteTable(int32_t seqid, ::apache::thrift
}
}
}
}
void
MilvusServiceProcessor
::
process_BuildIndex
(
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.BuildIndex"
,
callContext
);
}
::
apache
::
thrift
::
TProcessorContextFreer
freer
(
this
->
eventHandler_
.
get
(),
ctx
,
"MilvusService.BuildIndex"
);
if
(
this
->
eventHandler_
.
get
()
!=
NULL
)
{
this
->
eventHandler_
->
preRead
(
ctx
,
"MilvusService.BuildIndex"
);
}
MilvusService_BuildIndex_args
args
;
args
.
read
(
iprot
);
iprot
->
readMessageEnd
();
uint32_t
bytes
=
iprot
->
getTransport
()
->
readEnd
();
if
(
this
->
eventHandler_
.
get
()
!=
NULL
)
{
this
->
eventHandler_
->
postRead
(
ctx
,
"MilvusService.BuildIndex"
,
bytes
);
}
MilvusService_BuildIndex_result
result
;
try
{
iface_
->
BuildIndex
(
args
.
table_name
);
}
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.BuildIndex"
);
}
::
apache
::
thrift
::
TApplicationException
x
(
e
.
what
());
oprot
->
writeMessageBegin
(
"BuildIndex"
,
::
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.BuildIndex"
);
}
oprot
->
writeMessageBegin
(
"BuildIndex"
,
::
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.BuildIndex"
,
bytes
);
}
}
void
MilvusServiceProcessor
::
process_AddVector
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
)
void
MilvusServiceProcessor
::
process_AddVector
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
)
{
{
void
*
ctx
=
NULL
;
void
*
ctx
=
NULL
;
...
@@ -3894,6 +4193,88 @@ void MilvusServiceConcurrentClient::recv_DeleteTable(const int32_t seqid)
...
@@ -3894,6 +4193,88 @@ void MilvusServiceConcurrentClient::recv_DeleteTable(const int32_t seqid)
}
// end while(true)
}
// end while(true)
}
}
void
MilvusServiceConcurrentClient
::
BuildIndex
(
const
std
::
string
&
table_name
)
{
int32_t
seqid
=
send_BuildIndex
(
table_name
);
recv_BuildIndex
(
seqid
);
}
int32_t
MilvusServiceConcurrentClient
::
send_BuildIndex
(
const
std
::
string
&
table_name
)
{
int32_t
cseqid
=
this
->
sync_
.
generateSeqId
();
::
apache
::
thrift
::
async
::
TConcurrentSendSentry
sentry
(
&
this
->
sync_
);
oprot_
->
writeMessageBegin
(
"BuildIndex"
,
::
apache
::
thrift
::
protocol
::
T_CALL
,
cseqid
);
MilvusService_BuildIndex_pargs
args
;
args
.
table_name
=
&
table_name
;
args
.
write
(
oprot_
);
oprot_
->
writeMessageEnd
();
oprot_
->
getTransport
()
->
writeEnd
();
oprot_
->
getTransport
()
->
flush
();
sentry
.
commit
();
return
cseqid
;
}
void
MilvusServiceConcurrentClient
::
recv_BuildIndex
(
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
(
"BuildIndex"
)
!=
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
);
}
MilvusService_BuildIndex_presult
result
;
result
.
read
(
iprot_
);
iprot_
->
readMessageEnd
();
iprot_
->
getTransport
()
->
readEnd
();
if
(
result
.
__isset
.
e
)
{
sentry
.
commit
();
throw
result
.
e
;
}
sentry
.
commit
();
return
;
}
// 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
::
AddVector
(
std
::
vector
<
int64_t
>
&
_return
,
const
std
::
string
&
table_name
,
const
std
::
vector
<
RowRecord
>
&
record_array
)
void
MilvusServiceConcurrentClient
::
AddVector
(
std
::
vector
<
int64_t
>
&
_return
,
const
std
::
string
&
table_name
,
const
std
::
vector
<
RowRecord
>
&
record_array
)
{
{
int32_t
seqid
=
send_AddVector
(
table_name
,
record_array
);
int32_t
seqid
=
send_AddVector
(
table_name
,
record_array
);
...
...
cpp/src/thrift/gen-cpp/MilvusService.h
浏览文件 @
5082b10b
...
@@ -58,6 +58,18 @@ class MilvusServiceIf {
...
@@ -58,6 +58,18 @@ class MilvusServiceIf {
*/
*/
virtual
void
DeleteTable
(
const
std
::
string
&
table_name
)
=
0
;
virtual
void
DeleteTable
(
const
std
::
string
&
table_name
)
=
0
;
/**
* @brief Build index by table method
*
* This method is used to build index by table in sync mode.
*
* @param table_name, table is going to be built index.
*
*
* @param table_name
*/
virtual
void
BuildIndex
(
const
std
::
string
&
table_name
)
=
0
;
/**
/**
* @brief Add vector array to table
* @brief Add vector array to table
*
*
...
@@ -197,6 +209,9 @@ class MilvusServiceNull : virtual public MilvusServiceIf {
...
@@ -197,6 +209,9 @@ class MilvusServiceNull : virtual public MilvusServiceIf {
void
DeleteTable
(
const
std
::
string
&
/* table_name */
)
{
void
DeleteTable
(
const
std
::
string
&
/* table_name */
)
{
return
;
return
;
}
}
void
BuildIndex
(
const
std
::
string
&
/* table_name */
)
{
return
;
}
void
AddVector
(
std
::
vector
<
int64_t
>
&
/* _return */
,
const
std
::
string
&
/* table_name */
,
const
std
::
vector
<
RowRecord
>
&
/* record_array */
)
{
void
AddVector
(
std
::
vector
<
int64_t
>
&
/* _return */
,
const
std
::
string
&
/* table_name */
,
const
std
::
vector
<
RowRecord
>
&
/* record_array */
)
{
return
;
return
;
}
}
...
@@ -541,6 +556,110 @@ class MilvusService_DeleteTable_presult {
...
@@ -541,6 +556,110 @@ class MilvusService_DeleteTable_presult {
};
};
typedef
struct
_MilvusService_BuildIndex_args__isset
{
_MilvusService_BuildIndex_args__isset
()
:
table_name
(
false
)
{}
bool
table_name
:
1
;
}
_MilvusService_BuildIndex_args__isset
;
class
MilvusService_BuildIndex_args
{
public:
MilvusService_BuildIndex_args
(
const
MilvusService_BuildIndex_args
&
);
MilvusService_BuildIndex_args
&
operator
=
(
const
MilvusService_BuildIndex_args
&
);
MilvusService_BuildIndex_args
()
:
table_name
()
{
}
virtual
~
MilvusService_BuildIndex_args
()
throw
();
std
::
string
table_name
;
_MilvusService_BuildIndex_args__isset
__isset
;
void
__set_table_name
(
const
std
::
string
&
val
);
bool
operator
==
(
const
MilvusService_BuildIndex_args
&
rhs
)
const
{
if
(
!
(
table_name
==
rhs
.
table_name
))
return
false
;
return
true
;
}
bool
operator
!=
(
const
MilvusService_BuildIndex_args
&
rhs
)
const
{
return
!
(
*
this
==
rhs
);
}
bool
operator
<
(
const
MilvusService_BuildIndex_args
&
)
const
;
uint32_t
read
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
);
uint32_t
write
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
)
const
;
};
class
MilvusService_BuildIndex_pargs
{
public:
virtual
~
MilvusService_BuildIndex_pargs
()
throw
();
const
std
::
string
*
table_name
;
uint32_t
write
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
)
const
;
};
typedef
struct
_MilvusService_BuildIndex_result__isset
{
_MilvusService_BuildIndex_result__isset
()
:
e
(
false
)
{}
bool
e
:
1
;
}
_MilvusService_BuildIndex_result__isset
;
class
MilvusService_BuildIndex_result
{
public:
MilvusService_BuildIndex_result
(
const
MilvusService_BuildIndex_result
&
);
MilvusService_BuildIndex_result
&
operator
=
(
const
MilvusService_BuildIndex_result
&
);
MilvusService_BuildIndex_result
()
{
}
virtual
~
MilvusService_BuildIndex_result
()
throw
();
Exception
e
;
_MilvusService_BuildIndex_result__isset
__isset
;
void
__set_e
(
const
Exception
&
val
);
bool
operator
==
(
const
MilvusService_BuildIndex_result
&
rhs
)
const
{
if
(
!
(
e
==
rhs
.
e
))
return
false
;
return
true
;
}
bool
operator
!=
(
const
MilvusService_BuildIndex_result
&
rhs
)
const
{
return
!
(
*
this
==
rhs
);
}
bool
operator
<
(
const
MilvusService_BuildIndex_result
&
)
const
;
uint32_t
read
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
);
uint32_t
write
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
)
const
;
};
typedef
struct
_MilvusService_BuildIndex_presult__isset
{
_MilvusService_BuildIndex_presult__isset
()
:
e
(
false
)
{}
bool
e
:
1
;
}
_MilvusService_BuildIndex_presult__isset
;
class
MilvusService_BuildIndex_presult
{
public:
virtual
~
MilvusService_BuildIndex_presult
()
throw
();
Exception
e
;
_MilvusService_BuildIndex_presult__isset
__isset
;
uint32_t
read
(
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
);
};
typedef
struct
_MilvusService_AddVector_args__isset
{
typedef
struct
_MilvusService_AddVector_args__isset
{
_MilvusService_AddVector_args__isset
()
:
table_name
(
false
),
record_array
(
false
)
{}
_MilvusService_AddVector_args__isset
()
:
table_name
(
false
),
record_array
(
false
)
{}
bool
table_name
:
1
;
bool
table_name
:
1
;
...
@@ -1403,6 +1522,9 @@ class MilvusServiceClient : virtual public MilvusServiceIf {
...
@@ -1403,6 +1522,9 @@ class MilvusServiceClient : virtual public MilvusServiceIf {
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
();
void
BuildIndex
(
const
std
::
string
&
table_name
);
void
send_BuildIndex
(
const
std
::
string
&
table_name
);
void
recv_BuildIndex
();
void
AddVector
(
std
::
vector
<
int64_t
>
&
_return
,
const
std
::
string
&
table_name
,
const
std
::
vector
<
RowRecord
>
&
record_array
);
void
AddVector
(
std
::
vector
<
int64_t
>
&
_return
,
const
std
::
string
&
table_name
,
const
std
::
vector
<
RowRecord
>
&
record_array
);
void
send_AddVector
(
const
std
::
string
&
table_name
,
const
std
::
vector
<
RowRecord
>
&
record_array
);
void
send_AddVector
(
const
std
::
string
&
table_name
,
const
std
::
vector
<
RowRecord
>
&
record_array
);
void
recv_AddVector
(
std
::
vector
<
int64_t
>
&
_return
);
void
recv_AddVector
(
std
::
vector
<
int64_t
>
&
_return
);
...
@@ -1442,6 +1564,7 @@ class MilvusServiceProcessor : public ::apache::thrift::TDispatchProcessor {
...
@@ -1442,6 +1564,7 @@ class MilvusServiceProcessor : public ::apache::thrift::TDispatchProcessor {
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_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_BuildIndex
(
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
);
void
process_SearchVectorInFiles
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
);
void
process_SearchVectorInFiles
(
int32_t
seqid
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
iprot
,
::
apache
::
thrift
::
protocol
::
TProtocol
*
oprot
,
void
*
callContext
);
...
@@ -1455,6 +1578,7 @@ class MilvusServiceProcessor : public ::apache::thrift::TDispatchProcessor {
...
@@ -1455,6 +1578,7 @@ class MilvusServiceProcessor : public ::apache::thrift::TDispatchProcessor {
processMap_
[
"CreateTable"
]
=
&
MilvusServiceProcessor
::
process_CreateTable
;
processMap_
[
"CreateTable"
]
=
&
MilvusServiceProcessor
::
process_CreateTable
;
processMap_
[
"HasTable"
]
=
&
MilvusServiceProcessor
::
process_HasTable
;
processMap_
[
"HasTable"
]
=
&
MilvusServiceProcessor
::
process_HasTable
;
processMap_
[
"DeleteTable"
]
=
&
MilvusServiceProcessor
::
process_DeleteTable
;
processMap_
[
"DeleteTable"
]
=
&
MilvusServiceProcessor
::
process_DeleteTable
;
processMap_
[
"BuildIndex"
]
=
&
MilvusServiceProcessor
::
process_BuildIndex
;
processMap_
[
"AddVector"
]
=
&
MilvusServiceProcessor
::
process_AddVector
;
processMap_
[
"AddVector"
]
=
&
MilvusServiceProcessor
::
process_AddVector
;
processMap_
[
"SearchVector"
]
=
&
MilvusServiceProcessor
::
process_SearchVector
;
processMap_
[
"SearchVector"
]
=
&
MilvusServiceProcessor
::
process_SearchVector
;
processMap_
[
"SearchVectorInFiles"
]
=
&
MilvusServiceProcessor
::
process_SearchVectorInFiles
;
processMap_
[
"SearchVectorInFiles"
]
=
&
MilvusServiceProcessor
::
process_SearchVectorInFiles
;
...
@@ -1517,6 +1641,15 @@ class MilvusServiceMultiface : virtual public MilvusServiceIf {
...
@@ -1517,6 +1641,15 @@ class MilvusServiceMultiface : virtual public MilvusServiceIf {
ifaces_
[
i
]
->
DeleteTable
(
table_name
);
ifaces_
[
i
]
->
DeleteTable
(
table_name
);
}
}
void
BuildIndex
(
const
std
::
string
&
table_name
)
{
size_t
sz
=
ifaces_
.
size
();
size_t
i
=
0
;
for
(;
i
<
(
sz
-
1
);
++
i
)
{
ifaces_
[
i
]
->
BuildIndex
(
table_name
);
}
ifaces_
[
i
]
->
BuildIndex
(
table_name
);
}
void
AddVector
(
std
::
vector
<
int64_t
>
&
_return
,
const
std
::
string
&
table_name
,
const
std
::
vector
<
RowRecord
>
&
record_array
)
{
void
AddVector
(
std
::
vector
<
int64_t
>
&
_return
,
const
std
::
string
&
table_name
,
const
std
::
vector
<
RowRecord
>
&
record_array
)
{
size_t
sz
=
ifaces_
.
size
();
size_t
sz
=
ifaces_
.
size
();
size_t
i
=
0
;
size_t
i
=
0
;
...
@@ -1625,6 +1758,9 @@ class MilvusServiceConcurrentClient : virtual public MilvusServiceIf {
...
@@ -1625,6 +1758,9 @@ class MilvusServiceConcurrentClient : virtual public MilvusServiceIf {
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
);
void
BuildIndex
(
const
std
::
string
&
table_name
);
int32_t
send_BuildIndex
(
const
std
::
string
&
table_name
);
void
recv_BuildIndex
(
const
int32_t
seqid
);
void
AddVector
(
std
::
vector
<
int64_t
>
&
_return
,
const
std
::
string
&
table_name
,
const
std
::
vector
<
RowRecord
>
&
record_array
);
void
AddVector
(
std
::
vector
<
int64_t
>
&
_return
,
const
std
::
string
&
table_name
,
const
std
::
vector
<
RowRecord
>
&
record_array
);
int32_t
send_AddVector
(
const
std
::
string
&
table_name
,
const
std
::
vector
<
RowRecord
>
&
record_array
);
int32_t
send_AddVector
(
const
std
::
string
&
table_name
,
const
std
::
vector
<
RowRecord
>
&
record_array
);
void
recv_AddVector
(
std
::
vector
<
int64_t
>
&
_return
,
const
int32_t
seqid
);
void
recv_AddVector
(
std
::
vector
<
int64_t
>
&
_return
,
const
int32_t
seqid
);
...
...
cpp/src/thrift/gen-cpp/MilvusService_server.skeleton.cpp
浏览文件 @
5082b10b
...
@@ -65,6 +65,21 @@ class MilvusServiceHandler : virtual public MilvusServiceIf {
...
@@ -65,6 +65,21 @@ class MilvusServiceHandler : virtual public MilvusServiceIf {
printf
(
"DeleteTable
\n
"
);
printf
(
"DeleteTable
\n
"
);
}
}
/**
* @brief Build index by table method
*
* This method is used to build index by table in sync mode.
*
* @param table_name, table is going to be built index.
*
*
* @param table_name
*/
void
BuildIndex
(
const
std
::
string
&
table_name
)
{
// Your implementation goes here
printf
(
"BuildIndex
\n
"
);
}
/**
/**
* @brief Add vector array to table
* @brief Add vector array to table
*
*
...
...
cpp/src/thrift/gen-cpp/milvus_types.cpp
浏览文件 @
5082b10b
...
@@ -34,7 +34,8 @@ int _kErrorCodeValues[] = {
...
@@ -34,7 +34,8 @@ int _kErrorCodeValues[] = {
ErrorCode
::
CANNOT_CREATE_FOLDER
,
ErrorCode
::
CANNOT_CREATE_FOLDER
,
ErrorCode
::
CANNOT_CREATE_FILE
,
ErrorCode
::
CANNOT_CREATE_FILE
,
ErrorCode
::
CANNOT_DELETE_FOLDER
,
ErrorCode
::
CANNOT_DELETE_FOLDER
,
ErrorCode
::
CANNOT_DELETE_FILE
ErrorCode
::
CANNOT_DELETE_FILE
,
ErrorCode
::
BUILD_INDEX_ERROR
};
};
const
char
*
_kErrorCodeNames
[]
=
{
const
char
*
_kErrorCodeNames
[]
=
{
"SUCCESS"
,
"SUCCESS"
,
...
@@ -57,9 +58,10 @@ const char* _kErrorCodeNames[] = {
...
@@ -57,9 +58,10 @@ const char* _kErrorCodeNames[] = {
"CANNOT_CREATE_FOLDER"
,
"CANNOT_CREATE_FOLDER"
,
"CANNOT_CREATE_FILE"
,
"CANNOT_CREATE_FILE"
,
"CANNOT_DELETE_FOLDER"
,
"CANNOT_DELETE_FOLDER"
,
"CANNOT_DELETE_FILE"
"CANNOT_DELETE_FILE"
,
"BUILD_INDEX_ERROR"
};
};
const
std
::
map
<
int
,
const
char
*>
_ErrorCode_VALUES_TO_NAMES
(
::
apache
::
thrift
::
TEnumIterator
(
2
1
,
_kErrorCodeValues
,
_kErrorCodeNames
),
::
apache
::
thrift
::
TEnumIterator
(
-
1
,
NULL
,
NULL
));
const
std
::
map
<
int
,
const
char
*>
_ErrorCode_VALUES_TO_NAMES
(
::
apache
::
thrift
::
TEnumIterator
(
2
2
,
_kErrorCodeValues
,
_kErrorCodeNames
),
::
apache
::
thrift
::
TEnumIterator
(
-
1
,
NULL
,
NULL
));
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
ErrorCode
::
type
&
val
)
{
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
ErrorCode
::
type
&
val
)
{
std
::
map
<
int
,
const
char
*>::
const_iterator
it
=
_ErrorCode_VALUES_TO_NAMES
.
find
(
val
);
std
::
map
<
int
,
const
char
*>::
const_iterator
it
=
_ErrorCode_VALUES_TO_NAMES
.
find
(
val
);
...
...
cpp/src/thrift/gen-cpp/milvus_types.h
浏览文件 @
5082b10b
...
@@ -42,7 +42,8 @@ struct ErrorCode {
...
@@ -42,7 +42,8 @@ struct ErrorCode {
CANNOT_CREATE_FOLDER
=
17
,
CANNOT_CREATE_FOLDER
=
17
,
CANNOT_CREATE_FILE
=
18
,
CANNOT_CREATE_FILE
=
18
,
CANNOT_DELETE_FOLDER
=
19
,
CANNOT_DELETE_FOLDER
=
19
,
CANNOT_DELETE_FILE
=
20
CANNOT_DELETE_FILE
=
20
,
BUILD_INDEX_ERROR
=
21
};
};
};
};
...
...
cpp/src/thrift/milvus.thrift
浏览文件 @
5082b10b
...
@@ -35,6 +35,7 @@ enum ErrorCode {
...
@@ -35,6 +35,7 @@ enum ErrorCode {
CANNOT_CREATE_FILE,
CANNOT_CREATE_FILE,
CANNOT_DELETE_FOLDER,
CANNOT_DELETE_FOLDER,
CANNOT_DELETE_FILE,
CANNOT_DELETE_FILE,
BUILD_INDEX_ERROR,
}
}
exception Exception {
exception Exception {
...
@@ -115,6 +116,16 @@ service MilvusService {
...
@@ -115,6 +116,16 @@ service MilvusService {
*/
*/
void DeleteTable(2: string table_name) throws(1: Exception e);
void DeleteTable(2: string table_name) throws(1: Exception e);
/**
* @brief Build index by table method
*
* This method is used to build index by table in sync mode.
*
* @param table_name, table is going to be built index.
*
*/
void BuildIndex(2: string table_name) throws(1: Exception e);
/**
/**
* @brief Add vector array to table
* @brief Add vector array to table
...
@@ -207,4 +218,4 @@ service MilvusService {
...
@@ -207,4 +218,4 @@ service MilvusService {
* @return Server status.
* @return Server status.
*/
*/
string Ping(2: string cmd) throws(1: Exception e);
string Ping(2: string cmd) throws(1: Exception e);
}
}
\ No newline at end of file
cpp/src/utils/Error.h
浏览文件 @
5082b10b
...
@@ -35,6 +35,7 @@ constexpr ServerError SERVER_CANNOT_CREATE_FOLDER = ToGlobalServerErrorCode(8);
...
@@ -35,6 +35,7 @@ constexpr ServerError SERVER_CANNOT_CREATE_FOLDER = ToGlobalServerErrorCode(8);
constexpr
ServerError
SERVER_CANNOT_CREATE_FILE
=
ToGlobalServerErrorCode
(
9
);
constexpr
ServerError
SERVER_CANNOT_CREATE_FILE
=
ToGlobalServerErrorCode
(
9
);
constexpr
ServerError
SERVER_CANNOT_DELETE_FOLDER
=
ToGlobalServerErrorCode
(
10
);
constexpr
ServerError
SERVER_CANNOT_DELETE_FOLDER
=
ToGlobalServerErrorCode
(
10
);
constexpr
ServerError
SERVER_CANNOT_DELETE_FILE
=
ToGlobalServerErrorCode
(
11
);
constexpr
ServerError
SERVER_CANNOT_DELETE_FILE
=
ToGlobalServerErrorCode
(
11
);
constexpr
ServerError
SERVER_BUILD_INDEX_ERROR
=
ToGlobalServerErrorCode
(
12
);
constexpr
ServerError
SERVER_TABLE_NOT_EXIST
=
ToGlobalServerErrorCode
(
100
);
constexpr
ServerError
SERVER_TABLE_NOT_EXIST
=
ToGlobalServerErrorCode
(
100
);
constexpr
ServerError
SERVER_INVALID_TABLE_NAME
=
ToGlobalServerErrorCode
(
101
);
constexpr
ServerError
SERVER_INVALID_TABLE_NAME
=
ToGlobalServerErrorCode
(
101
);
...
@@ -54,6 +55,7 @@ constexpr ServerError SERVER_LICENSE_VALIDATION_FAIL = ToGlobalServerErrorCode(5
...
@@ -54,6 +55,7 @@ constexpr ServerError SERVER_LICENSE_VALIDATION_FAIL = ToGlobalServerErrorCode(5
constexpr
ServerError
DB_META_TRANSACTION_FAILED
=
ToGlobalServerErrorCode
(
1000
);
constexpr
ServerError
DB_META_TRANSACTION_FAILED
=
ToGlobalServerErrorCode
(
1000
);
class
ServerException
:
public
std
::
exception
{
class
ServerException
:
public
std
::
exception
{
public:
public:
ServerException
(
ServerError
error_code
,
ServerException
(
ServerError
error_code
,
...
@@ -77,4 +79,3 @@ private:
...
@@ -77,4 +79,3 @@ private:
}
// namespace server
}
// namespace server
}
// namespace milvus
}
// namespace milvus
}
// namespace zilliz
}
// namespace zilliz
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录