2013-05-24 06:02:42 -04:00
|
|
|
{
|
|
|
|
"cluster.reroute": {
|
2015-03-24 12:03:35 -04:00
|
|
|
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html",
|
2013-05-24 06:02:42 -04:00
|
|
|
"methods": ["POST"],
|
|
|
|
"url": {
|
|
|
|
"path": "/_cluster/reroute",
|
|
|
|
"paths": ["/_cluster/reroute"],
|
|
|
|
"parts": {
|
|
|
|
},
|
|
|
|
"params": {
|
|
|
|
"dry_run": {
|
2013-05-26 08:11:15 -04:00
|
|
|
"type" : "boolean",
|
2013-05-28 04:32:27 -04:00
|
|
|
"description" : "Simulate the operation only and return the resulting state"
|
2013-05-24 06:02:42 -04:00
|
|
|
},
|
Add `explain` flag support to the reroute API
By specifying the `explain` flag, an explanation for the reason a
command can or cannot be executed is returned. No allocation commands
are actually performed.
Returns a response similar to:
{
"state": {...cluster state...},
"acknowledged": true,
"explanations" : [ {
"command" : "cancel",
"parameters" : {
"index" : "decide",
"shard" : 0,
"node" : "IvpoKRdtRiGrQ_WKtt4_4w",
"allow_primary" : false
},
"decisions" : [ {
"decider" : "cancel_allocation_command",
"decision" : "YES",
"explanation" : "..."
} ]
}, {
"command" : "move",
"parameters" : {
"index" : "decide",
"shard" : 0,
"from_node" : "IvpoKRdtRiGrQ_WKtt4_4w",
"to_node" : "IvpoKRdtRiGrQ_WKtt4_4w"
},
"decisions" : [ {
"decider" : "same_shard",
"decision" : "NO",
"explanation" : "shard cannot be allocated on same node [IvpoKRdtRiGrQ_WKtt4_4w] it already exists on"
},
etc
]
}]
}
also removes AllocationExplanation from cluster state
Closes #2483
Closes #5169
2014-01-31 18:50:32 -05:00
|
|
|
"explain": {
|
|
|
|
"type" : "boolean",
|
|
|
|
"description" : "Return an explanation of why the commands can or cannot be executed"
|
|
|
|
},
|
2014-08-30 16:01:00 -04:00
|
|
|
"metric": {
|
|
|
|
"type": "list",
|
|
|
|
"options": ["_all", "blocks", "metadata", "nodes", "routing_table", "master_node", "version"],
|
|
|
|
"description": "Limit the information returned to the specified metrics. Defaults to all but metadata"
|
2014-01-16 09:27:24 -05:00
|
|
|
},
|
|
|
|
"master_timeout": {
|
|
|
|
"type" : "time",
|
|
|
|
"description" : "Explicit operation timeout for connection to master node"
|
|
|
|
},
|
|
|
|
"timeout": {
|
|
|
|
"type" : "time",
|
|
|
|
"description" : "Explicit operation timeout"
|
2013-05-24 06:02:42 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"body": {
|
2013-05-26 08:11:15 -04:00
|
|
|
"description" : "The definition of `commands` to perform (`move`, `cancel`, `allocate`)"
|
2013-05-24 06:02:42 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|