Is there any way where we can merge 2 clusters with same name to 1.
Scenario is... will have an existing cluster with name xyz and have some data. Will create additional cluster in different nodes with same name xyz and wont have any data. Can we merge these 2 and have same data fetched from both?
I have tried utilizing the discovery options but its not merging the nodes of other cluster to existing.
You can use cross cluster search and keep both clusters as they are now.
If you really need to merge the clusters, I'd suggest to do a backup of one of the cluster and restore in the other one. Or do a reindex from remote to reindex existing data from the old to the new one.
Thanks much for the response . Could you please provide some more details on cross cluster search? Any specific commands ? I know about cross cluster replication but not about cross cluster search.
Post that i can go for remote reindex.
Also once we do cross cluster search .. can we run both the cluster at the same time performing CRUD operations on data?
You can not merge two existing clusters even if they have the same ID. You could however wipe the nodes in the new cluster and set them up to join the other cluster. If there is no data that should be fine.
If you keep these clusters separate you can use cross-cluster search to search across both of them, although they would contain completely separate data sets. An update or insert into one cluster would not propagate to the other but you could serach for the data via cross-cluster search.
Why are you looking to merge clusters? Are the two clusters located far apart?
Yes , we are trying to migrate from one cluster to another without any downtime.
In order to achieve that , we need to have both the clusters UP and running , before i shutdown the old cluster. As i mentioned earlier , i have used discovery options to find out a node which is running in another cluster to join the current cluster, it didnt help.
Logs --
{"type": "server", "timestamp": "2023-03-20T10:40:57,270Z", "level": "WARN", "component": "o.e.c.c.ClusterFormationFailureHelper", "cluster.name": "elasticsearch", "node.name": "elasticsearch-master-1", "message": "master not discovered or elected yet, an election requires at least 2 nodes with ids from [4R5ELk3GToGBUYXLsr3OCQ, c3YC-9mWRPuv6W-2LbZoCg, 98nCGN8pQDOMfd5tjvhxQA], have only discovered non-quorum [{elasticsearch-master-1}{c3YC-9mWRPuv6W-2LbZoCg}{d6f9peb1Rbe2HaZiAHV9-g}{10.232.68.21}{10.232.68.21:9300}{ilmr}]; discovery will continue using [x.y.z.1:31777, x.y.z.2:31778, x.y.z.3:31779] from hosts providers and [{elasticsearch-master-1}{c3YC-9mWRPuv6W-2LbZoCg}{d6f9peb1Rbe2HaZiAHV9-g}{10.232.68.21}{10.232.68.21:9300}{ilmr}] from last-known cluster state; node term 74, last-accepted version 542 in term 74" }
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.