ElasticSearch实战(二十一)-任务管理
作者:互联网
ElasticSearch 支持查询、取消任务的功能,通过任务管理功能,我们对于那种长时间的任务可以做到更好的控制。
1、查询任务
任务api会从一个节点或集群中所有节点获取任务列表及状态,命令如下:
GET /_tasks
GET /_tasks?nodes=nodeId1,nodeId2
GET /_tasks?nodes=nodeId1,nodeId2&actions=cluster:*
返回的结果:
{
"nodes" : {
"oTUltX4IQMOUUVeiohTt8A" : {
"name" : "Tamara Rahn",
"transport_address" : "127.0.0.1:9300",
"host" : "127.0.0.1",
"ip" : "127.0.0.1:9300",
"tasks" : {
"oTUltX4IQMOUUVeiohTt8A:124" : {
"node" : "oTUltX4IQMOUUVeiohTt8A",
"id" : 124,
"type" : "direct",
"action" : "cluster:monitor/tasks/lists[n]",
"start_time_in_millis" : 1458585884904,
标签:实战,tasks,oTUltX4IQMOUUVeiohTt8A,0.1,二十一,任务,127.0,ElasticSearch,nodes 来源: https://blog.csdn.net/qq_19734597/article/details/120351540