如何监控每个滚动 ID 的滚动 API 使用的内存资源或搜索上下文?这些搜索上下文存储在哪里,有办法查看或监控它们吗? java api 的参数 keepAlive 意味着什么 public SearchRequest roll(TimeValue keepAlive) {...}
Ref: https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.5/java-rest-high-clear-scroll.html#java-rest-high-clear-scroll-async https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.5/java-rest-high-clear-scroll.html#java-rest-high-clear-scroll-async
您可以通过调用以下命令来检查当前打开了多少个搜索上下文节点统计API https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html但(据我所知)无法查看它们使用了多少内存:
GET _nodes/stats/indices?filter_path=**.open_contexts
=>
{
"nodes" : {
"QjjWj45NQkGC9qcaylDDVQ" : {
"indices" : {
"search" : {
"open_contexts" : 0
}
}
},
"eZbpkckXSxSxzD8c_QOkEA" : {
"indices" : {
"search" : {
"open_contexts" : 3
}
}
},
"0VFJaC2uTraudPCMqODhiw" : {
"indices" : {
"search" : {
"open_contexts" : 2
}
}
}
}
}
搜索上下文存储在堆上。
此外,keepAlive
参数告诉上下文在被自动清除之前在内存中保持可用的时间。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)