Lets say I have a 3 node cluster and I deploy one index SPECIFIC to every
data node in the cluster.
So, index1 goes to node1, index2 goes to node2, etc. using the
routing.allocation settings based on node.zone etc. config properties.
There may be 5-6 shards per index, but no replicas. All three indices,
index 1/2/3 will have the same mapping schemas.
Now, if the following scenarios occur:
1.] One node, node2, goes down:
How can I get the node 2's index, index2, live on the other two data nodes?
Can I just copy the data directory to the other nodes? Since there is no
mapping like index2 defined on those nodes, will I have to first create the
mapping there?
Can I move half the shards to each remaining node?
2.] Assume one more node is now added to this cluster:
Can I copy the mapping schema to the new node and selectively copy 1-2
shards each from the existing 3 data nodes so that I can rebalance the
cluster 3-4 shards per index per node?
I am not sure if there is this level of control and how it is exposed.
Please let me know. Thanks,
Mappings aren't saved to a specific node, so you don't need to worry about
that.
You may be able to physically copy the data across and have it recover, but
you should test this.
With out more information I'd question why you want to do this. ES handles
allocation itself perfectly fine and not running replicas is risky,
especially if you are forcing the entire index onto one instance.
Lets say I have a 3 node cluster and I deploy one index SPECIFIC to every
data node in the cluster.
So, index1 goes to node1, index2 goes to node2, etc. using the
routing.allocation settings based on node.zone etc. config properties.
There may be 5-6 shards per index, but no replicas. All three indices,
index 1/2/3 will have the same mapping schemas.
Now, if the following scenarios occur:
1.] One node, node2, goes down:
How can I get the node 2's index, index2, live on the other two data nodes?
Can I just copy the data directory to the other nodes? Since there is no
mapping like index2 defined on those nodes, will I have to first create the
mapping there?
Can I move half the shards to each remaining node?
2.] Assume one more node is now added to this cluster:
Can I copy the mapping schema to the new node and selectively copy 1-2
shards each from the existing 3 data nodes so that I can rebalance the
cluster 3-4 shards per index per node?
I am not sure if there is this level of control and how it is exposed.
Please let me know. Thanks,
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.