简体   繁体   English

如何检查 ElasticSearch 的 Reindex API 的进度

[英]How to check progress of ElasticSearch's Reindex API

I'm trying to execute a reindex operation from remote ES 2.4 cluster via Reindex API .我正在尝试通过Reindex API从远程 ES 2.4 集群执行重新索引操作。 Which job is to transfer more then 100 million docs of an index to latest version of elasticsearch.哪个工作是将超过 1 亿个索引文档传输到最新版本的 elasticsearch。

For the test case i'm trying it on small data set but i'm facing following issues.对于测试用例,我正在小数据集上尝试它,但我面临以下问题。

issue:问题:

  1. I can't see the progress of the of the script that how many docs are transfered and how many left.我看不到脚本的进度,即传输了多少文档以及剩下多少文档。

  2. In case of failure, How can i resume the script instead of restarting again from 0.如果失败,我如何恢复脚本而不是从 0 重新启动。

You can use the Task management API to know the status of reindex , As suggested in the official doc of reindex API .您可以使用任务管理 API来了解reindex的状态,如reindex API 官方文档中所建议的那样。 from the same doc来自同一个文档

If the request contains wait_for_completion=false, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to cancel or get the status of the task.如果请求包含 wait_for_completion=false,Elasticsearch 会执行一些预检检查,启动请求,并返回可用于取消或获取任务状态的任务。 Elasticsearch creates a record of this task as a document at.tasks/_doc/${taskId}. Elasticsearch 将此任务的记录创建为文件 at.tasks/_doc/${taskId}。 When you are done with a task, you should delete the task document so Elasticsearch can reclaim the space.完成任务后,应删除任务文档,以便 Elasticsearch 可以回收空间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM