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文件增加依 ...
随机推荐
- 「loj - 3489」「joisc 2021 day 1」Food Court
link. 感觉好久没写过题解了, 这就是永远在骚动的得不到吧. 星尘 infinity 真的非常行, 就算是 ja voicebase 都不知道吊打那群日 v 多少圈. 我推荐你们都去听一听. ch ...
- 数据库sql中处理时间冲突问题
数据库现有数据其中两列: s - 开始时间, e - 结束时间. 在新插入数据s', e'之前需要判断两个时间之间是否有重合 因为使用mybatis-plus的缘故, 结论都使用s或e在符号前面. 1 ...
- 使用Debian 11基础镜像制作java8镜像
下面是dockerfile内容: FROM debian:bullseye # 切换apt源为清华源,并安装vim ping telnet命令 RUN apt-get update && ...
- 使用Blazor WASM实现可取消的多文件带校验并发分片上传
前言 上传大文件时,原始HTTP文件上传功能可能会影响使用体验,此时使用分片上传功能可以有效避免原始上传的弊端.由于分片上传不是HTTP标准的一部分,所以只能自行开发相互配合的服务端和客户端.文件分片 ...
- Berkeley
2019年Berkeley预测Serverless将取代Serverful计算,成为云计算的计算新范式.Serverless为应用程序开发提供了一种全新的系统架构,其凭借着弹性伸缩省事省心,按需付费更 ...
- linux- 挂载本地iso,配置本地yum
------------------------------------ 关于centos8安装vm-tools: workstation部署centos8之后,不需要单独安装vm-tools,系统已 ...
- 《数据结构》王卓老师 p48-p62学习反馈
跟着青岛大学-王卓老师的视频进行到链队列时,运行链队列代码的时候遇到了两个问题: 1.)Program received signal SIGSEGV Segmentation fault 附代码: ...
- jenkins 原理篇——pipeline流水线 声明式语法详解
大家好,我是蓝胖子,相信大家平时项目中或多或少都有用到jenkins,它的piepeline模式能够对项目的发布流程进行编排,优化部署效率,减少错误的发生,如何去写一个pipeline脚本呢,今天我们 ...
- Unity - UIWidgets 3. 页面跳转
Flutter的Route概念, 移动开发常指Page, 在android中指activity, ios中指viewcontroller, UGUI中常称为Panel\Form\View? 大概说的就 ...
- Codeforces Round 902 Div 1 (CF 1876)
A. Helmets in Night Light 按花费 sort 一下,\(b<p\) 就让他用 \(b\) 的花费告诉别人,剩下的人一开始用 \(p\) 的花费告诉即可. B. Effec ...