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文件增加依 ...
随机推荐
- 再聊Java Stream的一些实战技能与注意点
大家好,又见面了. 在此前我的文章中,曾分2篇详细探讨了下JAVA中Stream流的相关操作,2篇文章收获了累计 10w+阅读.2k+点赞以及 5k+收藏的记录.能够得到众多小伙伴的认可,是技术分享过 ...
- 4.1 应用层Hook挂钩原理分析
InlineHook 是一种计算机安全编程技术,其原理是在计算机程序执行期间进行拦截.修改.增强现有函数功能.它使用钩子函数(也可以称为回调函数)来截获程序执行的各种事件,并在事件发生前或后进行自定义 ...
- 「tricks」平凡二分幻术
其实这个的标题叫 平凡线段树上二分幻术,因为这是一个民科在乱叫. 如标题所言,这个东西确实非常 trivial.碍于网络上没有一个成体系的文章供参考就只能自己来炒炒冷饭. 如果出了什么 bug 就当个 ...
- nginx URLRewrite基础配置
环境准备: 主机 ip control01 192.168.29.128 nginx01 192.168.29.101 在两台机器上分别部署nginx control01主机nginx配置的内容如下: ...
- RabbitMQ保姆级教程最佳实践
一.消息队列介绍 1.消息队列概念 1.MQ全称为Message Queue,消息队列(MQ)是⼀种应⽤程序对应⽤程序的通信⽅法. 应⽤程序通过读写出⼊队列的消息(针对应⽤程序的数据)来通信,⽽⽆需专 ...
- 聊聊JDK19特性之虚拟线程
1.前言 在读<深入理解JVM虚拟机>这本书前两章的时候整理了JDK从1.0到最新版本发展史,其中记录了JDK这么多年来演进过程中的一些趣闻及引人注目的一些特性,在调研JDK19新增特性的 ...
- python第6章 学习笔记
# 第6章 学习笔记## 简介 Python代码在执行时是按照自上向下顺序执行的. 通过流程控制语句,可以改变程序的执行顺序,也可以让指定的程序反复执行多次 流程控制语句分成两大类:条件判断语句,循环 ...
- 基于AI模型的验证码安全识别(B站,知乎等)
bilibili 汉字识别顺序验证码 实现基本思路: 先利用Selenium模拟登录,当然在这之前做好请求伪装,get方法使边框最大化,并且将系统的windows窗口缩放比例设置为100%, ...
- EXCEL表格,当字段值超出单元格的区域时,如何不显示??
问题阐述:当导出Excel表格的数据中的某一列字段的值超过单元格可以展示的范围,并且在Excel表格中展示为如下: 最终结果展示如下: 解决过程: 1.选中执行的单元格 2.右键选中"设置单 ...
- 软件开发人员 Kubernetes 入门指南|Part 2
在第 1 部分中,我们讲解了 Kubernetes 的核心组件,Kubernetes 是一种开源容器编排器,用于在分布式环境中部署和扩展应用程序:我们还讲解了如何在集群中部署一个简单的应用程序,然后更 ...