2013-05-24 06:02:42 -04:00
|
|
|
{
|
|
|
|
"cluster.reroute": {
|
2014-01-22 08:40:31 -05:00
|
|
|
"documentation": "http://www.elasticsearch.org/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"
|
|
|
|
},
|
2013-05-24 06:02:42 -04:00
|
|
|
"filter_metadata": {
|
2013-05-26 08:11:15 -04:00
|
|
|
"type" : "boolean",
|
2013-06-04 11:35:22 -04:00
|
|
|
"description" : "Don't return cluster state metadata (default: false)"
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|