【elasticsearch】tasks 查看任务

模糊匹配

复制代码
GET /_tasks?detailed=true&actions=*reindex

例如,返回:节点信息(nodes) & 任务信息(tasks)

某个任务正在执行一个跨集群的 reindex 操作,数据从远程集群的 source_index 索引复制到本地集群的 destination_index 索引

json 复制代码
"nodes": {
  "tmKI6JpWRe2tEezmK_NCZA": { # 节点id
    "name": "fdd16ed5d19a",   # 节点名称
    "transport_address": "172.18.0.2:9300", # 传输地址&通信端口
    "host": "172.18.0.2",
    "ip": "172.18.0.2:9300",
    "roles": [ # 该节点角色,数据存储、数据处理、机器学习、远程客户端
      "data",
      "data_cold",
      "data_content",
      "data_frozen",
      "data_hot",
      "data_warm",
      "ingest",
      "master",
      "ml",
      "remote_cluster_client",
      "transform"
    ],
    "attributes": { # 机器学习相关属性
      "ml.machine_memory": "6442450944",
      "transform.config_version": "10.0.0",
      "xpack.installed": "true",
      "ml.config_version": "12.0.0",
      "ml.max_jvm_size": "3221225472",
      "ml.allocated_processors_double": "16.0",
      "ml.allocated_processors": "16"
    }
  }
}

任务信息

json 复制代码
"tasks": {
  "tmKI6JpWRe2tEezmK_NCZA:13538917": { # 任务节点 & 任务ID
    "node": "tmKI6JpWRe2tEezmK_NCZA",
    "id": 13538917,
    "type": "transport",  # 任务类型,transport:跨节点任务
    "action": "indices:data/write/reindex", # 操作类型为reindex
    "status": {
      "total": 59782375, # 需要处理的文档总量
      "updated": 52110,  # 已经更新的文档数量
      "created": 5009000, # 已完成创建的文档数量
      "deleted": 0,
      "batches": 25839, # 已经处理的批次
      "version_conflicts": 20776890,  # 发生版本冲突的文档数量
      "noops": 0,
      "retries": {
        "bulk": 0, # 没有发生重试
        "search": 0 # 没有发生查询重试
      },
      "throttled_millis": 0, # 没有发生速率限制而被暂停
      "requests_per_second": -1,
      "throttled_until_millis": 0
    },
    "description": """reindex from [host=10.17.9.16 port=9200 query={
  "match_all" : {
    "boost" : 1.0
  }
}][source_index] to [destination_index]""",
    "start_time_in_millis": 1737616125515,
    "running_time_in_nanos": 77797804793853,
    "cancellable": true,
    "cancelled": false,
    "headers": {
      "trace.id": "1be32ca32fc91148fb5b0332e715271d"
    }
  }
}

中途取消

复制代码
POST /_tasks/tmKI6JpWRe2tEezmK_NCZA:13250244/_cancel

指定任务查看

复制代码
GET /_tasks/tmKI6JpWRe2tEezmK_NCZA:13538917
相关推荐
vx-程序开发16 小时前
【计算机毕设】django校园跑腿服务系统83141
java·数据库·vue.js·spring boot·spring·elasticsearch·django
Elasticsearch17 小时前
jina-ocr-v1:在低成本 GPU 上实现更快速的文档解析
elasticsearch
深海鱼肝油ya19 小时前
向量数据库Elasticsearch(四)搜索文档——各种方式
人工智能·elasticsearch·向量数据库·es搜索文档·只能体·非结构化数据库
LaughingZhu19 小时前
Product Hunt 每日热榜 | 2026-09-20
人工智能·深度学习·神经网络·搜索引擎·百度
Y38153266220 小时前
Ruby 调用谷歌搜索 API:net/http 与 json 标准库实战
搜索引擎·ruby
Elasticsearch1 天前
SNAP 支付错误检测:Elastic 如何帮助美国各州应对 FY2028 的处罚
elasticsearch
Elastic 中国社区官方博客1 天前
使用 Elasticsearch 和 Jina 进行 AI 视频搜索:精准找到你需要的视频片段秒数
大数据·数据库·人工智能·elasticsearch·搜索引擎·ai·全文检索
Elasticsearch1 天前
2026 年唯一获得满分 Endpoint Prevention and Response(EPR)评分的是 Elastic
elasticsearch
Y3815326622 天前
C# 调用谷歌搜索 API:HttpClient 与 System.Text.Json 实战
搜索引擎·.net
Elasticsearch2 天前
没有小到无法记录的日志文件:Elastic Agent 如何跟踪低于 1 KiB 阈值的文件
elasticsearch