Current setting: Say, I have 3 data nodes. Now if I decide to restart a data node(due to a small change in setting), the recovery will start immediately after node restart as per the expected_data_nodes setting. There will be many unassigned shards, which will get allocated slowly depending on the data it contains.
In order to avoid that, is there any way to allocate all the unassigned shards to a specific node?(in my case the restarted node) and once that is done, ES should take over the rebalancing.
Mainly I want to avoid the heavy timelag of the cluster state from yellow to green.(it is in the range of hours in my case)
Can I use the cluster reroute api for this purpose?
or is there any other api to transfer all the unassigned shards to specific node at one go?
Shard keep analocated until
"cluster.routing.allocation.disable_allocation": false, then shards recover
on the server just restarted (starting at size they were before shutdown)
It is very quick.
Current setting: Say, I have 3 data nodes. Now if I decide to restart a
data
node(due to a small change in setting), the recovery will start immediately
after node restart as per the expected_data_nodes setting. There will be
many unassigned shards, which will get allocated slowly depending on the
data it contains.
In order to avoid that, is there any way to allocate all the unassigned
shards to a specific node?(in my case the restarted node) and once that is
done, ES should take over the rebalancing.
Mainly I want to avoid the heavy timelag of the cluster state from yellow
to
green.(it is in the range of hours in my case)
Can I use the cluster reroute api for this purpose?
or is there any other api to transfer all the unassigned shards to specific
node at one go?
Another option is to prepare the node ahead of time by excluding it using
the shard placement API. The cluster will immediately begin moving shards
off the node until it has none left, allowing you to restart it as many
times as you want until it is ready for use again. Depending on why you
need to restart it, that may be more useful to you as it prevents your
cluster from every going into a degraded state at all.
-Pradeep
On Friday, April 26, 2013 1:25:31 AM UTC-7, Damien Hardy wrote:
My procedure to restart a node without shards reallocation is :
Shard keep analocated until
"cluster.routing.allocation.disable_allocation": false, then shards recover
on the server just restarted (starting at size they were before shutdown)
It is very quick.
Current setting: Say, I have 3 data nodes. Now if I decide to restart a
data
node(due to a small change in setting), the recovery will start
immediately
after node restart as per the expected_data_nodes setting. There will be
many unassigned shards, which will get allocated slowly depending on the
data it contains.
In order to avoid that, is there any way to allocate all the unassigned
shards to a specific node?(in my case the restarted node) and once that is
done, ES should take over the rebalancing.
Mainly I want to avoid the heavy timelag of the cluster state from yellow
to
green.(it is in the range of hours in my case)
Can I use the cluster reroute api for this purpose?
or is there any other api to transfer all the unassigned shards to
specific
node at one go?
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.
Thanks a lot for all the replies. Will try the above allocation curl command next time before node restart...
Before that I need a small clarification. This command seems to be affecting entire cluster. But, in my case I want that to be done for a single node. Is that possible?
From the command it seems, the there will not be any further allocation in the entire cluster till we set it to false. I don't want like that. The allocation should be stopped only for that node. After restart everything should go into normal state in a faster pace.
Is it possible to specify the node in the above command?
Shard keep analocated until
"cluster.routing.allocation.disable_allocation": false, then shards recover
on the server just restarted (starting at size they were before shutdown)
It is very quick.
I am quite new to elasticsearch, so this may be kind of newbeish. Does this
also mean, if a primary shard would reside on that node, replica promotion will
not happen?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.