ElasticSearch之Analyze index disk usage API
本API用于分析、统计指定index当前占用的存储空间。
考虑到本特性目前仍然处于预览状态,因此使用方法、参数等可能会发生变化,或者未来也许会被删除。
本API暂时不建议在生产系统中使用。
命令样例如下:
curl -X POST "https://localhost:9200/testindex_001/_disk_usage?run_expensive_tasks=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
执行结果的样例,如下:
{
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"testindex_001" : {
"store_size" : "249b",
"store_size_in_bytes" : 249,
"all_fields" : {
"total" : "0b",
"total_in_bytes" : 0,
"inverted_index" : {
"total" : "0b",
"total_in_bytes" : 0
},
"stored_fields" : "0b",
"stored_fields_in_bytes" : 0,
"doc_values" : "0b",
"doc_values_in_bytes" : 0,
"points" : "0b",
"points_in_bytes" : 0,
"norms" : "0b",
"norms_in_bytes" : 0,
"term_vectors" : "0b",
"term_vectors_in_bytes" : 0,
"knn_vectors" : "0b",
"knn_vectors_in_bytes" : 0
},
"fields" : { }
}
}
方法参数
ignore_unavailable,默认值为false。
true,本操作执行时跳过失效或者不可用的index。false,本操作执行时,遇到失效或者不可用的index,则报错,样例如下:{
"error" : {
"root_cause" : [
{
"type" : "index_not_found_exception",
"reason" : "no such index [testindex_002]",
"resource.type" : "index_or_alias",
"resource.id" : "testindex_002",
"index_uuid" : "_na_",
"index" : "testindex_002"
}
],
"type" : "index_not_found_exception",
"reason" : "no such index [testindex_002]",
"resource.type" : "index_or_alias",
"resource.id" : "testindex_002",
"index_uuid" : "_na_",
"index" : "testindex_002"
},
"status" : 404
}
wait_for_active_shards,默认值为1,即主副本。
执行本操作时,必须处于可用状态的副本的数量。
run_expensive_tasks,默认值为false。
计算空间占用率的操作需要消耗大量的资源。
true,执行运算操作。false,提示错误,样例如下:{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "analyzing the disk usage of an index is expensive and resource-intensive, the parameter [run_expensive_tasks] must be set to [true] in order for the task to be performed."
}
],
"type" : "illegal_argument_exception",
"reason" : "analyzing the disk usage of an index is expensive and resource-intensive, the parameter [run_expensive_tasks] must be set to [true] in order for the task to be performed."
},
"status" : 400
}
相关资料
ElasticSearch之Analyze index disk usage API的更多相关文章
- 应用alter index ××× monitoring usage;语句监控索引使用与否
随着时间的累积,在没有很好的规划的情况下,数据库中也许会存在大量长期不被使用的索引,如果快速的定位这些索引以便清理便摆在案头.我们可以使用"alter index ××× monitorin ...
- ElasticSearch查询 第一篇:搜索API
<ElasticSearch查询>目录导航: ElasticSearch查询 第一篇:搜索API ElasticSearch查询 第二篇:文档更新 ElasticSearch查询 第三篇: ...
- Elasticsearch入坑指南之RESTful API
Elasticsearch入坑指南之RESTful API Tags:Elasticsearch ES为开发者提供了非常丰富的基于Http协议的Rest API,通过简单的Rest请求,就可以实现非常 ...
- 10 Useful du (Disk Usage) Commands to Find Disk Usage of Files and Directories
The Linux “du” (Disk Usage) is a standard Unix/Linux command, used to check the information of disk ...
- WinDirStat is a disk usage statistics viewer
WinDirStat is a disk usage statistics viewer and cleanup tool for various versions of Microsoft Wind ...
- elasticsearch使用Analyze API
curl -XGET 'localhost:9200/index_name/_analyze?pretty&field=type_name.field_name' -d 'Robots car ...
- Elasticsearch:Split index API - 把一个大的索引分拆成更多分片
文章转载自:https://blog.csdn.net/UbuntuTouch/article/details/108960950
- 分布式搜索引擎Elasticsearch PHP类封装 使用原生api
//官方的 php api写的鸡肋了,下面这个类可以使用 es api 操作. <?php class ElasticSearch { public $index; function __co ...
- Swiper Usage&&API
最近使用Swipe.js,发现中文的资料很少,试着翻译了一下.能力有限,翻译难免错漏,请指出,多谢!如果想获得国外较多而全的文档,还是用google. 一了解SwiperSwiper 是一款免费以及轻 ...
- Elasticsearch 5.4.3实战--Java API调用:索引mapping创建
因为项目开发使用的是Java语言, 项目的开发架构是Spring MVC+ maven的jar包管理, 所以今天重点说说ES 5.4.3 的Java API的源码实战 1. pom.xml文件增加依 ...
随机推荐
- 每日一题:AJAX进度监控(附可运行源码)
1.什么是AJAX AJAX(Asynchronous JavaScript and XML)是一种用于在网页上进行异步通信的技术.它允许在不刷新整个页面的情况下,通过在后台与服务器进行数据交换来更新 ...
- Three.js中实现一个OBBHelper
1. 引言 Three.js中,Box3对象指的是AABB式的包围盒,这种包围盒会随物体的旋转而变换大小,精度较差 Three.js中还有OBB对象,这是一种能表现物体主要特征的.不随物体的旋转而变换 ...
- Apache(2.4.49 2.4.50)--目录遍历--命令执行--(CVE-2021-42013)&&(CVE-2021-41773)
Apache(2.4.49 2.4.50)--目录遍历--命令执行--(CVE-2021-42013)&&(CVE-2021-41773) 复现环境 采用Vulfocus靶场环境进行复 ...
- ⭐malloc(易造成内存泄漏)(及时释放内存)
1,关于malloc以及相关的几个函数 #include <stdlib.h>(Linux下) void *malloc(size_t size); void fr ...
- 重写equals方法的注意事项
重写equals方法的注意事项 一. 在重写equals方法时,要注意满足离散数学上的特性1 自反性:对任意引用值X,x.equals(x)的返回值一定为true.2 对称性:对于任何引用 ...
- Tarjan强连通分量详解
1.简介: 在阅读下列内容之前,请务必了解 图论相关概念 中的基础部分. 强连通的定义是:有向图 G 强连通是指,G 中任意两个结点连通. 强连通分量(Strongly Connected Compo ...
- 创建vue项目并搭建JSONSERVER
1.该前提是你已经搭建好vue-cli脚手架,开始创建一个新项目,输入 vue init webpack demo(demo是自定义项目名). 2.cd demo 进入项目安装依赖 3.在已经创建的项 ...
- 21.8 Python 使用BeautifulSoup库
BeautifulSoup库用于从HTML或XML文件中提取数据.它可以自动将复杂的HTML文档转换为树形结构,并提供简单的方法来搜索文档中的节点,使得我们可以轻松地遍历和修改HTML文档的内容.广泛 ...
- Flyweight 享元模式简介与 C# 示例【结构型6】【设计模式来了_11】
〇.简介 1.什么是享元模式? 一句话解释: 将相似或同类的对象共享同一个对象,将这些对象暂存在列表中,使用时直接取出,避免每次使用时都要新建浪费资源. 享元模式的目的是减少对象的创建,通过共享对 ...
- C#.NET 国密SM4 CBC 对称加解密 与JAVA互通 ver:20231103
C#.NET 国密SM4 CBC 对称加解密 与JAVA互通 ver:20231103 .NET 环境:.NET6 控制台程序(.net core). JAVA 环境:JAVA8,带maven 的JA ...