【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
相关推荐
周杰伦_Jay9 小时前
【Elasticsearch 全解析】分布式搜索引擎的原理、实践与优化
大数据·分布式·elasticsearch·架构·开源·1024程序员节
会飞的小蛮猪16 小时前
ELK运维之路(异常日志告警)
elasticsearch·自动化运维·logstash
Elastic 中国社区官方博客1 天前
介绍 Elastic 的 Agent Builder - 9.2
大数据·运维·人工智能·elasticsearch·搜索引擎·ai·全文检索
xxxxxxllllllshi1 天前
【Elasticsearch查询DSL API完全指南:从入门到精通】
java·大数据·elasticsearch·搜索引擎·面试·全文检索·jenkins
半梦半醒*1 天前
ELK1——elasticsearch
linux·运维·数据仓库·elasticsearch·centos
白帽子凯哥哥1 天前
SpringBoot + Elasticsearch实战:从零构建高性能搜索与数据分析平台
大数据·spring boot·后端·elasticsearch·搜索引擎·性能优化·聚合查询
会飞的小蛮猪2 天前
ELK运维之路(使用Logstatsh对日志进行处理综合案例)
elasticsearch·自动化运维·logstash
lang201509282 天前
Spring Boot Actuator应用信息Application Information全解析
spring boot·后端·elasticsearch
三口吃掉你2 天前
Docker安装Elasticsearch、kibana、IK分词器
elasticsearch·docker·kibana·ik分词器
一棵树73512 天前
Android OpenGL ES初窥
android·大数据·elasticsearch