Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
dc47acba
M
milvus
项目概览
milvus
/
milvus
12 个月 前同步成功
通知
261
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
dc47acba
编写于
4月 07, 2022
作者:
Z
zhuwenxing
提交者:
GitHub
4月 07, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[skip e2e]Update MilvusSys to adapt to new version pymilvus (#16408)
Signed-off-by:
N
zhuwenxing
<
wenxing.zhu@zilliz.com
>
上级
909dd737
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
13 deletion
+12
-13
tests/python_client/common/milvus_sys.py
tests/python_client/common/milvus_sys.py
+12
-13
未找到文件。
tests/python_client/common/milvus_sys.py
浏览文件 @
dc47acba
...
...
@@ -11,18 +11,17 @@ sys_logs_req = ujson.dumps({"metric_type": "system_logs"})
class
MilvusSys
:
def
__init__
(
self
,
alias
=
'default'
):
self
.
alias
=
alias
self
.
client
=
connections
.
get_connection
(
alias
=
self
.
alias
)
if
self
.
client
is
None
:
self
.
handler
=
connections
.
_fetch_handler
(
alias
=
self
.
alias
)
if
self
.
handler
is
None
:
raise
Exception
(
f
"Connection
{
alias
}
is disconnected or nonexistent"
)
# TODO: for now it only supports non_orm style API for getMetricsRequest
with
self
.
client
.
_connection
()
as
handler
:
req
=
milvus_types
.
GetMetricsRequest
(
request
=
sys_info_req
)
self
.
sys_info
=
handler
.
_stub
.
GetMetrics
(
req
,
wait_for_ready
=
True
,
timeout
=
None
)
req
=
milvus_types
.
GetMetricsRequest
(
request
=
sys_statistics_req
)
self
.
sys_statistics
=
handler
.
_stub
.
GetMetrics
(
req
,
wait_for_ready
=
True
,
timeout
=
None
)
req
=
milvus_types
.
GetMetricsRequest
(
request
=
sys_logs_req
)
self
.
sys_logs
=
handler
.
_stub
.
GetMetrics
(
req
,
wait_for_ready
=
True
,
timeout
=
None
)
req
=
milvus_types
.
GetMetricsRequest
(
request
=
sys_info_req
)
self
.
sys_info
=
self
.
handler
.
_stub
.
GetMetrics
(
req
,
wait_for_ready
=
True
,
timeout
=
None
)
req
=
milvus_types
.
GetMetricsRequest
(
request
=
sys_statistics_req
)
self
.
sys_statistics
=
self
.
handler
.
_stub
.
GetMetrics
(
req
,
wait_for_ready
=
True
,
timeout
=
None
)
req
=
milvus_types
.
GetMetricsRequest
(
request
=
sys_logs_req
)
self
.
sys_logs
=
self
.
handler
.
_stub
.
GetMetrics
(
req
,
wait_for_ready
=
True
,
timeout
=
None
)
@
property
def
build_version
(
self
):
...
...
@@ -50,7 +49,7 @@ class MilvusSys:
"""get all query nodes in Milvus deployment"""
query_nodes
=
[]
for
node
in
self
.
nodes
:
if
'
QueryN
ode'
==
node
.
get
(
'infos'
).
get
(
'type'
):
if
'
queryn
ode'
==
node
.
get
(
'infos'
).
get
(
'type'
):
query_nodes
.
append
(
node
)
return
query_nodes
...
...
@@ -59,7 +58,7 @@ class MilvusSys:
"""get all data nodes in Milvus deployment"""
data_nodes
=
[]
for
node
in
self
.
nodes
:
if
'
DataN
ode'
==
node
.
get
(
'infos'
).
get
(
'type'
):
if
'
datan
ode'
==
node
.
get
(
'infos'
).
get
(
'type'
):
data_nodes
.
append
(
node
)
return
data_nodes
...
...
@@ -68,7 +67,7 @@ class MilvusSys:
"""get all index nodes in Milvus deployment"""
index_nodes
=
[]
for
node
in
self
.
nodes
:
if
'
IndexN
ode'
==
node
.
get
(
'infos'
).
get
(
'type'
):
if
'
indexn
ode'
==
node
.
get
(
'infos'
).
get
(
'type'
):
index_nodes
.
append
(
node
)
return
index_nodes
...
...
@@ -77,7 +76,7 @@ class MilvusSys:
"""get all proxy nodes in Milvus deployment"""
proxy_nodes
=
[]
for
node
in
self
.
nodes
:
if
'
P
roxy'
==
node
.
get
(
'infos'
).
get
(
'type'
):
if
'
p
roxy'
==
node
.
get
(
'infos'
).
get
(
'type'
):
proxy_nodes
.
append
(
node
)
return
proxy_nodes
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录